Skip to content

Stabalize scrollbar gutter so the header stops shifting when search opens - #3364

Merged
enf0rc3 merged 4 commits into
mainfrom
wl/search-scrollbar-gutter
Aug 17, 2026
Merged

Stabalize scrollbar gutter so the header stops shifting when search opens#3364
enf0rc3 merged 4 commits into
mainfrom
wl/search-scrollbar-gutter

Conversation

@enf0rc3

@enf0rc3 enf0rc3 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Focusing the search hides the body overflow to lock scrolling. That takes the scrollbar with it and widens the viewport, so both fixed headers grew and their contents jumped 15px to the right.

scrollbar-gutter: stable on html holds that width open, so the viewport stays a constant width whenever anything locks scrolling.

This was "worse" on the new navbar and resolutions that are "tight" on space.

Before:

scrollbar.mp4

After:

scrollbar-after.mp4

🤖 Generated with Claude Code

enf0rc3 and others added 2 commits August 14, 2026 15:47
Focusing the search hides the body overflow, which removes the scrollbar and
widens the viewport. The header is fixed, so it grew with the viewport and its
contents moved 15px to the right. Measure the scrollbar width at lock time and
hold that space open on the body and the header until unlock.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Reverts the search-specific compensation in favour of scrollbar-gutter: stable
on html. The viewport then keeps a constant width whenever a scroll lock hides
the body overflow, so the fixed header stays put for search, the mobile nav and
anything added later.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@team-marketing-branch-protections

Copy link
Copy Markdown

Pull request environment is available at https://stoctodocspr3364.z22.web.core.windows.net.

You can view the ephemeral environment status in Octopus Deploy.

This environment will be automatically deprovisioned when the pull request is closed, or after 7 days of inactivity.

enf0rc3 and others added 2 commits August 14, 2026 16:26
The overlay is fixed, so it stops at the reserved gutter. Once the scrollbar
goes that strip kept the undimmed page colour, showing as a pale bar down the
right edge in light mode. Painting the same wash onto the canvas covers it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@enf0rc3 enf0rc3 changed the title Reserve the scrollbar gutter so the header stops shifting when search opens Stabalize scrollbar gutter so the header stops shifting when search opens Aug 16, 2026
@enf0rc3
enf0rc3 marked this pull request as ready for review August 16, 2026 22:17
@borland

borland commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Do we need this?

  • I can't repro the problem your video shows, on octopus.com/docs or anywhere else.
    • Observing it in the video, it's a really minor bug that people are unlikely to notice
  • The new nav and upcoming search work is likely to change this stuff anyway, these additional changes might just get in the way

@enf0rc3

enf0rc3 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

This bug actually showed itself during testing of new-nav, as it looked worse with the new design, but @rosslovas suggested:

I think we're gonna revamp the actual search functionality if I'm not mistaken so we can check for this issue with whatever we replace it with, and fix if necessary

And i figured:

Ill ask claude to do a pr, if its easy fix we can merge


I agree with you, it is a minor impact.

I do not think the change will "get in the way" given its fix was trivial css changes that would be easy to revert anyway.

Proof of new nav fix: left (changes, right original)

newnav.mp4

@enf0rc3
enf0rc3 merged commit 1e6b4c0 into main Aug 17, 2026
7 checks passed
@enf0rc3
enf0rc3 deleted the wl/search-scrollbar-gutter branch August 17, 2026 03:34
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.

3 participants