concierge: a decorative leading slot in the command bar - #14
Merged
Merged
Conversation
Scrimmage wants a brand sprite inside its concierge bar. The widget styles entirely inline — no class names, no data attributes, no slots — so a host site cannot reach into the bar from its own stylesheet, and inline styles beat anything it could write anyway. The alternative was a Scrimmage-local fork of the bar, which would fork the guardrail, disclosure and lead-form logic too; the 2026-09-17 disclosure fix had to be chased across seven sites precisely because that logic lives in one place. It should stay there. `leading` is an optional ReactNode rendered ahead of the input. Omitted — which is every other site — the bar renders exactly as before, 24px inset and all. Supplied, the inset drops to 12px so the text starts where it always did, and the node sits in the space the padding gave up. The node is wrapped `aria-hidden` and `pointerEvents: none`. The input already carries this control's accessible name; a second announced element inside the same bar reads as a separate widget, and a focusable one would put a tab stop in front of the text field for decoration. This ships to every consumer on a `^` range, so the load-bearing claim is not "the slot works" but "a bar that passes no slot is unchanged." Eight tests pin both halves, and all three mutations of the guarantee are caught: forcing the padding unconditionally (1 fail), dropping the aria-hidden (2 fails), rendering the slot unconditionally (2 fails). Suite 40/40 · typecheck clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Scrimmage wants a brand sprite inside its concierge bar.
concierge.tsxstyles entirely inline — no class names, no data attributes, no slots — so a host site cannot reach into the bar from its own stylesheet, and inline styles would beat it if it could.The alternative was a Scrimmage-local fork of the bar. That would fork the guardrail, disclosure and lead-form logic with it — and the 2026-09-17 disclosure fix had to be chased across seven sites precisely because that logic lives in one place. It should stay there.
What
leading?: ReactNode, rendered ahead of the input.10px 12px 10px 24px— unchanged10px 12pxaria-hiddenThe inset drops by exactly the space the node takes, so the placeholder text starts where it always did.
The slot is
aria-hiddenandpointerEvents: none. The input already carries this control's accessible name; a second announced element in the same bar reads as a separate widget, and a focusable one would put a tab stop in front of the text field for decoration.The claim that actually matters
This ships to every consumer on a
^range. So the load-bearing claim is not "the slot works" — it's "a bar that passes no slot is unchanged."Eight tests pin both halves, and each guarantee was mutation-checked rather than assumed:
aria-hiddendroppedRestored: 8/8 pass.
The bar is located in the tests by structure (the input's flex parent), not by an invented class — a test that added its own hook would be pinning the test's fiction rather than the shipped DOM.
Verification
typecheckcleanmatchMediastub — the widget reads it for the mobile footer collision and jsdom ships nonePublishing is tag-triggered (
v*→ GitHub Packages), so merging this does not release it.🤖 Generated with Claude Code