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

Implement ViewTransition for htmx and tabs #4379

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

frjo
Copy link
Member

@frjo frjo commented Feb 5, 2025

We added ViewTransition between page loads in #4359.

You can also add it to any javascript that change things on screen. In this PR I added it to tabs.js. It gives a subtle and nice animations when switching tabs.

htmx has built in support for it and this PR turn it on globally. (I did turn it off for the review modals on submission all, some minor bug made them pop in/out.)

Tested as well to remove all x-transition from modal placeholder and I think ViewTransition looks as good.

Read up on @view-transition her:

https://developer.mozilla.org/en-US/docs/Web/CSS/@view-transition

For hands on examples and explanations see https://www.youtube.com/watch?v=quvE1uu1f_I

@frjo frjo added Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Patch Mini change, used in release drafter labels Feb 5, 2025
@frjo frjo requested a review from theskumar February 5, 2025 19:40
@frjo frjo force-pushed the enhancement/view-transitions branch from 3bbf4ce to de81b15 Compare February 6, 2025 20:44
@frjo frjo added Status: Needs testing Tickets that need testing/qa Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team Status: Needs testing Tickets that need testing/qa Type: Enhancement This is an improvement of an existing thing (not a new thing, which would be a feature). Type: Patch Mini change, used in release drafter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant