Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix view transitions with client:only components #8727

Closed
wants to merge 17 commits into from
Closed

Conversation

martrapp
Copy link
Member

@martrapp martrapp commented Oct 2, 2023

Changes

The original issue is #8114. Persistent client:only components lose their styling on transition.
This only happens with astro dev, not with astro build.
The reason was that the HTML files contained only statically generated styles, and the comparison between the old DOM and the new file removed the client-side generated styles.
Fix #8472 fixed this by attempting to identify these client-generated styles and retain them.
This caused several issues where old styles were not deleted during the transition, even though they should have been. (#8604, #8674)

Testing

Manually tested with code from #8604.

Docs

n/a, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Oct 2, 2023

🦋 Changeset detected

Latest commit: 068e618

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

@martrapp martrapp marked this pull request as draft October 2, 2023 15:04
@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 2, 2023
@github-actions github-actions bot added feat: markdown Related to Markdown (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope) pkg: react Related to React (scope) pkg: preact Related to Preact (scope) pkg: solid Related to Solid (scope) pkg: lit Related to Lit (scope) pkg: integration Related to any renderer integration (scope) labels Oct 4, 2023
@martrapp martrapp closed this Oct 4, 2023
@martrapp
Copy link
Member Author

martrapp commented Oct 4, 2023

Replaced by #8745

@martrapp martrapp deleted the mt/client-only branch October 22, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: lit Related to Lit (scope) pkg: preact Related to Preact (scope) pkg: react Related to React (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope) pkg: vue Related to Vue (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants