Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

The sidebar navigation ("On This Page") scrolled away with page content, forcing users to scroll back to the top to navigate between sections.

Changes

Changed sidebar positioning from static to sticky on desktop (≥1024px):

- 'lg:static lg:top-auto lg:h-auto lg:min-h-[calc(100vh-4rem)]'
+ 'lg:sticky lg:top-16 lg:h-[calc(100vh-4rem)]'

Modified file: src/components/Sidebar.tsx

  • lg:sticky - enables sticky positioning on desktop
  • lg:top-16 - positions sidebar below 64px header
  • lg:h-[calc(100vh-4rem)] - sets viewport-relative height for sticky context

Mobile behavior unchanged (overlay remains toggleable).

Screenshots

Before: Sidebar scrolls away
Before

After: Sidebar stays visible while scrolling
After

Mobile: No change to overlay behavior
Mobile

Original prompt

This section details on the original issue you should resolve

<issue_title>The menu on sidebar should be sticky when we are scrolling down</issue_title>
<issue_description>Currently the menu on the sidebare is not sticky and the user has to come all the way up to change to another page.
This has to be sticky and move along the page scroll.</issue_description>

<agent_instructions>The sidebar is on the specific sections that we have like React.js or JavaScript which contains there navigation to other pages. It should be sticky on the left side so the user can see the navigation when the page content is long.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add sticky functionality to sidebar menu Make sidebar sticky on desktop for persistent navigation access Dec 12, 2025
Copilot AI requested a review from mnaimfaizy December 12, 2025 06:46
@mnaimfaizy mnaimfaizy marked this pull request as ready for review December 13, 2025 01:55
@mnaimfaizy mnaimfaizy merged commit 59dc698 into main Dec 13, 2025
13 checks passed
@mnaimfaizy mnaimfaizy deleted the copilot/make-sidebar-sticky branch December 14, 2025 23:28
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.

The menu on sidebar should be sticky when we are scrolling down

2 participants