Skip to content

feat(HtmlTemplates): Improved styles#145

Merged
JonayKB merged 5 commits into
mainfrom
140-change-api-html-templates-of-verification
May 15, 2025
Merged

feat(HtmlTemplates): Improved styles#145
JonayKB merged 5 commits into
mainfrom
140-change-api-html-templates-of-verification

Conversation

@JonayKB
Copy link
Copy Markdown
Owner

@JonayKB JonayKB commented May 15, 2025

No description provided.

@JonayKB JonayKB requested a review from Copilot May 15, 2025 18:06
@JonayKB JonayKB linked an issue May 15, 2025 that may be closed by this pull request
Copy link
Copy Markdown

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 enhances the HTML templates used for various email notifications by consolidating common styles into a constant and updating each template to include consistent styling and layout updates.

  • Introduces a COMMON_STYLES constant for shared style definitions.
  • Updates multiple HTML templates (VERIFICATION_EMAIL, NEED_EMAIL_TOKEN, ERROR, VERIFIED, BAD_REQUEST) to use the new styles and a consistent container structure.

</body>
</html>
""";
""".formatted(COMMON_STYLES, "%s", "%s");
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The use of hardcoded "%s" placeholders in the formatted call for VERIFICATION_EMAIL may be unclear to future maintainers; consider adding inline comments or using descriptive constants to clarify their purpose.

Suggested change
""".formatted(COMMON_STYLES, "%s", "%s");
""".formatted(COMMON_STYLES, EMAIL_PLACEHOLDER, TOKEN_PLACEHOLDER);

Copilot uses AI. Check for mistakes.
</html>
""";
""".formatted(COMMON_STYLES, "%s", "%s");

Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Document the expected content for the "%s" placeholder in the NEED_EMAIL_TOKEN template head to ensure consistency and clarity for future modifications.

Suggested change
// The %s placeholder in the <head> section is intended for including common styles,
// such as those defined in the COMMON_STYLES constant.

Copilot uses AI. Check for mistakes.
</html>
""";
""".formatted(COMMON_STYLES, "%s");

Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Similarly, include documentation or a brief comment for the "%s" placeholder in the VERIFIED template to clarify what content is expected in that position.

Suggested change
// The %s placeholder in the VERIFIED template is replaced with additional styles or metadata for the <head> section.

Copilot uses AI. Check for mistakes.
@JonayKB JonayKB merged commit f6f0a39 into main May 15, 2025
1 check passed
JonayKB added a commit that referenced this pull request Jan 24, 2026
…-verification

feat(HtmlTemplates): Improved styles
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.

Change API HTML templates of verification

2 participants