Give CSS sole ownership of overlay visibility - #282
Conversation
|
The failing The failure is in the Install native QA tools step: Three TypeScript files cannot produce a Rust type error, so I tested it rather than asserting it: I re-ran master's own build, unchanged, with today's dependencies.
So the cause is upstream version drift since this morning — This branch itself is clean: |
Every harness page rendered an empty body. The console said "Cannot read properties of undefined (reading 'spec')" from inside the runtime, which is a component being invoked with no props at all, and the reactive system halting on the way. `@rsbuild/plugin-solid` injects solid-refresh, and its `$$component` wrapper calls `createSignal(component)`. Solid 2 reads a function initialiser as a derivation and builds a computed for it, and a computed needs an owner -- so the wrapper breaks every component the harness defines, `Harness` included. Babel does the same transform without the refresh runtime. `moduleName` stays, for the reason the old comment gave: the transform has to emit `@solidjs/web`, since Solid 2 dropped the `solid-js/web` subpath. This is the tool that is supposed to catch a component rendering nothing, and it could not render anything itself. With it working, the overlay fix on this branch is verifiable rather than merely tested: Select goes from `data-open="false"`, `visibility: hidden`, height 0 to `data-open="true"`, `visibility: visible`, height 86 with no inline visibility override, and Popover's panel paints at 40px.
|
Answering the fair question of whether this was verified or assumed: it was assumed, so I went and verified it — and found the QA harness could not render anything at all. The harness was dead, on master tooEvery page rendered an empty body, with
This is the tool meant to catch a component rendering nothing, and it could not render anything itself. Which makes the actual fix checkableWith the harness working, the claim in this pull request is observable rather than merely tested:
Popover behaves the same: panel paints at 40px, The inline override is the point. Before, positioning seeded Suite still passes: 164 tests, 0 failures. |
Three commits that were sitting on a local branch and never reached a pull request. Rebased onto current master, where the bug is still live.
The bug
createOverlayPositionseeded its style signal with an inlinevisibility: hiddenand restored it whenever the overlay closed. That inline style outranks each component's[data-open="true"]CSS, and portal refs can settle after the open signal — so a Select or Popover that is semantically open could be left invisible and unoperable, with nothing in the DOM to suggest why.Positioning now writes no visibility at all. Visibility belongs to the
data-opencontract, and one owner is the whole point.The other two
fix(select): defer compound children under context— compound children were built before the context they read existed.fix(select): keep listbox in the renderer tree— the listbox left the renderer tree when closed, so the positioning effect had no element to measure on the frame it reopened.Verified
bun run buildand the full suite — 164 tests, 0 failures — on this branch. Master builds too, so the comparison is like for like.One conflict on rebase, in
Select.layout.tsx: master has since added a<Show>and anuntrackthe original commits predate. Resolved by checking what the merged file actually uses rather than taking a side — both imports are needed and are kept. The first attempt droppeduntrack, which the declaration build caught.Audit note
This came out of a sweep of 19 local branches in this repo. Only four had anything genuinely unlanded once compared by patch content rather than commit count — one branch was 21 commits "ahead" and entirely replayed history. Of those four, the glass-material work is superseded by what is already on master (
_shared/material.cssthere is 283 lines to the branch's 115), and two more targetSurface, a component master no longer has. This is the only branch with work worth keeping.