Skip to content

Improvement/sticky sidebar - #2293

Draft
barna-isaac wants to merge 6 commits into
mainfrom
improvement/sticky-sidebar
Draft

Improvement/sticky sidebar#2293
barna-isaac wants to merge 6 commits into
mainfrom
improvement/sticky-sidebar

Conversation

@barna-isaac

@barna-isaac barna-isaac commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This implements sticky sidebars.

Here are some controversial choices I made:

  1. I prioritised the case when the sidebar is short enough there’s no need for a scrollbar. In such a case, the page looks exactly as it did before. When there is a scrollbar, the sidebar’s contents is now narrower, to acommodate the width of the scrollbar. Maybe the reviewer knows a way to have the scrollbar eat into the padding we already have on the page? Unfortunately I couldn’t do this easily (considered relying on scrollbar-gutter: stable, but whether this takes up any space still depends on whether the os shows scrollbars).
  2. when the main content becomes shorter, we loose scroll position and there’s a big jump. This might happen, eg. on the Question finder, see attached video. I don't think there's an easy fix for this one: the browser remembers we're on the bottom of the page, but with the page a lot shorter, the bottom of the page becomes the footer, which doesn't have the scrollbar.
    https://github.com/user-attachments/assets/480366b2-1030-4f96-80a8-bbde4d359f3c
  3. For simplicity, I made every sidebar sticky. There are a few pages, like  "News", where sticky sidebars feel unnecessary, as the sidebar doesn't really contain anything meaningful in the first place.

@barna-isaac
barna-isaac marked this pull request as draft August 7, 2026 17:04
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.20%. Comparing base (e7e8ce7) to head (eab7600).
⚠️ Report is 408 commits behind head on main.

Files with missing lines Patch % Lines
...c/app/components/elements/layout/SidebarLayout.tsx 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2293      +/-   ##
==========================================
- Coverage   43.52%   43.20%   -0.32%     
==========================================
  Files         597      601       +4     
  Lines       25251    25732     +481     
  Branches     7500     8567    +1067     
==========================================
+ Hits        10990    11118     +128     
- Misses      14212    14557     +345     
- Partials       49       57       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barna-isaac

Copy link
Copy Markdown
Contributor Author

More weirdness:

  • on question finder search box, focus outline is now clipped
  • pages with unexpected jumps: any page that might become shorter in response to a sidebar action. Question Finders, Concept Finders, Test finder, "My tests" (and probably a lot more!)

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