Skip to content

Start Data Slot components with their page script - #334

Merged
silveltman merged 1 commit into
mainfrom
t3/data-slot-static-scripts
Oct 26, 2026
Merged

silveltman merged 1 commit into
mainfrom
t3/data-slot-static-scripts

Conversation

@silveltman

@silveltman silveltman commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Dialog, Sheet and NavigationMenu import their Data Slot controller statically and call create(), like the other Data Slot components, instead of loading it per media query (#331 to #333).

  • Removes the onMedia helper, src/lib/dialog.ts, the on-media registry item, the responsive activation docs and their tests. No custom loader, no loading props.
  • media stays accepted on the three components with no effect and is not rendered, so hosted-registry installs since Load responsive menu behavior at the header breakpoint #331 that pass it still type-check.
  • Header blocks 1 to 5 keep fold="lg" | "xl" and close the sheet or navigation menu the layout hides at that breakpoint, which releases the scroll lock.
  • Every Data Slot root script also binds on astro:after-swap, before a site's own astro:page-load listeners after ClientRouter navigation; published create() skips bound roots.
  • Published @data-slot/* ^1.1.2 and Liquid are unchanged. All eight styles regenerated.
  • Changeset: minor (removes a hosted registry item; folds into the pending 0.26.0 in [ci] release #330).

Sites that installed the hosted helpers can delete src/lib/on-media.ts and src/lib/dialog.ts once nothing imports them.

Validation at 6f8b6aaed: vp run check passes (988 files, 0 errors/warnings/hints; one existing knip configuration hint; registry matches). Unit 33/33. Build: 0 critical, 503 existing warnings, 357 hints. Browser 67/67 over Chromium, Firefox and WebKit, including all five headers at both folds (resize closing, scroll unlock, keyboard), ClientRouter teardown and a site page-load command after navigation.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Dialog, Sheet and NavigationMenu import their controller statically and
call create(), as the other Data Slot components do, instead of loading it
per media query. The on-media helper, src/lib/dialog.ts, the on-media
registry item and the responsive activation docs are removed. `media`
stays on the three components as a deprecated prop with no effect, so
installs that pass it still type-check.

Header blocks keep `fold` and close their sheet or navigation menu when
the layout hides it at that breakpoint, which also releases the scroll
lock. Every Data Slot component also binds new roots on astro:after-swap,
before a site's own astro:page-load listeners run after ClientRouter
navigation; create() skips roots that are already bound.

All eight styles are regenerated. Liquid and the published @data-slot
^1.1.2 dependencies are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fulldev-ui ready!

Name Link
🔨 Latest commit 6f8b6aa
🔍 Latest deploy log https://app.netlify.com/projects/fulldev-ui/deploys/6adf37b0f95d0cdf092fa46c
😎 Deploy Preview https://deploy-preview-334--fulldev-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@silveltman
silveltman marked this pull request as ready for review October 26, 2026 11:32
@silveltman
silveltman merged commit 6ed056f into main Oct 26, 2026
9 checks passed
@silveltman
silveltman deleted the t3/data-slot-static-scripts branch October 26, 2026 11:35
@fulldev-release fulldev-release Bot mentioned this pull request Oct 26, 2026
silveltman pushed a commit that referenced this pull request Oct 26, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## fulldev-ui@0.26.0

### Minor Changes

- [#328](#328)
[`53e43a0`](53e43a0)
Thanks [@silveltman](https://github.com/silveltman)! - Add an optional
Image component with Astro Picture formats, responsive sources and an
unchanged single-image default.

- [#334](#334)
[`6ed056f`](6ed056f)
Thanks [@silveltman](https://github.com/silveltman)! - Data Slot
components start with their page script, with no loading helper. Dialog,
Sheet and NavigationMenu no longer load their controller per media
query: `media` is still accepted but has no effect, and the registry no
longer has the `on-media` item or `src/lib/dialog.ts`; a site that
installed them can delete `src/lib/on-media.ts` and `src/lib/dialog.ts`
once nothing imports them. Header blocks 1 to 5 take `fold="lg"`, the
default, or `fold="xl"` for the breakpoint between their mobile sheet
and desktop navigation, and close whichever one the layout hides at that
breakpoint, which also releases the sheet's scroll lock. Every Data Slot
component also binds new roots on `astro:after-swap`, so a site's own
`astro:page-load` command after ClientRouter navigation reaches a
started controller.

Co-authored-by: fulldev-release[bot] <336258566+fulldev-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant