-
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
Add code examples for actions/selectors in Data Module packages. #42125
Comments
#42023 introduced one example and makes usage much clearer for getNotices |
In case you weren't aware, some resources that you may want to draw off of, for core/data: https://github.com/WordPress/gutenberg/blob/bd06705979ad63ace26d15de47144c253c3b0fc8/docs/getting-started/data.md |
I have added missing data module references by #42651.
And I would love to help add code examples too 😊 |
This is fantastic! Thanks for putting that together. I've updated the list. |
@ryanwelcher |
I have created PR #42921 about core/viewport. |
I noticed that of the references I added in #42651, the selector and actions in the |
I noticed that the selector and actions in the |
It probably makes sense to exclude packages that are fully experimental. |
Some package are not exporting their stores. To keep the DX consistent, I have created the following PRs to to export the store: |
@troychaplin you might be interested in this issue. |
I have added a few examples in core/editor in #63768, need a label added |
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 experimentalcore/blocks
actions #42637@example
entries to the public API exposed incore/blocks
#42745core/data
package #42639core/nux- Package was removed with Remove the nux package #46110core/reusable-blocksedit @t-hamano the selector and actions in theannotations
package are all experimentalWhat 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.
The text was updated successfully, but these errors were encountered: