Docs: add JSDoc for getUserLabel in users autocompleter#73651
Docs: add JSDoc for getUserLabel in users autocompleter#73651juanfra merged 2 commits intoWordPress:trunkfrom
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks for adding this JSDoc block. It clarifies the user parameter and return value for getUserLabel and should improve editor/IDE hints. Since it only touches documentation and not runtime behavior, this looks good to me. |
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
juanfra
left a comment
There was a problem hiding this comment.
Thanks for the PR. I'd update the method description and the @return.
Co-authored-by: Juan Aldasoro <[email protected]>
|
@juanfra Thanks your suggested change applied. |
|
The The project is also slowly switching to TypeScript, which is better at typing similar arguments. |
Adds a JSDoc comment block for the
getUserLabelhelper function in the users autocompleter. This documents theuserparameter and clarifies the returned React component for better maintainability and IDE support.Why
Improves code readability and provides better tooling support (hover documentation, type hints) without changing any runtime behavior.
Changes
getUserLabelinpackages/editor/src/components/autocompleters/user.jsFiles Changed
packages/editor/src/components/autocompleters/user.js