-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 documentation for EditorHistoryRedo and EditorHistoryUndo #60932
Add documentation for EditorHistoryRedo and EditorHistoryUndo #60932
Conversation
/** @typedef {import('react').Ref<HTMLElement>} Ref */ | ||
|
||
/** | ||
* Component to Renders the redo button for the editor history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Component to Renders the redo button for the editor history. | |
* Renders the redo button for the editor history. |
/** @typedef {import('react').Ref<HTMLElement>} Ref */ | ||
|
||
/** | ||
* Component to Renders the undo button for the editor history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Component to Renders the undo button for the editor history. | |
* Renders the undo button for the editor history. |
You'll need to build the docs after the change.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I've left two small comments about the description, but the most important part is that we have to move the comments above the exported module, in order for the docs generation script to pick them up.
So move what you wrote above: export default forwardRef( EditorHistoryUndo );
and for redo respectively.
After you do that, you just have to npm run docs:build
and not manually update the README file. I'll update the main issue with these info.
That worked like charm. Thanks for the help. |
* Renders the redo button for the editor history. | ||
* | ||
* @param {Object} props - Props. | ||
* @param {Ref} ref - Reference with the element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comment, sorry about not doing it before. Let's update both Ref descriptions to Forwarded ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
What?
Part of: #60358
Added documentation in the readme for
EditorHistoryRedo
andEditorHistoryUndo
components and also on components itself.