Skip to content

fragment_response: optional selector + vendor datastar.js bundle#23

Open
joaomdsg wants to merge 2 commits into
mainfrom
fragment-response-optional-selector
Open

fragment_response: optional selector + vendor datastar.js bundle#23
joaomdsg wants to merge 2 commits into
mainfrom
fragment-response-optional-selector

Conversation

@joaomdsg
Copy link
Copy Markdown
Member

Summary

  • fragment_response: selector becomes optional with a kw-form (fragment_response(body; selector=…)). Datastar v1.0 morphs into whichever element matches the outermost id in the payload, so most handlers no longer need to pass a selector; the datastar-selector header is emitted only when the caller explicitly overrides the id-based target. Positional form preserved. Matches the Unreleased CHANGELOG entry already on main.
  • examples/datastar-v1.0.1.js: vendors the Datastar v1.0.1 bundle so the bundled counter and CairoMakie demos run offline without the first-launch Downloads.download().

Test plan

  • julia --project=. -e 'using Pkg; Pkg.test()' — 515/515 pass locally
  • CI green on required checks
  • Doctest for the new fragment_response kw-form passes

joaomdsg added 2 commits May 26, 2026 13:24
Datastar v1.0 morphs into whichever element matches the outermost id
in the response payload, so most fragment handlers no longer need a
datastar-selector header. Make the selector argument optional + also
accept the keyword form; only emit the header when the caller
explicitly overrides the id-based default. Positional form preserved.

Matches the Unreleased CHANGELOG entry shipped earlier.
So the bundled counter and CairoMakie demos run offline without the
first-launch Downloads.download() step.
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