Skip to content

fix: Settings - General section responsiveness#1557

Closed
samrathreddy wants to merge 2 commits intoMail-0:stagingfrom
samrathreddy:fix/settings-general-mobile-responsiveness
Closed

fix: Settings - General section responsiveness#1557
samrathreddy wants to merge 2 commits intoMail-0:stagingfrom
samrathreddy:fix/settings-general-mobile-responsiveness

Conversation

@samrathreddy
Copy link
Contributor

@samrathreddy samrathreddy commented Jun 30, 2025

Description

In settings general section was not responsive. This PR fixes this issue.


Type of Change

Please delete options that are not relevant.

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature with breaking changes)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • 🔒 Security enhancement
  • ⚡ Performance improvement

Areas Affected

Please check all that apply:

  • Email Integration (Gmail, IMAP, etc.)
  • User Interface/Experience
  • Authentication/Authorization
  • Data Storage/Management
  • API Endpoints
  • Documentation
  • Testing Infrastructure
  • Development Workflow
  • Deployment/Infrastructure

Testing Done

Describe the tests you've done:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Security Considerations

For changes involving data or authentication:

  • No sensitive data is exposed
  • Authentication checks are in place
  • Input validation is implemented
  • Rate limiting is considered (if applicable)

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix/feature works
  • All tests pass locally
  • Any dependent changes are merged and published

Additional Notes

Add any other context about the pull request here.

Screenshots/Recordings

Before:
image

image

After:
image

image


By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

Summary by CodeRabbit

Summary by CodeRabbit

  • Style
    • Improved the layout and responsive styling of the general settings page for a better user experience on different screen sizes.
    • Enhanced spacing, alignment, and sizing of form fields, labels, and switches for consistency and readability.
    • Updated the appearance of the timezone selector and default email alias fields for improved usability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 30, 2025

Walkthrough

This update refines the responsive layout and styling of the general settings page in the mail app. Adjustments focus on flex directions, spacing, alignment, width constraints, and component-specific classes to enhance appearance and usability on various screen sizes. No logic or event handling changes are included.

Changes

File(s) Change Summary
apps/mail/app/(routes)/settings/general/page.tsx Updated responsive layout, flex directions, spacing, width constraints, and component styling for the general settings page UI. No logic changes.

Sequence Diagram(s)

Possibly related PRs

  • fix: mobile layout errors #550: Both PRs modify responsive layout and styling in the same general settings page file, adjusting flex container directions and width constraints for form items to improve mobile responsiveness.

Suggested labels

Low Priority

Suggested reviewers

  • MrgSub

Poem

A rabbit hopped through settings bright,
Tweaking widths and padding right.
Flex turned columns, gaps aligned,
Responsive forms, so well-designed!
No logic changed, just style and grace—
Now every screen’s a cozy place.
🐇✨


📜 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 4d2a289 and cbb96a2.

📒 Files selected for processing (1)
  • apps/mail/app/(routes)/settings/general/page.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/mail/app/(routes)/settings/general/page.tsx
✨ 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

@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: 0

🔭 Outside diff range comments (1)
apps/mail/app/(routes)/settings/general/page.tsx (1)

64-70: md:w-46 is not a valid Tailwind utility – will render no CSS

Tailwind ships widths in even numbers (w-44, w-48, …) or arbitrary values (w-[11.5rem]).
md:w-46 is therefore ignored at runtime, breaking the medium-viewport layout you just fixed.

- className="w-full md:w-46 flex items-center justify-start mt-2 py-1 h-9"
+ className="w-full md:w-48 flex items-center justify-start mt-2 py-1 h-9"
+/* or keep the intended width exactly */
+# className="w-full md:w-[11.5rem] flex items-center justify-start mt-2 py-1 h-9"
🧹 Nitpick comments (3)
apps/mail/app/(routes)/settings/general/page.tsx (3)

295-309: Styling inconsistency between “Zero signature” and “Auto-read” blocks

zeroSignature container lost the subtle shadow that was added to autoRead, leading to a visual mismatch.

-<FormItem className="flex flex-col sm:flex-row max-w-xl items-start sm:items-center justify-between rounded-lg border px-3 py-3 gap-3">
+<FormItem className="flex flex-col sm:flex-row max-w-xl items-start sm:items-center justify-between rounded-lg border px-3 py-3 gap-3 shadow-sm">

Unifying both blocks improves consistency and prevents future design drift.


78-83: Minor UX: focus the search input when the pop-over opens

Users still need an extra click after expanding the timezone list.
Placing focus programmatically makes keyboard navigation smoother.

Quick patch (inside PopoverContent):

<input
   ...
-  onChange={(e) => setTimezoneSearch(e.target.value)}
+  onChange={(e) => setTimezoneSearch(e.target.value)}
+  autoFocus
/>

40-47: Avoid any for translation helper

t is typed as any, forfeiting autocomplete and type-safety across the component tree.
Declare the correct signature from useTranslations().

- t: any;
+ t: ReturnType<typeof useTranslations>;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 59c18be and 4d2a289.

📒 Files selected for processing (1)
  • apps/mail/app/(routes)/settings/general/page.tsx (6 hunks)
🧰 Additional context used
🧠 Learnings (1)
apps/mail/app/(routes)/settings/general/page.tsx (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#1328
File: apps/mail/lib/hotkeys/mail-list-hotkeys.tsx:202-209
Timestamp: 2025-06-18T17:26:50.918Z
Learning: In apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchCategoryByIndex function using hardcoded indices for category hotkeys does not break when users reorder categories, contrary to the theoretical index-shifting issue. The actual implementation has constraints or mechanisms that prevent hotkey targeting issues.
🔇 Additional comments (1)
apps/mail/app/(routes)/settings/general/page.tsx (1)

75-78: Verify arbitrary value support for max-w-[calc(100vw-2rem)]

Using calc() inside an arbitrary value works only on Tailwind ≥ v3.3 with JIT enabled.
If the project is still on an earlier minor or has safelist compilation, this rule will be stripped and the pop-over might overflow on mobile.

Please double-check the Tailwind version / build pipeline.

@samrathreddy samrathreddy changed the title fix: Settings - General page responsiveness & email alias alignment fix: Settings - General section responsiveness & email alias alignment Jun 30, 2025
@SinghaAnirban005
Copy link
Contributor

SinghaAnirban005 commented Jun 30, 2025

@samrathreddy I had raised a PR regarding the misalignment
Would you mind not having those changes in this PR
#1531
Thank You

@samrathreddy samrathreddy changed the title fix: Settings - General section responsiveness & email alias alignment fix: Settings - General section responsiveness Jun 30, 2025
@MrgSub
Copy link
Collaborator

MrgSub commented Jun 30, 2025

Conflicts please

@samrathreddy
Copy link
Contributor Author

@MrgSub resolved 👍

@MrgSub
Copy link
Collaborator

MrgSub commented Jul 4, 2025

conflicts & reopen please

@MrgSub MrgSub closed this Jul 4, 2025
@samrathreddy
Copy link
Contributor Author

Hi @MrgSub , could you please reopen this PR? I’ve resolved the conflicts locally and can push the updates once it's reopened.

This PR directly addresses and fixes the issue: https://feedback.0.email/p/mobile-settings-out-of-bounds.

Thanks!

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.

3 participants