Skip to content

Comments

Fix: settings general mobile responsiveness#1653

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

Fix: settings general mobile responsiveness#1653
samrathreddy wants to merge 4 commits intoMail-0:stagingfrom
samrathreddy:fix/settings-general-mobile-responsiveness

Conversation

@samrathreddy
Copy link
Contributor

@samrathreddy samrathreddy commented Jul 6, 2025

Description

Reopening #1557 after resolving merge conflicts

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

Issue: https://0email.featurebase.app/p/mobile-settings-out-of-bounds


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

  • Style
    • Improved the layout and responsiveness of the general settings page for better usability on small and medium screens.
    • Enhanced spacing, alignment, and layering of form fields and controls for a more consistent appearance.
    • Adjusted component sizing and scroll area height for a cleaner and more accessible interface.
    • Reduced padding and height of loading and spacer elements in the mail list for a more compact display.
    • Increased vertical space for the mail list container to improve content visibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 6, 2025

Walkthrough

The changes update the UI layout and styling of the general settings page in the mail app. Adjustments focus on improving responsiveness and spacing for various form fields, including language, timezone, and email alias selectors, as well as switches, specifically enhancing display on smaller screens. Additionally, minor padding and height adjustments are made in mail list components and the mail layout container height is increased by 49 pixels. No logic or exported entities are modified.

Changes

File(s) Summary of Changes
apps/mail/app/(routes)/settings/general/page.tsx Refactored form layout and styling for responsive design, adjusted widths, margins, spacing for select components and switches; reduced popover scroll area height.
apps/mail/components/mail/mail-list.tsx Reduced padding-top and height of spacer div wrapping loading spinner in MailList component.
apps/mail/components/mail/mail.tsx Increased container height wrapping MailList by removing a 49px subtraction in CSS height calc.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SettingsPage
    participant UIComponents

    User->>SettingsPage: Navigate to General Settings
    SettingsPage->>UIComponents: Render form fields (Language, Timezone, Email Alias, Switches)
    UIComponents-->>SettingsPage: Display responsive layout based on screen size
    SettingsPage-->>User: Show updated, responsive settings form
Loading

Possibly related PRs

  • fix: mobile layout errors #550: Both PRs modify the responsive layout and styling of form elements on the mail app's general settings page to improve mobile and small screen usability.
  • frontend: Settings: Adjust misalignments of placeholders #1531: The main PR's responsive layout and spacing updates to the general settings page build upon and extend the UI alignment improvements made in the retrieved PR, including adjustments to form label flex layouts and InfoIcon sizing in the same file.
  • feat: cleanup on settings-general page #1572: Both PRs modify the UI and styling of the settings-general page in the mail app, focusing on layout, responsiveness, and select component presentation, indicating a related scope of changes to the same components and files.

Suggested labels

Low Priority

Suggested reviewers

  • needleXO

Poem

A bunny hopped through fields of code,
Adjusting rows to lighten the load.
With padding here and margin there,
The settings page got extra care.
Now on screens both big and small,
The layout fits and pleases all!
🐇✨


📜 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 982c91e and e5d8a98.

📒 Files selected for processing (2)
  • apps/mail/components/mail/mail-list.tsx (1 hunks)
  • apps/mail/components/mail/mail.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • apps/mail/components/mail/mail-list.tsx
  • apps/mail/components/mail/mail.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

@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 mobile responsiveness in the general settings page with improved layout adaptations and component spacing.

  • Converted flex row layouts to columns on mobile screens in apps/mail/app/(routes)/settings/general/page.tsx
  • Optimized form element widths with responsive classes for better mobile display
  • Improved spacing and alignment of settings components for smaller screens
  • Added before/after screenshots demonstrating significant improvement in mobile layout
  • Reopened and resolved merge conflicts from previous PR #1557

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

</PopoverTrigger>
<PopoverContent className="w-[300px] p-0" align="start">
<div className="px-3 py-2">
<PopoverContent className="w-[300px] p-0 max-w-[calc(100vw-2rem)] md:max-w-none">
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Add z-index to prevent PopoverContent from being cut off on mobile devices when keyboard is open

@samrathreddy samrathreddy changed the title Fix/settings general mobile responsiveness Fix: settings general mobile responsiveness Jul 6, 2025
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: 1

🧹 Nitpick comments (1)
apps/mail/app/(routes)/settings/general/page.tsx (1)

234-234: Consider removing the !important flag.

The !mb-1 class uses the important flag to override existing styles. This could make the CSS harder to maintain and debug. Consider addressing the root cause of the margin conflict instead.

-<FormLabel className="!mb-1 flex items-center gap-1">
+<FormLabel className="mb-1 flex items-center gap-1">

If this change breaks the layout, investigate and fix the underlying CSS specificity issue.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 38bcc6e and 738c763.

📒 Files selected for processing (1)
  • apps/mail/app/(routes)/settings/general/page.tsx (7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: retrogtx
PR: Mail-0/Zero#1468
File: apps/server/src/trpc/routes/mail.ts:331-331
Timestamp: 2025-06-28T03:56:09.376Z
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/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.376Z
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.
🧬 Code Graph Analysis (1)
apps/mail/app/(routes)/settings/general/page.tsx (6)
apps/mail/components/icons/icons.tsx (1)
  • Clock (1615-1630)
apps/mail/components/ui/button.tsx (1)
  • Button (71-71)
apps/mail/components/ui/scroll-area.tsx (1)
  • ScrollArea (50-50)
apps/mail/components/ui/select.tsx (1)
  • SelectTrigger (140-140)
apps/mail/components/ui/tooltip.tsx (2)
  • Tooltip (72-72)
  • TooltipTrigger (72-72)
apps/mail/components/ui/switch.tsx (1)
  • Switch (27-27)
🔇 Additional comments (9)
apps/mail/app/(routes)/settings/general/page.tsx (9)

71-72: Good responsive width constraints for mobile.

The popover content now properly constrains its width on mobile devices using max-w-[calc(100vw-2rem)] while maintaining the fixed width on larger screens. The padding adjustment also helps with mobile spacing.


193-193: Excellent responsive layout implementation.

The form layout now properly stacks vertically on mobile (flex-col) and horizontally on medium screens (md:flex-row). The alignment and gap adjustments ensure proper spacing across different screen sizes.


202-202: Consistent responsive select trigger width.

The SelectTrigger now uses full width on mobile (w-full) and fixed width on medium screens (md:w-36), maintaining consistency with the TimezoneSelect component's responsive behavior.


238-238: Good spacing adjustment for the info icon.

The icon margin has been properly adjusted to work with the new flex layout and gap spacing.


279-279: Excellent responsive switch layout.

The FormItem now properly stacks vertically on mobile (flex-col) and horizontally on small screens and up (sm:flex-row). The gap spacing and alignment adjustments ensure good UX across different screen sizes.


287-291: Good responsive switch alignment.

The Switch component now has proper margin adjustments (mt-1 sm:mt-0) to align correctly in both vertical and horizontal layouts. The formatting is also clean and consistent.


300-300: Consistent responsive pattern for autoRead switch.

The autoRead switch follows the same responsive pattern as the zeroSignature switch, ensuring UI consistency across the form.


308-312: Consistent switch component styling.

The autoRead Switch component maintains the same responsive margin adjustments as the zeroSignature Switch, ensuring consistent behavior and appearance.


80-80: Verify timezone selection ScrollArea height for UX

Ensure reducing the ScrollArea height from 300px to 250px does not negatively affect browsing through a long list of timezones, especially on smaller screens.

• Location: apps/mail/app/(routes)/settings/general/page.tsx, around line 80
• Action: Manually test the timezone selector on desktop and mobile breakpoints to confirm users can comfortably scroll through all options without excessive clipping.

@samrathreddy samrathreddy force-pushed the fix/settings-general-mobile-responsiveness branch from e5d8a98 to 982c91e Compare July 6, 2025 10:25
@MrgSub
Copy link
Collaborator

MrgSub commented Jul 11, 2025

conflicts and re-open please

@MrgSub MrgSub closed this Jul 11, 2025
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