Skip to content

Comments

feat: reorganize dropdown menu footer for better UX - Move Toggle The…#2010

Merged
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
mohdyasin4:feature/dark-light-mode-toggle-1998
Aug 29, 2025
Merged

feat: reorganize dropdown menu footer for better UX - Move Toggle The…#2010
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
mohdyasin4:feature/dark-light-mode-toggle-1998

Conversation

@mohdyasin4
Copy link
Contributor

@mohdyasin4 mohdyasin4 commented Aug 28, 2025

Theme, Help, Logout, and Privacy/Terms to footer section - Address issue #1998

Description

Please provide a clear description of your changes.


Type of Change

  • 🎨 UI/UX improvement

Areas Affected

  • User Interface/Experience

Testing Done

  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

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

Screenshots/Recordings

Add screenshots or recordings here if applicable.
image

2025-08-28.17-56-38.mp4

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


Summary by cubic

Reorganized the user dropdown to move Theme toggle, Help, Logout, and Privacy/Terms into a footer section for clearer hierarchy and consistency. Aligns with issue #1998 by making the dark/light mode toggle easier to find without cluttering primary actions.

  • UI Improvements
    • Grouped Theme, Help, Logout, and Privacy/Terms at the bottom with separators.
    • Applied the same layout to both dropdown variants for consistent behavior.
    • Kept Settings prominent; Debug section stays above the footer.
    • No functional changes, only item order and placement.

Summary by CodeRabbit

  • Refactor
    • Reorganized the user menu: theme toggle, customer support, logout, and Privacy/Terms now appear in the expanded dropdown under a dedicated section, separated for clarity.
    • Simplified the collapsed dropdown by removing these items to reduce clutter; core items like Settings remain unchanged.
    • Added clear visual separation in the expanded menu for quicker access to support and account actions.
    • No changes to overall functionality—just a cleaner, more consistent navigation experience.

…me, Help, Logout, and Privacy/Terms to footer section - Address issue Mail-0#1998
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 28, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbit review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Reorganized NavUser menu items: removed theme toggle, support, logout, and privacy/terms from the collapsed dropdown; added them to the expanded dropdown under a new section with a separator. Implemented theme toggle icon logic and added links for Discord support, logout action, and privacy/terms.

Changes

Cohort / File(s) Summary
NavUser menu restructuring
apps/mail/components/ui/nav-user.tsx
Moved theme toggle, customer support, logout, and privacy/terms from collapsed to expanded menu; added separator and “Debug” section; implemented conditional Moon/Sun icon for theme; wired actions: handleThemeToggle, handleLogout; kept existing settings and other items intact.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant NavUser as NavUser Dropdown
  participant Theme as Theme Manager
  participant Router as Router/Links
  participant Auth as Auth Handler

  rect rgb(240,245,250)
    note over User,NavUser: Collapsed menu
    User->>NavUser: Open collapsed dropdown
    NavUser-->>User: Show basic items (no theme/support/logout)
  end

  rect rgb(238,250,240)
    note over User,NavUser: Expanded menu
    User->>NavUser: Open expanded dropdown
    NavUser-->>User: Show items incl. Theme, Support, Logout, Privacy/Terms
    alt Toggle theme
      User->>NavUser: Click Theme Toggle
      NavUser->>Theme: handleThemeToggle()
      Theme-->>NavUser: New theme state
      NavUser-->>User: Update icon (Sun/Moon)
    end
    alt Open support
      User->>Router: Navigate to https://discord.gg/mail0
    end
    alt Logout
      User->>NavUser: Click Logout
      NavUser->>Auth: handleLogout()
      Auth-->>User: Session cleared / redirect
    end
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

design

Suggested reviewers

  • MrgSub
  • ahmetskilinc

Poem

Stars align in the sidebar night,
Sun to Moon with a single bite. 🌙☀️
Support’s a jump, logout’s clean,
Privacy whispers in the green.
Menus reflow, sleek and tight—
Ship it fast, make it right. 🚀

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit 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:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@coderabbitai coderabbitai bot requested review from MrgSub and ahmetskilinc August 28, 2025 12:34
@coderabbitai coderabbitai bot added the design Improvements & changes to design & UX label Aug 28, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

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: 5

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7c6b4 and 16f7aac.

📒 Files selected for processing (1)
  • apps/mail/components/ui/nav-user.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{css,js,ts,jsx,tsx,mdx}

📄 CodeRabbit inference engine (.cursor/rules/tailwind-css-v4.mdc)

**/*.{css,js,ts,jsx,tsx,mdx}: Chain variants together for composable variants (e.g., group-has-data-potato:opacity-100).
Use new variants such as starting, not-*, inert, nth-*, in-*, open (for :popover-open), and ** for all descendants.
Do not use deprecated utilities like bg-opacity-*, text-opacity-*, border-opacity-*, and divide-opacity-*; use the new syntax (e.g., bg-black/50).
Use renamed utilities: shadow-sm is now shadow-xs, shadow is now shadow-sm, drop-shadow-sm is now drop-shadow-xs, drop-shadow is now drop-shadow-sm, blur-sm is now blur-xs, blur is now blur-sm, rounded-sm is now rounded-xs, rounded is now rounded-sm, outline-none is now outline-hidden.
Use bg-(--brand-color) syntax for CSS variables in arbitrary values instead of bg-[--brand-color].
Stacked variants now apply left-to-right instead of right-to-left.

Files:

  • apps/mail/components/ui/nav-user.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (AGENT.md)

**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes
Limit lines to 100 characters
Semicolons are required

Files:

  • apps/mail/components/ui/nav-user.tsx
**/*.{js,jsx,ts,tsx,css}

📄 CodeRabbit inference engine (AGENT.md)

Use Prettier with sort-imports and Tailwind plugins

Files:

  • apps/mail/components/ui/nav-user.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENT.md)

Enable TypeScript strict mode

Files:

  • apps/mail/components/ui/nav-user.tsx
🧬 Code graph analysis (1)
apps/mail/components/ui/nav-user.tsx (1)
apps/mail/components/ui/dropdown-menu.tsx (2)
  • DropdownMenuSeparator (176-176)
  • DropdownMenuItem (172-172)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🔇 Additional comments (1)
apps/mail/components/ui/nav-user.tsx (1)

335-335: Good move. Footer placement reads better.

Separator + grouping are in the right spot in both menus. Nice UX upgrade.

Also applies to: 586-586

@ahmetskilinc
Copy link
Contributor

please got through the coderabbit recommendations

…elect instead of onClick for better accessibility - Use resolvedTheme for more accurate theme detection - Add asChild prop for proper link handling - Improve security with noopener noreferrer
@mohdyasin4
Copy link
Contributor Author

mohdyasin4 commented Aug 28, 2025

please got through the coderabbit recommendations

Done sir! @ahmetskilinc

@ahmetskilinc ahmetskilinc merged commit 7c2cb5d into Mail-0:staging Aug 29, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design Improvements & changes to design & UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants