Skip to content

fix(sidebar): keep every icon in place when toggling the rail - #2062

Merged
l0gicgate merged 1 commit into
mainfrom
fix/2061-sidebar-toggle-shift
Nov 5, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
fix/2061-sidebar-toggle-shift

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

Toggling the sidebar between full width and the rail moved its icons, and rows could end up misaligned after a text-size change. Each part of the sidebar now takes the same space in both modes:

  • Rows: dropped the fixed min-height: 24px that only full-width rows had, so height comes from the theme-sized icon box. At text sizes below 13, full-width rows get slightly tighter.
  • Section headers: the rail keeps each header's row and shows only its chevron, with the section name as a tooltip. This replaces hiding the headers.
  • Collapsed sections: the rail now honors the collapsed state instead of expanding every section, and the chevron can fold or unfold them from the rail. This reverses the previous "rail shows every section" behaviour, which moved the rows below.
  • Update notice: keeps its height in the rail. Its icon moves to the left, into the row icon column, and the dot moves to the right.
  • Misalignment: rows with a local path (Home, standard folders, pins) no longer pin a size request at build time, which outlived later text-size changes.

Section chevrons and eject buttons still can't hold their full-width position, because they sit past the rail's right edge. The chevron recentres in the rail and device actions hide.

Not verified: QA can't produce 1.6 fractional scaling or a mounted device with an eject button, so those need a manual check on a real session. The update notice was checked with a temporary local change that forced it visible, which is not in this diff. Per the test policy, icon positions are not asserted in tests. They were measured by hand in the QA session, at text sizes 8 to 32, with and without frame density, and with Pinned collapsed.

Visual evidence

N/A: agents cannot upload attachments. See the description for the changes.

How to test

  1. Set the text size to 10px with Ctrl+-, and pin a few folders.
  2. Press Ctrl+B to step between the full sidebar and the rail, and watch the icons.
  3. Collapse Pinned and toggle again, then click the chevron in the rail to unfold it.
  4. Restart at text size 20, shrink to 10 with Ctrl+-, and compare Home with Trash.

Expected result: no row icon moves in steps 2 and 3, Pinned stays collapsed in the rail until its chevron is clicked, and in step 4 all rows share one icon column and label column.

Related issue

Closes #2061

Rows, section headers and the update notice now take the same space in
full width and in the rail, so no icon moves at any text size.

Full-width rows had a fixed 24px minimum height that the rail zeroed.
Headers vanished from the rail, which also expanded collapsed sections,
so the rail now keeps each header's row with only its chevron and honors
the collapsed state. The update notice keeps its height and moves its
icon into the row icon column.

Rows with a local path also pinned a size request at build time that
outlived later text-size changes, which misaligned them in full width.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar icons shift when toggling between full width and the compact rail

1 participant