Skip to content

Comments

Add missing home link in mobile view in navigation bar#1330

Merged
MrgSub merged 6 commits intoMail-0:stagingfrom
kartik-212004:bug/navbar-home-link
Jun 20, 2025
Merged

Add missing home link in mobile view in navigation bar#1330
MrgSub merged 6 commits intoMail-0:stagingfrom
kartik-212004:bug/navbar-home-link

Conversation

@kartik-212004
Copy link
Contributor

@kartik-212004 kartik-212004 commented Jun 17, 2025

Fixes a missing home link in the mobile navbar. Previously, users could not navigate back to the homepage when using the mobile menu. This update adds the appropriate link to improve usability on smaller devices.

Resolves: #1329


Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Areas Affected

  • User Interface/Experience

Testing Done

  • Manual testing performed
    Verified the home link appears in the mobile view and correctly redirects to the homepage.
  • Mobile responsiveness verified (UI changes)

Security Considerations

  • No sensitive data is exposed

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
  • My changes generate no new warnings
  • I have added tests that prove my fix/feature works
  • All tests pass locally

Screenshots/Recordings

homelink.mp4

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

Summary by CodeRabbit

  • New Features
    • Made the mobile navigation header logo clickable, directing users to the homepage.
    • Added a "Home" link at the top of the mobile navigation menu for easier access to the homepage.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 17, 2025

"""

Walkthrough

The mobile navigation component was updated to make the logo in the navigation sheet clickable, linking to the homepage. Additionally, a new "Home" link was added at the top of the mobile navigation menu's link list. Layout adjustments were made to support these changes.

Changes

File(s) Change Summary
apps/mail/components/navigation.tsx Made logo a clickable link to "/", added "Home" link to navigation menu, updated container layout.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MobileNavSheet
    participant Homepage

    User->>MobileNavSheet: Open navigation menu
    User->>MobileNavSheet: Tap logo or "Home" link
    MobileNavSheet->>Homepage: Navigate to "/"
Loading

Assessment against linked issues

Objective Addressed Explanation
Add a "Home" link in the mobile navigation menu (#1329)
Make the logo clickable and redirect to the homepage in mobile view (#1329)

Suggested reviewers

  • MrgSub
  • ahmetskilinc

Poem

A hop to Home, now just a tap,
The logo leads you—no more gap!
The menu’s grown, a link anew,
For mobile friends, a clearer view.
With every click, a rabbit’s cheer,
Navigation’s fixed—let’s all hop here! 🐇✨
"""


📜 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 9329bb0 and 64a4cf5.

📒 Files selected for processing (1)
  • apps/mail/components/navigation.tsx (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/mail/components/navigation.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: 2

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 31229e8 and c4b9cea.

📒 Files selected for processing (1)
  • apps/mail/components/navigation.tsx (1 hunks)

Comment on lines 235 to 239
<div className="space-y-3 flex flex-col">
<Link to="/" className="mt-2">
Home
</Link>
<Link to="/pricing" className="mt-2">
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Ensure the sheet closes when a menu item is tapped

On mobile, the navigation drawer (Sheet) stays open after clicking “Home”, forcing users to manually dismiss it. Invoke setOpen(false) via onClick to deliver the expected UX.

- <Link to="/" className="mt-2">
+ <Link to="/" className="mt-2" onClick={() => setOpen(false)}>
     Home
   </Link>

Consider doing the same for the remaining internal links for consistency.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="space-y-3 flex flex-col">
<Link to="/" className="mt-2">
Home
</Link>
<Link to="/pricing" className="mt-2">
<div className="space-y-3 flex flex-col">
<Link to="/" className="mt-2" onClick={() => setOpen(false)}>
Home
</Link>
<Link to="/pricing" className="mt-2">
🤖 Prompt for AI Agents
In apps/mail/components/navigation.tsx around lines 235 to 239, the navigation
drawer (Sheet) does not close when clicking the "Home" link, causing poor UX on
mobile. Add an onClick handler to the Link component that calls setOpen(false)
to close the drawer when the link is tapped. Apply the same onClick handler to
all other internal Link components in the navigation menu to maintain consistent
behavior.

Copy link
Collaborator

@MrgSub MrgSub left a comment

Choose a reason for hiding this comment

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

please address coderabbit

Copy link
Collaborator

@MrgSub MrgSub left a comment

Choose a reason for hiding this comment

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

Please address coderabbit

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

🔭 Outside diff range comments (1)
apps/mail/components/navigation.tsx (1)

255-291: ❌ Missing closing </div> breaks JSX tree

<div className="flex flex-col space-y-3"> opened on line 255 is never closed before </SheetContent>.
The parse error reported by Biome stems from this.

@@
               {resources.map((resource) => {
                 const Icon = IconComponent[resource.platform];
                 return (
                   <Link
                     key={resource.title}
                     to={resource.href}
                     className="flex items-center gap-2 font-medium"
                   >
                     {resource.platform && <Icon className="dark:fill-muted-foreground h-5 w-5" />}
                   </Link>
                 );
               })}
-            </div>
+            </div>           {/* closes resources grid */}
+            </div>           {/* closes column started on line 255 */}
           </SheetContent>
🧹 Nitpick comments (2)
apps/mail/components/navigation.tsx (2)

255-259: Minor style consistency

All other nav items use font-medium; the new “Home” link does not.
Add the same class so text weight is consistent.

-<Link to="/" className="mt-2" onClick={() => setOpen(false)}>
+<Link to="/" className="mt-2 font-medium" onClick={() => setOpen(false)}>

158-164: Use Link instead of <a> for internal /pricing route

Desktop “Pricing” button triggers a full-page reload.
Swap to Link (already imported) and close the sheet in mobile for parity.

-<a href="/pricing">
+<Link to="/pricing" onClick={() => setOpen(false)}>
 ...
-</a>
+</Link>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9f4e0ff and 9329bb0.

📒 Files selected for processing (1)
  • apps/mail/components/navigation.tsx (7 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
apps/mail/components/navigation.tsx

[error] 253-253: Expected corresponding JSX closing tag for 'div'.

Opening tag

closing tag

(parse)


[error] 219-219: Expected corresponding JSX closing tag for 'SheetContent'.

Opening tag

closing tag

(parse)

🔇 Additional comments (1)
apps/mail/components/navigation.tsx (1)

281-286: External targets should open in new tab & add rel

The social links now use React Router Link with absolute URLs.
Link is intended for internal routing; for external destinations prefer <a> with target="_blank" rel="noopener noreferrer"> to avoid SPA mis-routing.

No code diff provided as this is a wider pattern – please revise or confirm intent.

@MrgSub MrgSub merged commit ce4002a into Mail-0:staging Jun 20, 2025
3 checks passed
krakenftw pushed a commit to krakenftw/Zero that referenced this pull request Jun 24, 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.

Bug Report: No Home Page Redirect in Mobile View

2 participants