retire the green and amber lights, and the shallow depth they drove
Maximize could only ever stop below the nav header — the content region is an `absolute z-2` stacking
context and the header a `fixed z-10` sibling, so that was the deepest a panel could get on its own.
Full screen reaches the rest by asking the shell to stand its header down, which leaves the shallow
version as a state nobody picks on purpose.
So it goes, and the two lights with it. `MaximizeMode` and the `{ id, mode }` session value collapse
back to a bare `fullscreenPanelId` — renamed because "maximized" would now be a lie about what it does
— under a new `FULLSCREEN_PANEL:` key, so a tab open across this reads nothing rather than an object
where a string belongs. `MaximizeButton` is gone; locked screens keep only the fullscreen toggle, which
writes no layout and so was always the one control the lock could permit.
Red stays. The amber used to REPLACE it while maximized so the way out could never be a way to delete;
with amber gone that guard would have cost the close button entirely, and red is already absent exactly
where it should be — locked screens render no traffic lights at all.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,10 +57,10 @@ export function clearSessionValue(key: string): void {
|
||||
*
|
||||
* Same shape as `useState`: a value, a setter that accepts an updater, and a `reset` that forgets the
|
||||
* stored copy and returns to `initialValue`. `key` is the sessionStorage key verbatim — scope it
|
||||
* yourself (`` `MAXIMIZED_PANEL:${dashboardId}` ``) when one screen needs one value per thing.
|
||||
* yourself (`` `FULLSCREEN_PANEL:${dashboardId}` ``) when one screen needs one value per thing.
|
||||
*
|
||||
* `null` is a real stored value, not an absence: setting it persists "explicitly nothing", which is the
|
||||
* difference between a panel you un-maximised and one you never maximised.
|
||||
* difference between a panel you took back out of full screen and one you never put there.
|
||||
*/
|
||||
export function useSessionState<T>(key: string, initialValue: T) {
|
||||
// Read the stored value once per mount rather than on every render — `useGlobal` re-evaluates its
|
||||
|
||||
Reference in New Issue
Block a user