Skip to content

Ref : Extracted Navbar into smaller sub-components #2085#2159

Merged
dipexplorer merged 1 commit into
RatLoopz:mainfrom
hrx01-dev:Ref/Extract-Navbar-into-smaller-sub-components#2085
Jun 20, 2026
Merged

Ref : Extracted Navbar into smaller sub-components #2085#2159
dipexplorer merged 1 commit into
RatLoopz:mainfrom
hrx01-dev:Ref/Extract-Navbar-into-smaller-sub-components#2085

Conversation

@hrx01-dev

Copy link
Copy Markdown
Contributor

🛑 STOP: Assignment & File Scope Check

  • I am assigned to this issue.
  • I verified that this PR ONLY touches the required files.

Warning

PRs with unrelated files will not be reviewed and may be closed.

📋 PR Summary & Link

  • **Closes [Refactor] Extract Navbar into smaller sub-components #2085 **

  • Summary:

  • Created DesktopNavLinks.tsx

    • Extracted the main desktop navigation items (How it works, Alerts) and the Tools dropdown menu (Pharmacy Map, Calculator, Scheme Eligibility).
    • The component now manages its own isFeaturesOpen state and specific click-outside logic, reducing state clutter in the main Navbar.tsx.
  • UserDropdown.tsx

    • Extracted the authenticated user dropdown menu (Profile, My Reports, Schedule, Settings, Sign Out) and the unauthenticated Sign In button.
    • It receives session, authLoading, and the handleSignOut function as props, managing its own isProfileOpen state.
  • Created MobileMenu.tsx

    • Extracted the mobile "Hamburger" menu which contains all links, the user dropdown links, and the LanguageSwitcher / ThemeToggle.
    • The isMenuOpen state is passed down from Navbar.tsx so that the main component can still render the dark overlay backdrop when the menu is active
  • MobileBottomNav.tsx

    • Extracted the bottom navigation bar displayed on mobile screens (Scans, Map, Alerts, Profile).
    • Receives isNavVisible to handle the hide-on-scroll animations cleanly.
  • Updated Navbar.tsx

    • Removed over 450 lines of JSX and state management.
      • The Navbar.tsx file is now a clean orchestrator, handling global layout constraints, scroll listener (for isNavVisible), Supabase session state, and rendering the extracted components.

📸 Proof of Work (Screenshots / Logs)

Important

No Pull Request will be merged without proof of testing!

  • Frontend/UI changes: You MUST attach screenshots or screen recordings (GIFs/Videos) showing the UI changes.

Please drag & drop your screenshots/GIFs here:

🏷️ PR Type

  • 🐛 type: bug
  • type: feature
  • 📖 type: docs
  • 🧪 type: testing
  • 🔒 type: security
  • type: performance
  • 🎨 type: design
  • ♻️ type: refactor
  • 🛠️ type: devops
  • type: accessibility

✅ Checklist

  • My PR has a linked issue (Closes #123)
  • I have pulled the latest main and resolved any conflicts

@github-project-automation github-project-automation Bot moved this to 📥 Backlog in SahiDawa Workflow Jun 20, 2026
@github-actions github-actions Bot added good first issue Good for newcomers gssoc:approved Approved for gssoc level:intermediate 35 pts quality:clean multiplier x1.2 status: open-for-all type:refactor Code structure cleanup without behavior change labels Jun 20, 2026
@dipexplorer dipexplorer merged commit 567d3e4 into RatLoopz:main Jun 20, 2026
13 of 14 checks passed
@github-project-automation github-project-automation Bot moved this from 📥 Backlog to 🎉 Merged in SahiDawa Workflow Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @hrx01-dev! Your Pull Request " Ref : Extracted Navbar into smaller sub-components #2085" has been successfully merged by @dipexplorer.

Thank you for your valuable contribution to SahiDawa! 🇮🇳
If this was for GSSoC 2026, your work is officially merged and valid. Keep up the great work and feel free to claim other open issues. 🚀

Follow us on LinkedIn: https://www.linkedin.com/company/ratloopz/ to get shoutout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers gssoc:approved Approved for gssoc level:intermediate 35 pts quality:clean multiplier x1.2 status: open-for-all type:refactor Code structure cleanup without behavior change

Projects

Status: 🎉 Merged

Development

Successfully merging this pull request may close these issues.

[Refactor] Extract Navbar into smaller sub-components

2 participants