Skip to content

Fix: Sticky main header for persistent access while scrolling - #787

Merged
Asrani-Aman merged 2 commits into
CircuitVerse:masterfrom
SouparnaChatterjee:fix/sticky-main-header
May 31, 2026
Merged

Fix: Sticky main header for persistent access while scrolling#787
Asrani-Aman merged 2 commits into
CircuitVerse:masterfrom
SouparnaChatterjee:fix/sticky-main-header

Conversation

@SouparnaChatterjee

@SouparnaChatterjee SouparnaChatterjee commented May 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #696
Changes done:

  • Added position: sticky, top: 0, and z-index: 500 to .main-header in _sass/custom/custom.scss so the header remains accessible while scrolling down the page.

Screenshots
Before:

Screen.Recording.2026-05-30.180245.mp4

After:

Screen.Recording.2026-05-30.180129.mp4

Before: Header scrolls away with the page, making search and theme toggle inaccessible without scrolling back up.
After: Header stays pinned at the top at all times, search and theme toggle always accessible.

✅️ By submitting this PR, I have verified the following

[x] Checked to see if a similar PR has already been opened 🤔️
[x] Reviewed the contributing guidelines 🔍️
[x] Sample preview link added (add the link(s) for all the pages changed/updated from the checks tab after checks complete)
[x] Tried Squashing the commits into one

Summary by CodeRabbit

  • Bug Fixes
    • Main header now remains fixed at the top while scrolling, ensuring consistent visibility of site navigation and controls.
    • Reduces header overlap with page content and improves navigation accessibility and usability on long pages.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a010ff32-118e-4447-8ce8-d82d6e136cd3

📥 Commits

Reviewing files that changed from the base of the PR and between 17c2228 and ccffeda.

📒 Files selected for processing (1)
  • _sass/custom/custom.scss
🚧 Files skipped from review as they are similar to previous changes (1)
  • _sass/custom/custom.scss

Walkthrough

This pull request adds a CSS rule for the .main-header class that applies sticky positioning with top: 0 and z-index: 500. This keeps the main header fixed at the top of the viewport while scrolling. The change is a single CSS definition in the custom stylesheet, enabling users to access the header navigation and theme controls at any scroll position without returning to the top of the page.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: making the main header sticky for persistent access while scrolling, which is the core objective of this PR.
Linked Issues check ✅ Passed The PR fully implements the requirement from issue #696 by adding CSS sticky positioning to the .main-header, ensuring it remains accessible while scrolling without requiring users to scroll back up.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the linked issue #696; only CSS styling for the sticky header functionality was added with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
_sass/custom/custom.scss (1)

317-317: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add trailing newline at end of file.

Files should end with a trailing newline. This was previously flagged by hound[bot].

🎨 Proposed fix
   z-index: 500;
 }
+

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1e8ff5b-9f87-4b62-8003-28602d78835a

📥 Commits

Reviewing files that changed from the base of the PR and between c3be3db and 17c2228.

📒 Files selected for processing (1)
  • _sass/custom/custom.scss

Comment thread _sass/custom/custom.scss
Comment thread _sass/custom/custom.scss Outdated
@Asrani-Aman
Asrani-Aman merged commit e386a42 into CircuitVerse:master May 31, 2026
3 checks passed
@Me-Priyank

Copy link
Copy Markdown
Member

@Asrani-Aman PRs created after the start of mergathon should not be marked with mergathon labels :))
Screenshot 2026-05-28 165615

@Asrani-Aman

Copy link
Copy Markdown
Member

correct

sorry i didn't notice the date
removing the label

thanks for noticing @Me-Priyank

@Asrani-Aman

Asrani-Aman commented May 31, 2026

Copy link
Copy Markdown
Member

@Me-Priyank if
you get some time can you please check other pr's

for me i didn't notice the date opened while merging, only checked the code

@Me-Priyank

Copy link
Copy Markdown
Member

Ok sure i'll check. spotted 2 prs 2 dats back CircuitVerse/CircuitVerse#7430 (comment)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature : Position of main-header should be fixed to access it while scrolling

3 participants