Files
gods-eye-view/src/ui
Sameh Khamis 1f105a68af Page state is kept in classes on the page root; the HUD rests while not displayed (#1911)
* Page state is kept in classes on the page root; the HUD rests while not displayed

Rules that selected on `body:has(...)` now select on classes on <html>
that the components owning that state hold, as
`body:is(.flag *, <old condition>)`, which keeps each rule's specificity
and so its place in the cascade. Chrome checks a `:has()` on body again
after every node added or removed anywhere, and restyles the whole page
when it does; a class changes only when its state does.

The Intel HUD does no readout work and writes nothing while #intel-hud is
not displayed, and shows current readouts as soon as it is displayed
again. Its changing readouts update their text nodes in place.

* The HUD runs no timers while not displayed; the loading screen is followed wherever it comes and goes

While #intel-hud is not displayed the Intel HUD stops its timers and any
reply typing out, drops a summary it was working out (asked again when it
is back) and publishes only its own active, variant and colors, which
stylesheets and layout elsewhere read. The vessel and language readouts
wait too. Displayed again, it starts its timers and shows current readouts,
and the whole reply, at once. A view that is unmounted leaves the HUD at
rest until a mounted view reports it displayed.

The loading-screen class now follows #loading-screen being added, removed,
renamed or shown anywhere in body, as body:has() did, not only its class.

* Changelog fragment for #1911

* The first-run launcher's page class follows the element, and is named launcher-shown

A page that clears the first-run dialog by removing every element whose class
contains first-run removed <html> itself once it carried has-first-run-launcher.
The class is now launcher-shown, and it follows #first-run-launcher wherever
it comes and goes, so a launcher removed by anything clears it, as
body:has(#first-run-launcher) did.
2026-11-23 08:06:48 -08:00
..
2026-10-28 12:59:32 +04:00