feat(solid): the Solid substrate with the Dialog primitive - #44
Draft
ivanbanov wants to merge 2 commits into
Draft
feat(solid): the Solid substrate with the Dialog primitive#44ivanbanov wants to merge 2 commits into
ivanbanov wants to merge 2 commits into
Conversation
packages/solid targets Solid 2.0 (solid-js + @solidjs/web at ^2.0.0-rc.0): @dunky.dev/solid-dialog plus the lifecycle wrappers @dunky.dev/solid-use-focus-trap and @dunky.dev/solid-use-scroll-lock, the @dunky-dev/solid storybook harness (port 6008), scaffold templates, and the workspace wiring (vitest project split, own tsconfig project with jsxImportSource @solidjs/web, per-package tsdown babel config compiling the dist with babel-preset-solid). Solid-specific decisions the code encodes: - Bindings merge inside the JSX spread to stay reactive; children never ride that spread — a re-evaluated spread re-creates them, and a child that writes to the machine on mount (Title's presence) would loop forever. - Two-phase effects compute eagerly, before refs fill: useFocusTrap re-reads its target at apply time, and the shared backdrop handle is a plain box. - The dialog context uses a null default so the root's parent-depth lookup stays non-throwing (a default-less context throws on unprovided reads). The lockfile is deliberately not committed: @dunky.dev/solid-state-machine isn't on npm yet (state-machine PR #32); local dev uses a pnpm override pointing at a packed tarball of that branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ivanbanov
added a commit
to dunky-dev/state-machine
that referenced
this pull request
Aug 18, 2026
Solid 2.0 renders a boolean attribute as presence/absence, so
aria-expanded={false} disappeared and aria-modal={true} rendered empty.
ARIA states are literal "true"/"false" tokens — serialize them explicitly.
Found by the solid-dialog binding in dunky-dev/ui#44.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ivanbanov
added a commit
to dunky-dev/state-machine
that referenced
this pull request
Aug 18, 2026
Solid 2.0 renders a boolean attribute as presence/absence, so
aria-expanded={false} disappeared and aria-modal={true} rendered empty.
ARIA states are literal "true"/"false" tokens — serialize them explicitly.
Found by the solid-dialog binding in dunky-dev/ui#44.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rc.1 fixes the reconcile store corruption the adapter worked around — the matching adapter build drops the detour, so the substrate rides the plain reconcile path. Peer ranges move to ^2.0.0-rc.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ivanbanov
added a commit
that referenced
this pull request
Aug 19, 2026
Cut the comments down to the constraint each one protects — one or two lines, no narration. Comment-only change on top of the Solid substrate (#44); no code changes. Co-Authored-By: Claude Fable 5 <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.
What
The Solid substrate, targeting Solid 2.0 (
solid-js+@solidjs/webat^2.0.0-rc.0):@dunky.dev/solid-dialog— the compound Dialog (Trigger, Portal, Backdrop, Viewport, Content, Title, Description, Close), same anatomy and behavior contract as the React binding, with the connected api as a fine-grained store.@dunky.dev/solid-use-focus-trap/@dunky.dev/solid-use-scroll-lock— the Solid lifecycle wrappers over the framework-free DOM utils.@dunky-dev/solidstorybook harness (pnpm dev:solid, port 6008,storybook-solidjs-vite), with the story set mirroring the React one.scripts/templates/packages/solid—pnpm scaffold <name>now stamps Solid too.jsxImportSource: "@solidjs/web"), and a per-package tsdown babel config so the dist is compiled bybabel-preset-solid.Solid-specific decisions
childrennever rides that spread: a re-evaluated spread re-creates the children it carries, and a child that writes to the machine on mount (Title's presence) loops machine -> spread -> remount -> machine. Every part strips it and renders{props.children}explicitly.useFocusTrapre-reads its target at apply time, and the backdrop handle shared between sibling parts is a plain mutable box, not a signal (the layer walk reads it in the same settle that mounts the backdrop).Content'sinitialFocusaccepts an element or an accessor resolved at open time — the Solid idiom for a ref variable that fills during render.nulldefault so the root's parent-depth lookup stays non-throwing (a Solid 2.0 default-less context throws on unprovided reads).Blocked on
@dunky.dev/solid-state-machinefirst (including the normalize fix that stringifies booleanaria-*values — Solid 2.0 renders boolean attributes as presence/absence). The lockfile is deliberately not committed until then; local dev uses an uncommittedpnpm-workspace.yamloverride pointing at a packed tarball of that branch. The^0.4.0dependency ranges assume the fixed-group publish version — adjust if it differs.Verified
pnpm build(dist compiled to@solidjs/webtemplates, publint clean), and the storybook build.🤖 Generated with Claude Code