-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: View Transition API #3691
Conversation
Run & review this pull request in StackBlitz Codeflow. |
@manucorporat what do you think of this 🤔 |
I think this might be closer to the solution: We dont want to be blocking for too long, qwik already buffers the dom operations and commits them all in one go! |
@manucorporat I got your idea. I made some changes accordings to your #3684, and with more stuffs.
However, |
Interesting approach... I think it's pretty low risk approach! |
wonder if this is a RouteOutlet o QwikCityProvider api? it really configures a global thing of qwikcity |
The RouterOutlet, is just an Outlet, not the render itself. |
Happy to merge an iterate from here! |
@manucorporat I moved code from RouterOutlet to QwikCityProvider, and now the API looks like this <QwikCityProvider enableViewTransitionAPI>
// ...
</QwikCityProvider> In short, this code will set However, I still doesn't write anything when you click the Back button to go to prior page. There exists a large difference in popstate event handler between |
Gonna merge and do some minor fixes, I think we can enable by default (only for transitions) + disable the html root view-name layer with css. Seems like a no risk API to instruct the browser when the naviagtion happens, then developers can opt-in using CSS |
Amazing job! |
The other PR, i wanna merge, but it has a big API surface + big changes |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@builder.io/qwik](https://qwik.builder.io/) ([source](https://togithub.com/BuilderIO/qwik)) | [`0.102.0` -> `0.103.0`](https://renovatebot.com/diffs/npm/@builder.io%2fqwik/0.102.0/0.103.0) | [![age](https://badges.renovateapi.com/packages/npm/@builder.io%2fqwik/0.103.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@builder.io%2fqwik/0.103.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@builder.io%2fqwik/0.103.0/compatibility-slim/0.102.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@builder.io%2fqwik/0.103.0/confidence-slim/0.102.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>BuilderIO/qwik</summary> ### [`v0.103.0`](https://togithub.com/BuilderIO/qwik/releases/tag/v0.103.0) [Compare Source](https://togithub.com/BuilderIO/qwik/compare/v0.102.0...v0.103.0) #### What's Changed - docs: UX improvements for AI search by [@​steve8708](https://togithub.com/steve8708) in [QwikDev/qwik#3780 - docs: improve AIX by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3782 - fix `Implantation` typo all over the file by [@​egmaleta](https://togithub.com/egmaleta) in [QwikDev/qwik#3783 - docs: fix typo in callout.tsx by [@​eltociear](https://togithub.com/eltociear) in [QwikDev/qwik#3786 - docs: improve docs ai by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3790 - docs: fix improve ai docs v2 by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3798 - fix(eslint-plugin-qwik): remove warning for bigint now that it can be serialized by [@​steve8708](https://togithub.com/steve8708) in [QwikDev/qwik#3799 - fix(eslint): allow use method inside other use methods by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3804 - fix: agressive optimizer inlining by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3803 - fix: slot creation forgets vdom by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3809 - docs: fix redirects by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3808 - Improve use 'use-not-root' behavious in es-lint plugin by [@​Wimpert](https://togithub.com/Wimpert) in [QwikDev/qwik#3807 - docs: Semantic HTML update for all docs and playground examples by [@​AnthonyPAlicea](https://togithub.com/AnthonyPAlicea) in [QwikDev/qwik#3745 - fix: URL update after SSG Link navigation by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3810 - feat: use PUBLIC\_ prefix by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3817 - feat: aggressive client treeshaking by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3816 - docs: more ai improvements by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3815 - fix: children types by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3814 - fix: default prod build for node by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3812 - feat: server$ this will be defined most of the times by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3813 - fix: 🐛 Update starters vite-tsconfig-paths dependency to latest by [@​bjonesy](https://togithub.com/bjonesy) in [QwikDev/qwik#3793 - fix: allow enum literals by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3819 - docs: add mobile search by [@​zanettin](https://togithub.com/zanettin) in [QwikDev/qwik#3791 - fix: remove jsx warning by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3822 - feat: serialize server$ exceptions by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3821 - fix: only treeshake on client mode by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3820 - docs: speculative module fetching during dev by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3825 - docs: improve speculative module debugging docs by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3826 - docs: Endpoints typo by [@​PatrickJS](https://togithub.com/PatrickJS) in [QwikDev/qwik#3828 - fix: vite bundling conditionals by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3833 - feat: add eslint option to pass tsconfigFileNames by [@​gmfun](https://togithub.com/gmfun) in [QwikDev/qwik#2493 - feat: relax serialization rules by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#2338 - docs: speculative module fetching wording improvement by [@​hamatoyogi](https://togithub.com/hamatoyogi) in [QwikDev/qwik#3832 - docs: update slot by [@​mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#3829 - fix: relax aggressive treeshaking by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3835 - chore: deps release by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3836 - test: publish cli build artifacts by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3837 - docs: correct typo and update for consistency by [@​wtlin1228](https://togithub.com/wtlin1228) in [QwikDev/qwik#3834 - Pr docs cleanup by [@​mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#3838 - feat: View Transition API by [@​swwind](https://togithub.com/swwind) in [QwikDev/qwik#3691 - refactor: useStore is deep recursive by default by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3678 - fix: enable View Transition by default by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3839 - Add live cookie value support to fix stale values by [@​n8sabes](https://togithub.com/n8sabes) in [QwikDev/qwik#3667 - fix: pass --mode argument to child build commands by [@​DustinJSilk](https://togithub.com/DustinJSilk) in [QwikDev/qwik#3841 - chore: release qwik-city by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3843 #### New Contributors - [@​bjonesy](https://togithub.com/bjonesy) made their first contribution in [QwikDev/qwik#3793 - [@​gmfun](https://togithub.com/gmfun) made their first contribution in [QwikDev/qwik#2493 **Full Changelog**: QwikDev/qwik@v0.102.0...v0.103.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9pm on sunday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ascorbic/unpic-img). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTQuMCJ9-->
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [eslint-plugin-qwik](https://togithub.com/BuilderIO/qwik) | [`^0.102.0` -> `^0.103.0`](https://renovatebot.com/diffs/npm/eslint-plugin-qwik/0.102.0/0.103.0) | [![age](https://badges.renovateapi.com/packages/npm/eslint-plugin-qwik/0.103.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/eslint-plugin-qwik/0.103.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/eslint-plugin-qwik/0.103.0/compatibility-slim/0.102.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/eslint-plugin-qwik/0.103.0/confidence-slim/0.102.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>BuilderIO/qwik</summary> ### [`v0.103.0`](https://togithub.com/BuilderIO/qwik/releases/tag/v0.103.0) [Compare Source](https://togithub.com/BuilderIO/qwik/compare/v0.102.0...v0.103.0) #### What's Changed - docs: UX improvements for AI search by [@​steve8708](https://togithub.com/steve8708) in [QwikDev/qwik#3780 - docs: improve AIX by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3782 - fix `Implantation` typo all over the file by [@​egmaleta](https://togithub.com/egmaleta) in [QwikDev/qwik#3783 - docs: fix typo in callout.tsx by [@​eltociear](https://togithub.com/eltociear) in [QwikDev/qwik#3786 - docs: improve docs ai by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3790 - docs: fix improve ai docs v2 by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3798 - fix(eslint-plugin-qwik): remove warning for bigint now that it can be serialized by [@​steve8708](https://togithub.com/steve8708) in [QwikDev/qwik#3799 - fix(eslint): allow use method inside other use methods by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3804 - fix: agressive optimizer inlining by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3803 - fix: slot creation forgets vdom by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3809 - docs: fix redirects by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3808 - Improve use 'use-not-root' behavious in es-lint plugin by [@​Wimpert](https://togithub.com/Wimpert) in [QwikDev/qwik#3807 - docs: Semantic HTML update for all docs and playground examples by [@​AnthonyPAlicea](https://togithub.com/AnthonyPAlicea) in [QwikDev/qwik#3745 - fix: URL update after SSG Link navigation by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3810 - feat: use PUBLIC\_ prefix by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3817 - feat: aggressive client treeshaking by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3816 - docs: more ai improvements by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3815 - fix: children types by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3814 - fix: default prod build for node by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3812 - feat: server$ this will be defined most of the times by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3813 - fix: 🐛 Update starters vite-tsconfig-paths dependency to latest by [@​bjonesy](https://togithub.com/bjonesy) in [QwikDev/qwik#3793 - fix: allow enum literals by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3819 - docs: add mobile search by [@​zanettin](https://togithub.com/zanettin) in [QwikDev/qwik#3791 - fix: remove jsx warning by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3822 - feat: serialize server$ exceptions by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3821 - fix: only treeshake on client mode by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3820 - docs: speculative module fetching during dev by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3825 - docs: improve speculative module debugging docs by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3826 - docs: Endpoints typo by [@​PatrickJS](https://togithub.com/PatrickJS) in [QwikDev/qwik#3828 - fix: vite bundling conditionals by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3833 - feat: add eslint option to pass tsconfigFileNames by [@​gmfun](https://togithub.com/gmfun) in [QwikDev/qwik#2493 - feat: relax serialization rules by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#2338 - docs: speculative module fetching wording improvement by [@​hamatoyogi](https://togithub.com/hamatoyogi) in [QwikDev/qwik#3832 - docs: update slot by [@​mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#3829 - fix: relax aggressive treeshaking by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3835 - chore: deps release by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3836 - test: publish cli build artifacts by [@​adamdbradley](https://togithub.com/adamdbradley) in [QwikDev/qwik#3837 - docs: correct typo and update for consistency by [@​wtlin1228](https://togithub.com/wtlin1228) in [QwikDev/qwik#3834 - Pr docs cleanup by [@​mhevery](https://togithub.com/mhevery) in [QwikDev/qwik#3838 - feat: View Transition API by [@​swwind](https://togithub.com/swwind) in [QwikDev/qwik#3691 - refactor: useStore is deep recursive by default by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3678 - fix: enable View Transition by default by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3839 - Add live cookie value support to fix stale values by [@​n8sabes](https://togithub.com/n8sabes) in [QwikDev/qwik#3667 - fix: pass --mode argument to child build commands by [@​DustinJSilk](https://togithub.com/DustinJSilk) in [QwikDev/qwik#3841 - chore: release qwik-city by [@​manucorporat](https://togithub.com/manucorporat) in [QwikDev/qwik#3843 #### New Contributors - [@​bjonesy](https://togithub.com/bjonesy) made their first contribution in [QwikDev/qwik#3793 - [@​gmfun](https://togithub.com/gmfun) made their first contribution in [QwikDev/qwik#2493 **Full Changelog**: QwikDev/qwik@v0.102.0...v0.103.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9pm on sunday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ascorbic/unpic-img). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS41NC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNTQuMCJ9-->
What is it?
Description
#3664
Use cases and why
This is very brute force implement for supporting View Transition API.
I'm not 100% sure this code doesn't introduce other problems, just for showing my solution.
output.mp4
Checklist: