Flip what the rail on the page draws from $store.rail.toggle()
toggle() was set(!collapsed), and while nothing is stored `collapsed` is only `rail.default`: an adaptive rail between 840 and 1199px is drawn collapsed whatever that says, so an application's shortcut collapsed a collapsed rail and the first press changed nothing. Each interactive rail now registers its root, and toggle() asks the first one on the page, the way its menu button asks itself: an open rail is hidden, a rail with no room to expand (modal, or adaptive below expanded) opens over its scrim without storing anything, and any other rail stores the opposite of what it draws, so a rail that hid itself docks back into the layout as before. With no rail on the page it still flips the choice. collapse() and expand() stay the choice itself. The browser tests toggle the scaffold's rail at 960 and 1512px (in place) and at 768 and 393px (the modal), and a hiding rail back into the layout; the first two fail without the change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
252c649c45
commit
394c9326ac
+10
@@ -1,5 +1,15 @@
|
||||
# Upgrading
|
||||
|
||||
## From 2.1.0 to 2.1.1
|
||||
|
||||
- **`$store.rail.toggle()`** flips what the first rail on the page draws, as its menu button does.
|
||||
With nothing stored, `<x-scaffold>`'s rail is drawn collapsed from 840 to 1199px whatever
|
||||
`rail.default` says, and `toggle()` collapsed it again, so the first press of an application's
|
||||
shortcut changed nothing; it now expands the rail. Below 840px, where there is no room to expand
|
||||
it in the layout, `toggle()` opens and closes the modal rail (`show()`, `hide()`) instead of
|
||||
changing a choice nothing draws there. A shortcut that pressed the rail's menu button to get this
|
||||
can call `$store.rail.toggle()` again.
|
||||
|
||||
## From 2.0.0 to 2.1.0
|
||||
|
||||
- **Browsers:** Firefox 151 or later (was 147), for container style queries on a custom property;
|
||||
|
||||
Reference in New Issue
Block a user