-
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
Minor improvements for the permalink Copy to clipboard button #6472
Minor improvements for the permalink Copy to clipboard button #6472
Conversation
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 improvement, maybe we should hide the borders completely when the button has the is-copied
class. It feels a bit strange to be able to hover it even if disabled.
…n the permalink is copied.
@youknowriad thanks. In the latest commit:
Question: should the button "noop" when the permalink is already copied? Not sure... TIL: updating the tooltip to empty string or |
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.
Maybe we shouldn't really disable the button but make it look disabled. I'm asking because right now when I copy, I don't see the tooltip "Permalink copied" I have to move away from the button and hover back.
@youknowriad it's not disabled :)
that's just how the tooltip works on any button: it disappears when clicking, also on master. |
I guess we should leave the tooltip fix for another PR in that case :) |
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 👍
Thanks! |
@@ -82,9 +82,9 @@ class ClipboardButton extends Component { | |||
|
|||
return ( | |||
<span ref={ this.bindContainer }> | |||
<Button { ...buttonProps } className={ classes }> | |||
<IconButton { ...buttonProps } icon="admin-links" className={ classes }> |
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.
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.
Oh I missed that sorry :(
Will have a look. |
Waiting for #5494, I'd like to propose a few minor improvements for the permalink "Copy" button.
This PR tries to re-use existing component and patterns. Specifically:
IconButton
component instead of aButton
classnames()
to conditionally apply theis-copied
CSS classScreenshot before:
After: