-
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
Commands: update cmdk #63465
Commands: update cmdk #63465
Conversation
Size Change: +867 B (+0.05%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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. |
'aria-label', | ||
__( 'Command suggestions' ) | ||
); | ||
}, [ commandListRef.current ] ); |
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.
Nice :)
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.
LGTM 👍
@@ -287,7 +277,10 @@ export function CommandMenu() { | |||
/> | |||
<Icon icon={ inputIcon } /> | |||
</div> | |||
<Command.List ref={ commandListRef }> | |||
<Command.List | |||
ref={ commandListRef } |
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.
I think this ref can be removed now?
See also line 195.
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.
Nice catch! Indeed, the ref is no longer necessary. Deleted by 0a0ecc9
Nice clean up, thanks for taking care of this @t-hamano . |
* Commands: update cmdk * Remove unused ref Co-authored-by: t-hamano <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: afercia <[email protected]>
* Commands: update cmdk * Remove unused ref Co-authored-by: t-hamano <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: afercia <[email protected]>
Fixes #59703
What?
This PR updates the command package cmdk from version
0.2.0
to1.0.0
.At the same time, it removes a temporary workaround for an issue that has been resolved upstream.
Why?
By updating cmdk to version
1.0.0
, this temporary workaround is no longer necessary.How?
Regarding updating the npm packages, I followed the instructions in the article, but please let me know if I'm wrong.
packages/commands/package.json
file, I manually updated the version of thecmdk
line to^1.0.0
.npm install
For labels, I removed the temporary workaround code. Instead, I added a new
label
prop that the List component now supports.Testing Instructions
role="listbox"
attribute should still have the labelCommand suggestions
(I've simplified the code for easier reading).