Skip to content

fix: sidebar and theme picker bugs (UCD-180) - #51

Merged
ds-giusy merged 6 commits into
mainfrom
fix/UCD-180-sidebar-theme-picker-bugs
Aug 5, 2026
Merged

fix: sidebar and theme picker bugs (UCD-180)#51
ds-giusy merged 6 commits into
mainfrom
fix/UCD-180-sidebar-theme-picker-bugs

Conversation

@ds-giusy

@ds-giusy ds-giusy commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • ToC tooltip closes reliably on click instead of staying open
  • Reading measure capped to stop text reflow while the sidebar transitions
  • ToC toggle wrapper hidden below the 60em breakpoint
  • Content-width toggle button no longer transitions left unintentionally
  • Reverted to a single-button theme cycle toggle (dropped the two-button variant)

Test plan

  • Verify ToC tooltip closes on click across breakpoints
  • Resize window through the sidebar transition and confirm no text reflow
  • Confirm ToC toggle wrapper is hidden below 60em
  • Toggle content width and confirm no unwanted left transition
  • Click through the theme cycle button and confirm correct palette switching

docs/.dates_cache.jsonl and docs/.gitattributes are generated locally
by the mkdocs-document-dates git hook and don't belong in the repo.
Clicking the toggle focuses it, and focus pinned the tooltip open via
shouldKeepTooltipVisible. The auto-hide timer then declined to hide it
and never rescheduled, so it stayed open until focus moved elsewhere.

UCD-180
.md-content__inner is a flex item that keeps resizing while the ToC
or nav sidebar collapses/expands, so paragraphs re-wrap continuously
for the whole 300ms transition. Capping the reading width also
improves it as a fixed baseline, independent of the animation.

UCD-180
All layout rules for .ds-toc-toggle-wrapper (including hiding the
tooltip) lived inside the >= 60em media query. Below that breakpoint
the tooltip text had no display:none and rendered as unstyled,
always-visible text in the mobile page flow.

UCD-180
JS repositions the button via left on every ResizeObserver tick while
the sidebar collapses, and --ds-motion-transition covers all
properties. Each JS update restarted a fresh 300ms interpolation on
left. Chrome fires ResizeObserver on nearly every frame so this was
invisible there, but Firefox/Safari batch fewer callbacks, making the
button visibly lag behind the sidebar animation.

UCD-180
Jonas preferred the original toggle over the segmented pill switcher
introduced with the collapsible sidebars (UCD-180 review feedback).
Deleting the override partial falls back to Material's stock
palette.html; the palette order/icons/labels and the now-unused
circle-half icon go back to their pre-pill state. sun-moon.svg was
never removed by the pill design, only left unused — restored from
before the pill switch existed.

UCD-180
@ds-giusy
ds-giusy requested review from jonas-haeusler and removed request for jonas-haeusler August 5, 2026 08:46
@ds-giusy
ds-giusy merged commit 41d1efa into main Aug 5, 2026
3 checks passed
@ds-giusy
ds-giusy deleted the fix/UCD-180-sidebar-theme-picker-bugs branch August 5, 2026 08:49
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