Skip to content
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 docs for some dynamically generated selectors in the core-data store #64269

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Aug 5, 2024

What?

This PR manually adds documentation for the following dynamically generated selectors of the core/data store:

  • getPostType
  • getPostTypes
  • getTaxonomy
  • getTaxonomies

Part of #64215

Why?

These are missed by the docgen tool and are much more user-friendly and docs are great :)

@ryanwelcher ryanwelcher added [Type] Developer Documentation Documentation for developers Developer Experience Ideas about improving block and theme developer experience labels Aug 5, 2024
Copy link

github-actions bot commented Aug 5, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ryanwelcher <welcher@git.wordpress.org>
Co-authored-by: justintadlock <greenshady@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ryanwelcher
Copy link
Contributor Author

This is the first of a few PRs of this type. I wanted to get this merged to see how it looks in the docs and perhaps allow for some other contributors to take part in this effort.

<!-- START TOKEN(Autogenerated selectors|../../../packages/core-data/src/selectors.ts) -->

### canUser
#### canUser
Copy link
Contributor

@justintadlock justintadlock Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have been changed to an <h4> (####)? It appears to be a sub-heading for Selectors, which is an <h2>, and the other sub-headings above are all <h3>s.

Also, same question for the other sub-heading changes later. Otherwise, changes look good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. That seems odd. Those were all generated by doc gen. Let me look into it

Copy link
Contributor

@justintadlock justintadlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@ryanwelcher ryanwelcher merged commit 6078a01 into trunk Aug 5, 2024
62 checks passed
@ryanwelcher ryanwelcher deleted the feature/document-dynamic-selectors branch August 5, 2024 19:08
@github-actions github-actions bot added this to the Gutenberg 19.0 milestone Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Developer Experience Ideas about improving block and theme developer experience [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants