Clip the wiki edit header sidebar toggle when the sidebar is expanded
What does this MR do and why?
On the wiki edit page with the sidebar expanded, the header's sidebar-open toggle paints underneath the page title. The &.sidebar-expanded rule collapses the toggle's wrapper (gl-w-0 + gl-px-0), but overflow clipping only applied under .transition-enabled, so in the settled expanded state (any page load with the sidebar already open, which is sticky via the sidebar preference) the zero-width box keeps overflow: visible and the 32px button paints through, with the title laid out over it. The opacity fallback cannot reach this toggle either: it is scoped to descendants of .wiki-sidebar, and the edit-header toggle lives in a sibling subtree.
The fix adds gl-overflow-hidden to the settled sidebar-expanded sibling rule, matching the clipping the transition state already had. Both hidden-toggle variants (the clipped edit-header one and the opacity-faded sidebar descendant) also gain visibility: hidden: clipping and opacity leave the buttons focusable, so keyboard focus could land on an invisible control and anchor its tooltip to nothing. With transition: all already on these elements, visibility flips hidden only after the collapse animation completes. The regression spec fails on master and passes with the fix.
Mechanism introduced in de6a0c71 (toggle moved into the sticky header and edit header); 8158602c fixed the transition window but not the settled state.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
Same settled state both sides: wiki edit page, sidebar expanded, transition finished. Before: the toggle's outline paints under the title's first characters, and its tooltip can appear anchored to nothing because the clipped button kept keyboard focus. After: the wrapper clips it and visibility: hidden removes it from the tab order, so no stray tooltip either; the remaining "Close sidebar" tooltip belongs to the sidebar's own hovered button.
How to set up and validate locally
- Open any wiki page and expand the sidebar (so the preference persists).
- Edit the page (or reload the edit page).
- Before: an icon button renders under the page title. After: the title sits flush with no button behind it; collapsing the sidebar still reveals the toggle normally.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

