Open
Description
What problem does this address?
Working with any of the data modules provided by WordPress can be very confusing. When looking at the Data Modules section in the handbook, there are almost no code examples for developers to use as reference.
I would love to see an example for each action or selector that is exposed for use.
Packages:
-
core/annotationsedit @t-hamano the selector and actions in theannotations
package are all experimental - core/block-editor - Add examples for core/block-editor selectors and actions #51853
- core/blocks
- core/customize-widgets - Add @example tags to the customize-widgets package #52141
- core/data - [Documentation] Add examples for
core/data
package #42639 - core/edit-post
- core/edit-site
- core/edit-widgets
- core/editor
- core/keyboard-shortcuts [Documentation] Add examples for core/keyboard-shortcut package #42831
- core/notices - [Documentation] Add @example for getNotices to create example in the handbook. #42023
-
core/nux- Package was removed with Remove the nux package #46110 - core/preferences
-
core/reusable-blocksedit @t-hamano the selector and actions in theannotations
package are all experimental - core/rich-text - Add @examples to the @wordpress/rich-text package selectors and hide the actions from documentation. #52089
- core/viewport [Documentation] Add examples for core/viewport package #42921
What is your proposed solution?
Add an @example tag to each docblock. This will be picked up by the documentation generator and added to the handbook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment