Skip to content
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

Improvements to copy to clipboard feature #2365

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

RFSH
Copy link
Member

@RFSH RFSH commented Oct 13, 2023

This PR,

  • Refactores the copyToClipboard function to return a promise.
  • Changes the share and cite popup links to use the same function. We were only using the deprecated API for copy in this case (which wasn't working properly on some browsers).
  • Dynamically changes the tooltip to say "Copied!" so users are aware of the action.
  • Adds a new property to ChaiseTooltip component to remount the tooltip if its content has changed. Without this change the tooltip arrowhead position would stay in the same place. As a result the tooltip would go outside the window in some cases.

…o users

the share and cite popup links were not using the same function as permalink,
and were only using the deprecated API for clipboard which wasn't working
properly on some browsers.

we also decided to change the tooltip as a feedback to users. to make sure
the tooltip is displayed in the proper place I had to change the tooltip
component a bit.
@RFSH RFSH requested a review from jrchudy October 13, 2023 18:50
@RFSH RFSH self-assigned this Oct 13, 2023
@RFSH RFSH merged commit c7b5227 into master Oct 18, 2023
1 check passed
@RFSH RFSH deleted the copy-to-clipboard-changes branch October 18, 2023 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants