-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
VT event lifecycle docs #5425
VT event lifecycle docs #5425
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I could see the following changes made:
|
|
||
```astro | ||
As the `astro:after-swap` event occurs immediately before the view transition ends, it's a good time to stop any loading indicators that might be running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"occurs immediately before the view transition ends" could be misleading: Surely it is near the end of the navigation, but "astro:after-swap" takes place immediately before the start of the animation (for the simulation immediately before the start of the "new" part). In any case, the loading indicator is already recorded on the screenshot and will not disappear so quickly, depending on the animation. A better place to remove it would be astro:after-preparation
because the photo has not yet been taken :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hearing two different comments here:
- "immediately before the view transition ends" isn't exactly right. What's a better, concise, way to describe it?
- Spinner has come back to haunt us. This now is the only real example (that's not, it's still safe to do this) example for this section. Can you suggest (code sample even better, but just in words like above is fine) what a good thing to happen here is? So that this section can have a proper example of its own that makes sense and is a realistic use case? Note: it's also OK to say that "there's very little that might target this event specifically, but it does provide you..."
@matthewp @martrapp I took a pass at this, and added a bit more intro content to the section. It was really well done! I would be happy with this releasing with the new features, and as we have time adding more of Martin's use-cases listed in PR 9090... either in time for launch or otherwise. I will call out:
Otherwise, please read for both accuracy but also nuance! We have lots of time to get this exactly right, not just sort of right. |
navigation process, not phase! phases are smaller pieces!
@sarah11918 Yeah, that different makes sense. Another thing that @martrapp and I were talking about, is that the Doing another pass myself now. |
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
As for the question of relevant examples for each event, you might want to check out the new examples at https://events-3bg.pages.dev/. For the document we could do this:
What do you think? @matthewp, @sarah11918 |
@martrapp Did you make that page?? That's lovely! I would suggest we link to it, rather than reproduce it. Many of our docs pages link to "community resources" and then it's less for our translators to translate, less of a maintenance burden on docs if things update. it also encourages community members to produce content which scales more than us doing everything ourselves. 😄 What would you think about that? |
That would be great! (Once the events are published and people can download and run the examples with a current Astro version) But we can definitely borrow for the missing after-swap example :-) |
@martrapp I would love it if you could add the |
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
OK! I'm happy with the content/structure of this page! @matthewp @martrapp - happy for you to do any final review here. Otherwise, Team Docs will just handle any last minute polishing as we notice in the morning! Thank you both for your contribution for this one! An exciting feature we're happy to get into docs! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout error due to wrong quotation marks, but otherwise I'm very happy with this section!
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Description (required)
Documents the new lifecycle events from: withastro/astro#9090
Related issues & labels (optional)
For Astro version:
3.6
. See astro PR #9090.