-
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
Fix: The Copy button of the PostURL shouldn't be placed in the slug input #63706
base: trunk
Are you sure you want to change the base?
Fix: The Copy button of the PostURL shouldn't be placed in the slug input #63706
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 your first Pull Request and for helping build the future of Gutenberg and WordPress, @Rishit30G! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
@Rishit30G thank you for your PR. Sorry I wasn't clear. I didn't suggested to change what is copied. |
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.
See comment.
Hey @afercia! Screen.Recording.2024-07-19.at.11.00.44.AM.mov |
…m InputControl component
↗ | ||
</span> | ||
</a> | ||
<div>{ suffix && <Suffix>{ suffix }</Suffix> }</div> |
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.
is the <div>
necessary?
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.
Yes, as I'm using space-between
in styling so it was needed
@@ -12,4 +12,9 @@ export type ExternalLinkProps = { | |||
* The URL of the external resource. | |||
*/ | |||
href: string; | |||
/** | |||
* Allows for markup other than icons or shortcuts to be added to the menu item. |
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.
This description should be adjusted, as this component isn't s 'menu item'.
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.
Sure, can you suggest a better description
Thanks
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! Yes, this is how the Copy button should be placed. I left some comments, please have a look. I don't think the Input control and the input base components should be changed.
Note: the unit tests are failing because other components e.g. |
Hey @afercia, |
What?
Fixes #63700
Why?
As a user, one would expect the Copy button to copy the value inside the input field, because that's what the UI shows
How?
Change the first parameter in the
useCopyToClipboard
hook to/ + postSlug
frompermalink
Testing Instructions
Post Name
Link
Testing Instructions for Keyboard
Same as above
Screenshots or screencast
Screen.Recording.2024-07-18.at.8.59.40.AM.mov