Skip to content

Comments

feat: cleanup on settings-general page#1572

Merged
MrgSub merged 4 commits intostagingfrom
07-01-feat_cleanup_on_settings-general_page
Jul 4, 2025
Merged

feat: cleanup on settings-general page#1572
MrgSub merged 4 commits intostagingfrom
07-01-feat_cleanup_on_settings-general_page

Conversation

@ahmetskilinc
Copy link
Contributor

@ahmetskilinc ahmetskilinc commented Jul 1, 2025

Enhanced Language Selection and UI Improvements in Settings

Description

This PR enhances the language selection in the settings page by displaying full language names instead of locale codes. It also improves the UI of select components and buttons with consistent styling and better alignment.

Summary by CodeRabbit

  • New Features
    • Language selection now displays human-readable language names instead of locale codes in the dropdown.
  • Style
    • Improved styling for language, timezone, and default email alias selection components, including updated hover effects, alignment, and spacing.
  • Chores
    • Added a comprehensive language mapping to support localized names in the interface.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 1, 2025

Walkthrough

A new static mapping of locale codes to human-readable language names was introduced, and the language selection UI was updated to display these names instead of codes. Additional UI styling adjustments were made to dropdown components and labels, affecting presentation and interaction but not core logic.

Changes

File(s) Change Summary
apps/mail/locales.ts Added new module exporting a locales object mapping locale codes to language names.
apps/mail/app/(routes)/settings/general/page.tsx Imported locales and updated language dropdown to show names; applied various UI and styling adjustments.

Possibly related PRs

  • locales #1566: Modified language selection dropdown to use a predefined list of locale strings from a JSON settings file; related to language selection UI changes.
  • i18n #437: Introduced translation hooks and dynamic language change notifications in the settings page, focusing on internationalization enhancements.

Suggested reviewers

  • MrgSub

Poem

In the garden of code, a new map unfurls,
Languages bloom, their names in bright swirls.
Dropdowns now shimmer, with style and with grace,
Locale codes replaced by each language’s face.
A rabbit approves, with a twitch of delight—
UI and language, both shining bright!
🐇🌍✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca609ed and a795cbd.

📒 Files selected for processing (1)
  • apps/mail/app/(routes)/settings/general/page.tsx (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/mail/app/(routes)/settings/general/page.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Cursor BugBot
  • GitHub Check: Analyze (javascript-typescript)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 1, 2025

Deploying zero-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: b669e2a
Status: ✅  Deploy successful!
Preview URL: https://ea8f72a5.zero-staging-c02.pages.dev
Branch Preview URL: https://07-01-feat-cleanup-on-settin.zero-staging-c02.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 1, 2025

Deploying zero-prod with  Cloudflare Pages  Cloudflare Pages

Latest commit: b669e2a
Status: ✅  Deploy successful!
Preview URL: https://c4ab6061.zero-76h.pages.dev
Branch Preview URL: https://07-01-feat-cleanup-on-settin.zero-76h.pages.dev

View logs

@ahmetskilinc ahmetskilinc marked this pull request as ready for review July 1, 2025 00:19
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Enhanced settings page UI with improved language selection functionality and cleaner form design.

  • Added apps/mail/locales.ts providing comprehensive BCP 47 language code mapping to human-readable names
  • Modified apps/mail/app/(routes)/settings/general/page.tsx to display full language names instead of locale codes
  • Improved form controls with consistent height and hover states
  • Removed redundant email alias tooltip and enhanced label alignment
  • Streamlined form field organization for better visual hierarchy

2 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3b21a8 and b669e2a.

📒 Files selected for processing (2)
  • apps/mail/app/(routes)/settings/general/page.tsx (4 hunks)
  • apps/mail/locales.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
apps/mail/app/(routes)/settings/general/page.tsx (1)
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:331-331
Timestamp: 2025-06-28T03:56:09.351Z
Learning: In apps/server/src/trpc/routes/mail.ts, the user indicated they are not using ISO format for the scheduleAt parameter, despite the frontend code showing toISOString() usage in the ScheduleSendPicker component.
apps/mail/locales.ts (2)
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:331-331
Timestamp: 2025-06-28T03:56:09.351Z
Learning: In apps/server/src/trpc/routes/mail.ts, the user indicated they are not using ISO format for the scheduleAt parameter, despite the frontend code showing toISOString() usage in the ScheduleSendPicker component.
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:386-391
Timestamp: 2025-06-27T04:59:29.709Z
Learning: In apps/server/src/trpc/routes/mail.ts, the attachment processing logic conditionally handles mixed attachment types - it preserves existing File-like objects with arrayBuffer methods while only converting serialized attachments that need processing through toAttachmentFiles.
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages: zero-prod
🔇 Additional comments (2)
apps/mail/app/(routes)/settings/general/page.tsx (2)

64-64: UI styling improvements look good.

The consistent application of hover:bg-transparent styling and other UI refinements (explicit height, rounded corners, alignment) enhance the user experience and maintain visual consistency across the settings components.

Also applies to: 71-71, 202-202, 239-239


234-234: Margin adjustment approved.

The !mb-1 margin adjustment for the FormLabel improves the visual spacing and alignment in the form layout.

@ahmetskilinc ahmetskilinc force-pushed the 07-01-feat_cleanup_on_settings-general_page branch from b669e2a to ca609ed Compare July 4, 2025 17:49
@graphite-app
Copy link
Contributor

graphite-app bot commented Jul 4, 2025

Merge activity

  • Jul 4, 6:36 PM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Jul 4, 6:36 PM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Locale Mapping Error Causes Undefined Options

The language dropdown in settings displays 'undefined' or empty options. This occurs when a locale from project.inlang/settings.json is not found in the localesData mapping, causing localesData[locale] to return undefined. The as keyof typeof localesData type assertion bypasses compile-time checks for this mismatch, and there is no fallback to display the locale code itself.

apps/mail/app/(routes)/settings/general/page.tsx#L209-L210

<SelectItem key={locale} value={locale}>
{localesData[locale as keyof typeof localesData]}

Fix in CursorFix in Web


Bug: Form Label Styling Breaks Icon Alignment

The FormLabel className change from "flex items-center gap-1" to "!mb-1" removes the flex layout, causing the InfoIcon to misalign with the label text and appear on a new line instead of being horizontally aligned.

apps/mail/app/(routes)/settings/general/page.tsx#L233-L234

<FormItem>
<FormLabel className="!mb-1">

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@MrgSub MrgSub merged commit 9c7c8cd into staging Jul 4, 2025
8 checks passed
@MrgSub MrgSub deleted the 07-01-feat_cleanup_on_settings-general_page branch July 4, 2025 18:48
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.

2 participants