Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Right sidebars on section pages now use sticky positioning to remain visible while scrolling through long content, improving navigation accessibility and user engagement.

Changes

  • Modified SectionLayout.tsx sidebar container to add lg:sticky lg:top-6 lg:self-start lg:z-20
    • Sticky positioning only on lg: breakpoint (≥1024px) where sidebar is visible
    • top-6 spacing prevents header overlap
    • z-20 maintains proper stacking order below header (z-50) and left sidebar (z-30)
// Before
<div className={sectionClasses.sidebar}>{sidebar}</div>

// After
<div className={`${sectionClasses.sidebar} lg:sticky lg:top-6 lg:self-start lg:z-20`}>{sidebar}</div>

Impact

Affects all section pages using SectionLayout component: JavaScript, TypeScript, Python, React, Next.js, Data Structures, Big-O, System Design, RxJS, and Git.

Screenshots

Before scrolling:
Initial view

After scrolling - sidebar remains accessible:
Scrolled view

Data Structures page example:
Data structures

React page example:
React page

Original prompt

This section details on the original issue you should resolve

<issue_title>On the Pages where we have the right sidebar and the page is long it also should scroll along the content.</issue_title>
<issue_description>We have some pages that are having a sidebar to the right. It should be sticky when we are scrolling to the long content and give a user better experience to engage and clicking to any other pages.</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 12, 2025 06:49
Co-authored-by: mnaimfaizy <34773846+mnaimfaizy@users.noreply.github.com>
…ence

Co-authored-by: mnaimfaizy <34773846+mnaimfaizy@users.noreply.github.com>
Co-authored-by: mnaimfaizy <34773846+mnaimfaizy@users.noreply.github.com>
Copilot AI changed the title [WIP] Make right sidebar sticky during page scroll Add sticky positioning to right sidebar for persistent navigation access Dec 12, 2025
Copilot AI requested a review from mnaimfaizy December 12, 2025 06:59
@mnaimfaizy mnaimfaizy marked this pull request as ready for review December 14, 2025 23:19
@mnaimfaizy
Copy link
Owner

@copilot LGTM 😄

@mnaimfaizy mnaimfaizy merged commit b3f7fc6 into main Dec 14, 2025
8 checks passed
@mnaimfaizy mnaimfaizy deleted the copilot/make-sidebar-sticky-on-scroll branch December 14, 2025 23:27
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.

On the Pages where we have the right sidebar and the page is long it also should scroll along the content.

2 participants