Skip to content

Add entity-provider functions in the core-data documentation#51142

Closed
aurooba wants to merge 3 commits intoWordPress:trunkfrom
aurooba:add/entity-provider-documentation
Closed

Add entity-provider functions in the core-data documentation#51142
aurooba wants to merge 3 commits intoWordPress:trunkfrom
aurooba:add/entity-provider-documentation

Conversation

@aurooba
Copy link
Member

@aurooba aurooba commented May 31, 2023

What?

This PR updates the documentation for the core-data package to include the hooks and providers in the core-data/src/entity-provider.js file.

Why?

Folks outside of just core can use functions like useEntityProp and they should be documented and available in the handbook

How?

So I had to make a small code change in order for this to work well. the EntityProvider function was being exported as a default function. As far as I could tell, there's no way for me to provide an alternative name so docgen would name this function default in the markdown file, which is no good.

So I switched it so that it's no longer a default export and just a normal named export from the file. From what I can tell, this doesn't cause any issues anywhere, but I'd love for someone to confirm this!

@aurooba aurooba requested a review from nerrad as a code owner May 31, 2023 21:50
@aurooba aurooba added the [Package] Core data /packages/core-data label Jun 8, 2023
@Mamaduka Mamaduka requested a review from adamziel June 13, 2023 06:02
@aurooba aurooba added the [Type] Developer Documentation Documentation for developers label Jun 16, 2023
@bacoords
Copy link
Contributor

+1 to getting this reviewed and merged!

@carstingaxion
Copy link
Contributor

Is this maybe done by #63528? It seems similar, but I’m not sure.

@github-actions
Copy link

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: aurooba <aurooba@git.wordpress.org>
Co-authored-by: bacoords <bacoords@git.wordpress.org>
Co-authored-by: carstingaxion <carstenbach@git.wordpress.org>

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

@aurooba
Copy link
Member Author

aurooba commented Jul 17, 2024

Is this maybe done by #63528? It seems similar, but I’m not sure.

Correct! This PR from a year ago has been made redundant by that more recent PR. I'll close it out.

@aurooba aurooba closed this Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Core data /packages/core-data [Type] Developer Documentation Documentation for developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants