Closed martrapp closed 8 months ago
Latest commit: adf00d0e156a02f80197b6af086762120af22bd2
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
!preview transition-reload
> root@0.0.0 release /home/runner/work/compiler/compiler > changeset publish "--tag" "next--transition-reload" 🦋 warn ===============================IMPORTANT!=============================== 🦋 warn Packages will be released under the next--transition-reload tag 🦋 warn ---------------------------------------------------------------------- 🦋 info npm info @astrojs/compiler 🦋 info @astrojs/compiler is being published because our local version (0.0.0-transition-reload-20240211162919) has not been published on npm 🦋 info Publishing "@astrojs/compiler" at "0.0.0-transition-reload-20240211162919" 🦋 success packages published successfully: 🦋 @astrojs/compiler@0.0.0-transition-reload-20240211162919 🦋 Creating git tag... 🦋 New tag: @astrojs/compiler@0.0.0-transition-reload-20240211162919
/cc @withastro/maintainers-docs for help with the warning messages and changeset.
This one depends on https://github.com/withastro/astro/pull/9977 So i will merge with/after v4.5
Haha, thank you for pointing that out! Yes, the "ECMAScript Module" is a bit bulky. I would typically use ESM in that context, but I do not like to use abbreviations when I can't properly introduce them. I guess we go for "module scripts" as it becomes clear from the context.
Changes
Depends on https://github.com/withastro/astro/pull/9977
SupportsWarns iftransition:reload
as a nice Astro way to setdata-astro-reload
.data-astro-*
attributes are used the wrong way during view transitions.For some time now, you can set
data-astro-reload
to a tag to skip view transitions in favor of full page loads. https://github.com/withastro/astro/pull/9977 will also usedata-astro-reloaddata-astro-rerun
to mark<scripts>
for re-execution during view transitions.Update:
Since we have now separated
data-astro-reload
anddata-astro-rerun
(for scripts), I would stay with the data attributes and prefer not to introduce any additional directives.The original warnings about transition:reload
were unnecessary as they are better covered by packages/astro/astro-jsx.d.tsare carried over.Testing
added test case
Docs
I will open a PR if this one gets accepted, see https://github.com/withastro/docs/pull/6856