diff --git a/CHANGELOG.md b/CHANGELOG.md index 64475e3a..0d08b067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ notes. Entries describe what users experience, not internal refactors. ### Fixed +- The language menu no longer flashes open and stretches the page header while + the page is still loading. +- Select lists and the dictation privacy note open above the AI assistant panel + instead of behind it. - Local references attached while saved chat history is loading remain attached when the conversation finishes restoring. - Reloading after a completed save restores the saved document instead of an diff --git a/docs/explorations/2026-10-24-ranui-0-5-2-language-menu-flash.md b/docs/explorations/2026-10-24-ranui-0-5-2-language-menu-flash.md new file mode 100644 index 00000000..a7ceab13 --- /dev/null +++ b/docs/explorations/2026-10-24-ranui-0-5-2-language-menu-flash.md @@ -0,0 +1,65 @@ +# ranui 0.5.2: the language menu no longer flashes open + +## Symptom + +On the first load of `/`, the localized landing pages, the content pages and +`/history`, the language menu briefly showed all seven languages in a column. +The header stretched from 38 px to about 300 px, then snapped back. + +## Cause + +The menu is an `` whose links are written straight into the HTML +(`bin/pages/chrome.mjs`, `index.html`). Until the element is defined, the +browser lays those links out in flow. On the static pages the definition comes +from a deferred IIFE, and on `/history` from the Vite bundle. + +`home.css` had `:not(:defined)` fallbacks for `r-button` and `r-theme-switch`, +but nothing hid `r-content`. Measured on production with the defining scripts +blocked, the menu host was 215–223 × 246–266 px on `/`, `/zh-CN/`, `/help` and +`/history`. + +## Fix: in ranui, not here + +The fix was made in the component library (chaxus/ran#444, released as ranui +0.5.2). `ranui.css` now ships `:not(:defined)` rules for every component whose +light-DOM children must stay hidden until the element upgrades: r-popover's +`r-content`, r-select's options, r-tabs, r-modal, r-reasoning, r-route, +r-markdown, r-math, r-mermaid and r-scratch. + +This site vendors that sheet as `public/ran-tokens.css`. `bin/build.sh` +re-syncs it on every build, and every page links it in `` before first +paint. Upgrading ranui is therefore the whole fix; no site CSS was added. + +ranui also documents `