-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Docs: Enhance documentation for Interactivity API and iAPI Router #73766
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
Conversation
- Clarified the behavior of `supports.interactivity` in block supports documentation. - Improved formatting and added descriptions for methods in the interactivity API reference, including `getElement()`, which now details its return structure and usage. - Updated the explanation of how server context and state merging works during navigation in the interactivity API documentation. - Added a warning note in the interactivity-router README regarding the use of `data-wp-router-region` within nested interactive elements.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
luisherranz
left a comment
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, but I think we should rewrite the attributes part of getElement.
luisherranz
left a comment
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, Juanma!
What?
See #70883
Documentation improvements for the Interactivity API and block supports.
Why?
The documentation needed clarification and improvements in several areas:
getServerStateandgetServerContextHow?
This PR makes the following documentation improvements:
Block Supports: Added clarification that setting
supports.interactivitytotrueis equivalent to setting bothclientNavigationandinteractivesub-properties totrueInteractivity API Reference:
Router README: Updated
data-wp-router-regiondocumentation to clarify that it must be used alongsidedata-wp-interactiveand added a warning callout about proper usage with nested elementsTesting Instructions
Since this PR only contains documentation changes, no functional testing is required. Please review the documentation changes for accuracy and clarity.
Testing Instructions for Keyboard
N/A - Documentation changes only
Screenshots or screencast
N/A - Documentation changes only