-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Documentation: Consolidate editor filters and actions #42356
Conversation
I love the idea of having them in the same doc as |
It was only a draft because I was still compiling the description 😄 |
### Block Directory | ||
## Logging errors | ||
|
||
A JavaScript error in a part of the UI shouldn’t break the whole app. To solve this problem for users, React library uses a concept of an [“error boundary”](https://reactjs.org/docs/error-boundaries.html). Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, and display a fallback UI instead of the component tree that crashed. |
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.
The brief background about Error Boundaries in React really helps give some useful context before hoping into the hook! 👍🏻
What?
Follow-up for #42024.
All sections covering WordPress hooks in Block Editor Handbook are wrongly referencing filters. It should be "hooks" as we use both filters and actions.
Why?
This is also how documentation is structured for WordPress core. See https://developer.wordpress.org/plugins/hooks/.
How?
This PR tries to address the issue partially by renaming those documents that cover both filters and action. I didn't change URLs because it would require some bigger changes like updating all references to those pages and adding HTTP redirects so all external URLs continue to work.
Finally, I moved the section about Error Boundaries from the editor actions document that was disconnected from Block Editor Handbook to the one that previously covered only editor filters.