-
-
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
Document swapFunctions of astro:transitions/client #9084
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
I'm wondering whether we should have a nice API entry for Since it's something we import from |
Yes, definitively. It could be part of #7961! But i would not add it to the API section before the events. You use the custom swap functions to redefine the swap function of the event object. |
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.
OK, so I am now really feeling the lack of a section in API reference for astro:transitions
😄 But for now, for this addition, I think we can do this, then separately let's get a new section in the API reference page and we'll come back here and link to a proper full reference of all these things!
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Thank you very much for your help Sarah! There is a reason why Astro Docs have such a good reputation 💜 |
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.
Thanks for the helpful polish on this, @martrapp ! Approving for docs! (Wait, this is docs...)
}; | ||
|
||
... | ||
ev.swap = () => mySwap(ev.newDocument); |
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.
ev.swap = () => mySwap(ev.newDocument); | |
event.swap = () => mySwap(event.newDocument); |
Last tiny tiny thing: assuming that ev
stands for event
, we generally prefer to write these words out in full as they can help people who aren't used to standard abbreviations. This would be my preference, if correct!
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.
Good one! I had used ev
for consistency with the rest of the page. Now everything is consistent again ;-)
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.
LGTM @martrapp, good work! 💜
Description (required)
In 4.8.0 10908 we introduced building blocks for custom swap() functions. Up to now we didn't properly document and export them. We first wanted to see if they worked. They did.
This PR is intended to discuss and close this technical debt.
For Astro version:
4.15.0
. See astro PR 11708.