Skip to content

[WIP] refactor: email previewer#426

Draft
mateusbrg wants to merge 12 commits intomainfrom
refactor/email-previewer
Draft

[WIP] refactor: email previewer#426
mateusbrg wants to merge 12 commits intomainfrom
refactor/email-previewer

Conversation

@mateusbrg
Copy link
Copy Markdown
Member

@mateusbrg mateusbrg commented Oct 27, 2025

Descrição

Este pull request introduz a configuração inicial para o novo app email-previewer, fornecendo uma base para preview e teste de templates de email construídos com @vue-email/components.

Inclui configuração do projeto, documentação e a implementação de componentes principais de interface para seleção de templates, pré-visualização e alternância entre dispositivos, além de um primeiro template de email (ainda em wip).

preview (wip)

Screenshot 2025-11-10 at 22 43 56

@mateusbrg mateusbrg changed the title [WIPrefactor: email previewer [WIP] refactor: email previewer Oct 27, 2025
@mateusbrg mateusbrg marked this pull request as draft October 27, 2025 21:58
@mateusbrg mateusbrg requested a review from Copilot October 27, 2025 21:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an email template preview system with two separate applications: a basic email renderer (apps/email) and a more sophisticated email previewer application (apps/email-previewer). The main purpose is to provide tools for developing, previewing, and deploying email templates using Vue components.

Key changes:

  • Added shared TypeScript types for email templates in packages/types
  • Created a basic email renderer app with AWS SES integration
  • Implemented a comprehensive email previewer application with device/variant previews

Reviewed Changes

Copilot reviewed 45 out of 50 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/types/src/email-template.ts Defines core types for email templates, variants, and preview devices
packages/types/src/index.ts Exports the new email template types
apps/email/* Basic email rendering app with SES upload functionality
apps/email-previewer/* Full-featured Vue app for previewing email templates with device/variant switching
package.json Added workspace dependency reference
eslint.config.js Added ignore rule for the email app

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/email/README.md
@@ -0,0 +1,29 @@
# Email Service

Esse projeto permite que renderize templates de vue-email, compile e faca upload para o SES. Além disso é possível fazer uma visualização dos temaplates em tempo real.
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'faca' to 'faça', 'temaplates' to 'templates'

Suggested change
Esse projeto permite que renderize templates de vue-email, compile e faca upload para o SES. Além disso é possível fazer uma visualização dos temaplates em tempo real.
Esse projeto permite que renderize templates de vue-email, compile e faça upload para o SES. Além disso é possível fazer uma visualização dos templates em tempo real.

Copilot uses AI. Check for mistakes.
console.log(`✅ Template ${templateName} criado no SES`);
} catch (error) {
if (error.name === 'AlreadyExistsException') {
// Se template ja existe, atualiza
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'ja' to 'já'

Suggested change
// Se template ja existe, atualiza
// Se template existe, atualiza

Copilot uses AI. Check for mistakes.
};

try {
// Tenta criar template
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Comment lacks proper capitalization and punctuation. Should be: "Tenta criar template."

Suggested change
// Tenta criar template
// Tenta criar template.

Copilot uses AI. Check for mistakes.
Comment thread apps/email/package.json
"@vitejs/plugin-vue": "^6.0.1",
"@vue-email/components": "^0.0.21",
"@vue-email/render": "^0.0.9",
"add": "^2.0.6",
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'add' package appears to be a development utility and shouldn't be in production dependencies. This package is commonly added accidentally via incorrect npm/yarn commands.

Suggested change
"add": "^2.0.6",

Copilot uses AI. Check for mistakes.
Comment thread apps/email/package.json
Comment on lines +19 to +20
"vue-router": "4",
"yarn": "^1.22.22"
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'yarn' package should not be listed as a dependency. Package managers should be installed globally, not as project dependencies.

Suggested change
"vue-router": "4",
"yarn": "^1.22.22"
"vue-router": "4"

Copilot uses AI. Check for mistakes.
label: 'Padrão',
description: 'Email de boas-vindas padrão',
props: {
confirmationUrl: 'https://google.com', // todo: mudar para url "real"
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] TODO comment uses placeholder URL. Consider using a more appropriate example domain like 'https://example.com' or the actual application domain.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,51 @@
<script setup lang="ts">
import { computed } from 'vue'
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of import statement, inconsistent with other files in the codebase.

Suggested change
import { computed } from 'vue'
import { computed } from 'vue';

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,36 @@
<script setup lang="ts">
import { computed } from 'vue'
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of import statement, inconsistent with other files in the codebase.

Suggested change
import { computed } from 'vue'
import { computed } from 'vue';

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="">
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lang attribute is empty. It should specify a language code (e.g., 'pt-BR' or 'en') for accessibility and SEO.

Suggested change
<html lang="">
<html lang="en">

Copilot uses AI. Check for mistakes.
};

// Render HTML when template or variant changes
// todo: refactor later
Copy link

Copilot AI Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] TODO comment lacks specificity. Consider describing what specific refactoring is needed or creating a tracking issue.

Suggested change
// todo: refactor later
// TODO: Refactor rendering logic into a composable (e.g., useEmailPreview) for better reusability and testability. See issue #123.

Copilot uses AI. Check for mistakes.
@Joabesv
Copy link
Copy Markdown
Member

Joabesv commented Apr 11, 2026

@mateusbrg ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants