The toolbar's three selects become design-system comboboxes
Paul: "selects should be Rastrillo design system searchable selects". They needed no rastrillo upgrade at all — ui/select.js is byte-identical between the pinned v0.22.0 and v0.25.0 and render.go already serves it, so the whole feature is the data-rst-select opt-in plus the four things the enhancement does not do for us. It does not mirror `disabled` — the string does not appear in select.js. Our selects are disabled until the editor mounts, so left alone this would have shipped a control that looks usable, takes focus and typing, and drives a disabled select behind it. toolbar.mjs mirrors it, and the stylesheet gives the mirrored input the same faint token the buttons use, because a control that refuses to work should look like it. It replaces a compact select with a full-width text input, so the width cap moves onto the [rst-combo] wrapper. That is not tidiness: [docs-toolbar-group]'s own comment exists because these three controls overflow a 320px viewport when they can take their widest option's width, and an uncapped wrapper reintroduces exactly that reflow failure. It is the first control in this bar that holds a caret. Every other one is a button, so nothing needed to hand focus back before; now choosing a size and typing would put the next word into the font filter. And the roving tabindex walked the native selects, which the enhancement hides — an arrow-key stop on an invisible element. It walks the combobox inputs where they exist and the selects where they do not. All three opt in, which is Paul's instruction and against the framework's own judgement that search below ten options is furniture. Recorded rather than resolved silently: they sit in one group where a lone combobox between two native selects would look worse, and all three are growth surfaces. It is one attribute to revert. A test I wrote here was wrong in the way this repo keeps cataloguing. It asserted the framework's three catalog keys resolve, went red, and looked like it had found opts.BaseCatalog replacing rastrillo's base catalog — which would have left the shell's skip link rendering a raw key. The test could not have distinguished that from the dull truth: this harness serves through app.Handler() and the locale middleware lives in Serve, so no key resolves in any test. serve.go merges rather than replaces; checked in the framework's source, not inferred. The test now calibrates against our own keys and skips honestly when the environment resolves nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XrHJFx6wn4VvTzc3drkTp4
5 files changed,
+304
−16
fixtures/toolbar.mjs+72 −1internal/docs/export.go+25 −0internal/docs/selects_test.go+124 −0internal/docs/static/{editor.be9e1d1ff62c9336.js => editor.573637d22790cda3.js}+12 −12internal/docs/views/show.html+71 −3
fixtures/toolbar.mjsLoading diff…
internal/docs/export.goLoading diff…
internal/docs/selects_test.goLoading diff…
internal/docs/static/{editor.be9e1d1ff62c9336.js => editor.573637d22790cda3.js}Loading diff…
internal/docs/views/show.htmlLoading diff…