Skip to content

Conversation

@codebyNJ
Copy link

@codebyNJ codebyNJ commented Nov 13, 2025

image

Description

Fixes the navbar to remain sticky at the top of the page while scrolling.

Changes

  • Changed navbar positioning from absolute to fixed in Hero component
  • Navbar now stays visible at the top (with 4-unit gap) throughout page scroll
  • Maintained responsive width classes for different screen sizes
  • Increased z-index to ensure navbar stays above other content

Testing

  • Navbar remains visible while scrolling
  • Navbar is properly centered on all screen sizes
  • Navbar doesn't overlap with other content

Summary by CodeRabbit

Release Notes

  • New Features
    • Navigation bar now floats at the top of the landing page with enhanced animations and styling
    • Hero section redesigned with gradient overlay for improved visual depth
    • Updated navigation styling with refined colors and smooth transitions for better user experience

@vercel
Copy link

vercel bot commented Nov 13, 2025

@codebyNJ 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 Nov 13, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

The changes relocate the Navbar component from the page and layout files to the Hero section, centralizing it within the hero layout. The Navbar component receives significant styling and animation updates, including modified entrance animations with vertical offset, revised background properties, and updated branding and link styling.

Changes

Cohort / File(s) Summary
Navbar removal from higher-level hierarchy
apps/web/src/app/(main)/(landing)/layout.tsx, apps/web/src/app/(main)/(landing)/page.tsx
Commented out Navbar imports and JSX rendering across both files, removing the component from page and layout-level rendering
Navbar relocation and Hero restructuring
apps/web/src/components/landing-sections/Hero.tsx
Integrated fixed floating Navbar into Hero section; wrapped Hero content in fragment; adjusted padding and responsive spacing; repositioned animations and timing; replaced Get Started button structure; added bottom gradient overlay
Navbar styling and animation updates
apps/web/src/components/landing-sections/navbar.tsx
Updated entrance animation with vertical offset (y: -20 to 0); changed background from translucent neutral to darker semi-transparent with reduced blur; added rounded borders; updated logo and text colors to explicit white; modified link styling with transition-colors; updated initialization logic for constant visibility

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25–30 minutes

Areas requiring extra attention:

  • Hero.tsx: Verify positioning, z-index layering, and responsive spacing adjustments work correctly with the new floating Navbar; ensure animation timing aligns with the new layout structure.
  • navbar.tsx & Hero.tsx interaction: Confirm the Navbar's entrance animation (vertical offset) and background styling integrate seamlessly within the Hero component without visual conflicts or overflow issues.
  • Removed Navbar rendering: Validate that commenting out Navbar in layout.tsx and page.tsx doesn't break any other dependencies or child routes beyond the landing page.

Possibly related PRs

  • PR #129: Modifies the same navbar component with changes to navbar behavior, structure, and UI styling, suggesting parallel refactoring efforts.
  • PR #142: Updates both Hero.tsx and navbar.tsx with overlapping UI and layout changes to navbar and hero sections, indicating related feature development.

Poem

🐰 A navbar takes flight to the hero so bright,
No longer scattered, now fixed in its height,
With smooth sliding entrance and gradient glow,
The hero embraces the nav's elegant show!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: making the navbar sticky throughout the page scrolling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ 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: 1

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

15-35: Drop the unused showNavbar state and scroll listener.
Now that the navbar is meant to stay visible, showNavbar is never read and we still wire up useScroll/useMotionValueEvent, causing unnecessary subscriptions and callbacks on every scroll tick. Please remove the state and listener to avoid the extra overhead.

-import { motion, useScroll, useMotionValueEvent } from "framer-motion";
+import { motion } from "framer-motion";-  const [showNavbar, setShowNavbar] = useState(true);
   const [isOpen, setIsOpen] = useState(false);
…
-  useMotionValueEvent(scrollYProgress, "change", (latest) => {
-    if (!isPricingPage) {
-      // Keep navbar visible, no hiding logic
-      setShowNavbar(true);
-    }
-  });
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5445fd9 and b901d22.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • apps/web/src/app/(main)/(landing)/layout.tsx (1 hunks)
  • apps/web/src/app/(main)/(landing)/page.tsx (1 hunks)
  • apps/web/src/components/landing-sections/Hero.tsx (1 hunks)
  • apps/web/src/components/landing-sections/navbar.tsx (6 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
apps/web/src/components/landing-sections/navbar.tsx (1)
apps/web/src/lib/utils.ts (1)
  • cn (4-6)
apps/web/src/components/landing-sections/Hero.tsx (1)
apps/web/src/components/icons/icons.tsx (1)
  • Terminal (1-5)

Comment on lines +1 to 9
// import Navbar from '@/components/landing-sections/navbar'
import React from 'react'

const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<section>
<Navbar />
{/* <Navbar /> */}
{children}
</section>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Navbar disappears on sibling landing routes.
Commenting out <Navbar /> here means every page that uses this layout (e.g., /pricing) now renders with zero navigation—the navbar only mounts inside Hero, which those pages never render. Users landing on /pricing lose all site navigation, which is a critical regression. Please keep the navbar provided by the layout (and make it sticky there) so every route continues to show it.

-import React from 'react'
-
-const Layout = ({ children }: { children: React.ReactNode }) => {
-    return (
-        <section>
-            {/* <Navbar /> */}
-            {children}
-        </section>
-    )
-}
+import React from 'react'
+import Navbar from '@/components/landing-sections/navbar'
+
+const Layout = ({ children }: { children: React.ReactNode }) => {
+    return (
+        <section className="relative">
+            <div className="fixed top-4 left-1/2 -translate-x-1/2 w-[96%] md:w-[90%] lg:w-[85%] xl:w-[80%] z-50 pointer-events-none">
+                <div className="pointer-events-auto">
+                    <Navbar />
+                </div>
+            </div>
+            <div className="pt-32 sm:pt-36 md:pt-44 lg:pt-36">
+                {children}
+            </div>
+        </section>
+    )
+}
📝 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
// import Navbar from '@/components/landing-sections/navbar'
import React from 'react'
const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<section>
<Navbar />
{/* <Navbar /> */}
{children}
</section>
import React from 'react'
import Navbar from '@/components/landing-sections/navbar'
const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<section className="relative">
<div className="fixed top-4 left-1/2 -translate-x-1/2 w-[96%] md:w-[90%] lg:w-[85%] xl:w-[80%] z-50 pointer-events-none">
<div className="pointer-events-auto">
<Navbar />
</div>
</div>
<div className="pt-32 sm:pt-36 md:pt-44 lg:pt-36">
{children}
</div>
</section>
)
}
🤖 Prompt for AI Agents
In apps/web/src/app/(main)/(landing)/layout.tsx around lines 1 to 9, the Navbar
component was commented out causing pages that use this layout (e.g., /pricing)
to render without navigation; restore the Navbar import and JSX so the layout
always mounts it, and add a sticky positioning class or style to the Navbar
container (e.g., position: sticky; top: 0 or the framework-equivalent class) so
it remains visible across sibling landing routes; ensure the import path is
correct and remove any duplicate Navbar instances inside Hero to avoid double
rendering.

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