Skip to content

Conversation

@M0hitThapa
Copy link

@M0hitThapa M0hitThapa commented Dec 3, 2025

Fixed the responsiveness issue in navbar for tablet viewport.

Before:
Screenshot from 2025-12-03 21-50-20

After:
Screenshot from 2025-12-03 21-50-44

Summary by CodeRabbit

  • Style
    • Improved navbar responsiveness across mobile, tablet, and desktop viewports with refined layout and padding.
    • Enhanced navigation menu visibility breakpoints and styling for better user experience.
    • Optimized mobile dropdown menu with improved typography and visibility settings.
    • Updated navigation link styling with better spacing and visual hierarchy.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 3, 2025

@M0hitThapa is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@cla-assistant
Copy link

cla-assistant bot commented Dec 3, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

This PR refactors the Navbar component's responsive layout and styling by adjusting Tailwind CSS classes for padding, widths, visibility breakpoints, typography scaling, and spacing. It updates mobile menu toggle breakpoints from md:hidden to lg:hidden, refines typography hierarchy, and modifies button and icon sizing across responsive states.

Changes

Cohort / File(s) Summary
Navbar responsive styling
apps/web/src/components/landing-sections/navbar.tsx
Updated Tailwind classes for responsive layout (padding, widths), visibility breakpoints (md:hidden → lg:hidden), typography scaling (text-lg/sm:text-xl → text-2xl), navigation link styling (whitespace-nowrap, transition-colors), button/icon sizing, and mobile menu panel adjustments

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Tailwind class refactoring: Review breakpoint changes and ensure consistency across responsive states (md, lg, xl)
  • Visibility behavior: Verify toggle button and navigation link visibility at new breakpoints (lg:hidden vs md:hidden)
  • Typography hierarchy: Confirm text scaling updates align with design intent (text-lg/sm:text-xl/lg text-2xl)

Possibly related issues

Possibly related PRs

Poem

🐰 Hoppy navbar hops so spry,
Breakpoints dance from wide to shy,
Tailwind tweaks make it divine,
Mobile and desktop now align!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: fixing navbar responsive issues through Tailwind class adjustments for various breakpoints and layout refinements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/src/components/landing-sections/navbar.tsx (1)

96-112: replace hardcoded hex colors with design-token tailwind classes

the desktop “contribute” cta currently uses raw hex values:

className="hidden xl:flex items-center gap-2 px-3 py-2 bg-[#0d1117] hover:bg-[#161b22] transition-colors rounded-lg border border-[#30363d] text-white"

per the frontend rules for apps/web/src/components/**/*, components should never use hardcoded hex colors and should instead use semantic tailwind classes wired to the design tokens (e.g., bg-surface-primary, hover:bg-surface-primary-hover, border-border-subtle, text-text-primary, etc., depending on what’s defined in your design system).

suggestion:

  • replace bg-[#0d1117], hover:bg-[#161b22], and border-[#30363d] with the appropriate semantic background and border classes from design-tokens.ts / tailwind.config.ts.
  • while you’re at it, consider updating the matching mobile “contribute” button (line 135) to use the same tokenized classes for consistency.

the PrimaryButton padding / text sizing and the Terminal icon size adjustments look good and align with the responsive behavior you’re targeting.

as per coding guidelines / learnings, hardcoded hex values should be replaced with semantic design-token classes.

🧹 Nitpick comments (3)
apps/web/src/components/landing-sections/navbar.tsx (3)

55-56: align large container radii with design-system guidance

both the fixed navbar (rounded-3xl) and the mobile menu panel (rounded-3xl) are treated as large surface elements. per the frontend rules, large elements should use rounded-2xl, not rounded-3xl. consider updating both to match the design system.

example for the fixed navbar:

-          ? "relative h-max md:w-full top-0 border-b"
-          : "fixed rounded-3xl top-4 border w-[95%] sm:w-[90%] lg:w-[85%] xl:w-[80%] mx-auto left-1/2 -translate-x-1/2"
+          ? "relative h-max md:w-full top-0 border-b"
+          : "fixed rounded-2xl top-4 border w-[95%] sm:w-[90%] lg:w-[85%] xl:w-[80%] mx-auto left-1/2 -translate-x-1/2"

and similarly for the mobile panel’s rounded-3xl in the class list.

as per coding guidelines, large elements should use rounded-2xl.

Also applies to: 118-119


58-77: tablet breakpoint & brand block changes improve responsiveness; add aria-controls

switching the toggle button to lg:hidden and the logo/title sizing (text-lg sm:text-xl lg:text-2xl with truncate and min-w-0) is a good adjustment for tablet widths and reduces overflow.

for accessibility, it’d be good to connect the toggle button to the mobile menu panel via aria-controls:

-        <button
-          className="lg:hidden text-white"
+        <button
+          className="lg:hidden text-white"
           onClick={() => setIsOpen(!isOpen)}
           aria-label="Toggle navigation menu"
           aria-expanded={isOpen}
+          aria-controls="navbar-menu"
         >

and give the mobile menu container an id:

-        <motion.div
+        <motion.div
+          id="navbar-menu"

this makes the relationship explicit for screen readers.

as per coding guidelines / learnings, include proper aria attributes on interactive components.


79-95: desktop & mobile link styling are solid; consider active-state & semantic color improvements

the updated link styles (whitespace-nowrap, transition-colors, and tightened font sizes in the mobile menu) are good for responsiveness and readability.

two refinements to consider:

  1. active state for hash links
    const isActive = pathname === link.href; will only ever be true for plain paths like "/pricing". links such as "/#features" will never match pathname from usePathname(), so they’ll never show the active color. if you want section links to have an active state, you may need to account for the hash (e.g., via window.location.hash on the client or using router segment helpers) or maintain active state differently.

  2. semantic text colors in the mobile menu
    here:

    className="text-white hover:text-gray-300 text-base sm:text-lg"

    consider using semantic text tokens from the design system (e.g., text-text-primary hover:text-text-secondary) instead of raw palette names, to keep colors consistent with text-text-tertiary used on the desktop nav. exact token names should come from design-tokens.ts / tailwind.config.ts.

based on learnings, colors should be expressed via semantic design-token classes.

Also applies to: 125-128

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cdc72d and a75ea54.

📒 Files selected for processing (1)
  • apps/web/src/components/landing-sections/navbar.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Always use lowercase when writing comments
Avoid unnecessary comments; code should be self-documenting when possible
Use comments to explain 'why', not 'what'
Remove unused imports
Use UPPER_SNAKE_CASE for constants
Use camelCase for functions and variables

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
apps/web/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

apps/web/src/**/*.{ts,tsx}: Always follow the design system defined in apps/web/src/lib/design-tokens.ts and apps/web/tailwind.config.ts
NEVER use hardcoded hex values (e.g., #5519f7) directly in components; ALWAYS reference colors from the design token system using Tailwind classes
Use semantic color names that describe purpose, not appearance
Use font-sans for standard UI text (Geist Sans) and font-mono for code, technical content, or monospace needs (DM Mono)
Follow Tailwind's spacing scale (0.25rem increments); for section padding use mobile p-4 (1rem) and desktop p-[60px]
Use appropriate border radius: small elements rounded-lg, medium rounded-xl, large rounded-2xl, buttons rounded-[16px]
Use animation durations: fast duration-100 (0.1s), normal duration-300 (0.3s), slow duration-600 (0.6s)

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,ts}: Prefer functional components with TypeScript and use proper TypeScript types, avoid any
Extract reusable logic into custom hooks
Use descriptive prop names and define prop types using TypeScript interfaces or types
Prefer controlled components over uncontrolled
Use zustand for global state (located in src/store/)
Use absolute imports from @/ prefix when available
Include proper aria labels for accessibility
Ensure keyboard navigation works
Maintain proper heading hierarchy
Provide alt text for images
Avoid unnecessary re-renders

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Organize imports: react → third-party → local components → utils → types

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx}: Use PascalCase for types and interfaces with descriptive names
Use dynamic imports for code splitting when appropriate
Memoize expensive computations

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
apps/web/src/**/*.{tsx,ts}

📄 CodeRabbit inference engine (.cursorrules)

Optimize images using next/image

apps/web/src/**/*.{tsx,ts}: Use Zustand for global state, located in src/store/
Use PascalCase for types and interfaces with descriptive names
Use dynamic imports for code splitting when appropriate
Optimize images using next/image
Memoize expensive computations
Define a type when defining const functions

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
**/*.{js,jsx,ts,tsx,py,java,go,rb,php}

📄 CodeRabbit inference engine (.cursor/rules/general_rules.mdc)

**/*.{js,jsx,ts,tsx,py,java,go,rb,php}: Always use lowercase when writing comments
Avoid unnecessary comments; code should be self-documenting when possible
Use comments to explain 'why', not 'what'

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
apps/web/src/components/**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/components/**/*.{tsx,ts,jsx,js}: Never use hardcoded hex values directly in components; always reference colors from the design token system using Tailwind classes
Use semantic color names from the design token system that describe purpose, not appearance (e.g., bg-brand-purple, bg-surface-primary, text-text-primary)
Use font-sans for standard UI text (Geist Sans) and font-mono for code, technical content, or monospace needs (DM Mono)
Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop
Use rounded-lg (0.5rem) for small elements, rounded-xl (1rem) for medium elements, rounded-2xl (1.5rem) for large elements, and rounded-[16px] for buttons
Use duration-100 (0.1s) for fast transitions, duration-300 (0.3s) for normal transitions, and duration-600 (0.6s) for slow transitions
Use available custom animations: animate-accordion-down, animate-accordion-up, animate-scrollRight, animate-scrollLeft, animate-customspin, animate-spin-slow, animate-spin-slow-reverse, animate-marquee, animate-marquee-vertical, animate-shine
Prefer functional components with TypeScript
Extract reusable logic into custom hooks
Prefer controlled components over uncontrolled
Include proper aria labels for accessibility
Ensure keyboard navigation works in interactive components
Maintain proper heading hierarchy in page components
Provide alt text for images
Use 'class:' instead of the ternary operator in class tags whenever possible
Implement accessibility features on interactive elements (e.g., tabindex='0', aria-label, onClick, onKeyDown)
Always follow the design system defined in apps/web/src/lib/design-tokens.ts and apps/web/tailwind.config.ts

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
apps/web/src/components/**/*.{tsx,ts}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/components/**/*.{tsx,ts}: Use proper TypeScript types and avoid using any type
Use descriptive prop names and define prop types using TypeScript interfaces or types
Name components using PascalCase (e.g., UserProfile.tsx)

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
apps/web/src/**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (apps/web/.cursor/rules/frontend_rules.mdc)

apps/web/src/**/*.{tsx,ts,jsx,js}: Organize imports in order: React → third-party → local components → utils → types
Use absolute imports from @/ prefix when available
Remove unused imports
Use UPPER_SNAKE_CASE for constants
Use camelCase for functions and variables
Always use Tailwind classes for styling HTML elements; avoid using CSS or style tags
Use descriptive variable and function names; name event functions with a 'handle' prefix (e.g., handleClick, handleKeyDown)
Use const with arrow functions instead of function declarations (e.g., 'const toggle = () =>')

Files:

  • apps/web/src/components/landing-sections/navbar.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Follow Tailwind's spacing scale for section padding: p-4 (1rem) on mobile, p-[60px] on desktop

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:34:30.473Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T07:34:30.473Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Follow Tailwind's spacing scale (0.25rem increments); for section padding use mobile `p-4` (1rem) and desktop `p-[60px]`

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:34:30.473Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T07:34:30.473Z
Learning: Applies to **/*.{tsx,ts} : Maintain proper heading hierarchy

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Always follow the design system defined in `apps/web/src/lib/design-tokens.ts` and `apps/web/tailwind.config.ts`

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Include proper aria labels for accessibility

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:34:30.473Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T07:34:30.473Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Always follow the design system defined in `apps/web/src/lib/design-tokens.ts` and `apps/web/tailwind.config.ts`

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Maintain proper heading hierarchy in page components

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:34:30.473Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T07:34:30.473Z
Learning: Applies to apps/web/src/**/*.{ts,tsx} : Use appropriate border radius: small elements `rounded-lg`, medium `rounded-xl`, large `rounded-2xl`, buttons `rounded-[16px]`

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:34:30.473Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T07:34:30.473Z
Learning: Applies to **/*.{tsx,ts} : Include proper aria labels for accessibility

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts} : Name components using PascalCase (e.g., UserProfile.tsx)

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
📚 Learning: 2025-11-25T07:35:19.071Z
Learnt from: CR
Repo: apsinghdev/opensox PR: 0
File: apps/web/.cursor/rules/frontend_rules.mdc:0-0
Timestamp: 2025-11-25T07:35:19.071Z
Learning: Applies to apps/web/src/components/**/*.{tsx,ts,jsx,js} : Use rounded-lg (0.5rem) for small elements, rounded-xl (1rem) for medium elements, rounded-2xl (1.5rem) for large elements, and rounded-[16px] for buttons

Applied to files:

  • apps/web/src/components/landing-sections/navbar.tsx
🧬 Code graph analysis (1)
apps/web/src/components/landing-sections/navbar.tsx (2)
apps/web/src/lib/utils.ts (1)
  • cn (4-6)
apps/web/src/components/icons/icons.tsx (2)
  • Github (195-197)
  • Terminal (1-5)
🔇 Additional comments (1)
apps/web/src/components/landing-sections/navbar.tsx (1)

49-52: navbar animation & base layout look good

the motion-based fade in/out tied to showNavbar looks correct and keeps the nav hidden on non‑pricing pages until scroll, while always showing it on /pricing. padding and backdrop classes are consistent with the rest of the header.

@M0hitThapa
Copy link
Author

Hi @apsinghdev! I noticed this issue and implemented some small changes that resolves it.
Please take a look when you get a chance and let me know if you'd like any adjustments. 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.

1 participant