Skip to content

Clipboard copy enhancements (#27669) #27681

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

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

GiteaBot
Copy link
Collaborator

Backport #27669 by @silverwind

  1. Do not show temporary tooltips that are triggered from within dropdowns. Previously this resulted in the tooltip being stuck to top-left of the page like seen on issue comment URL copy. I could not figure out any tippy options that prevent this, so I think it's better to just not show it.
  2. Refactor initGlobalCopyToClipboardListener so that it does not run a often useless document.querySelector on every click, make data-clipboard-text-type work with data-clipboard-target. No use in current code base but still good to have. Finally some minor code cleanup in the function.

Point 1 is for this copy button:

image

1. Do not show temporary tooltips that are triggered from within
dropdowns. Previously this resulted in the tooltip being stuck to
top-left of the page like seen on issue comment URL copy. I could not
figure out any tippy options that prevent this, so I think it's better
to just not show it.
1. Refactor `initGlobalCopyToClipboardListener` so that it does not run
a often useless `document.querySelector` on every click, make
`data-clipboard-text-type` work with `data-clipboard-target`. No use in
current code base but still good to have. Finally some minor code
cleanup in the function.

Point 1 is for this copy button:

<img width="229" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/81f34746-8ea5-43d9-8c6f-f6f417a9e4ad">

---------

Co-authored-by: Giteabot <[email protected]>
@GiteaBot GiteaBot added modifies/frontend skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Oct 18, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 18, 2023
@GiteaBot GiteaBot added this to the 1.21.0 milestone Oct 18, 2023
@GiteaBot GiteaBot requested review from delvh and wxiaoguang October 18, 2023 15:16
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 18, 2023
@silverwind silverwind enabled auto-merge (squash) October 18, 2023 16:23
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 18, 2023
@silverwind silverwind merged commit 0b8b007 into go-gitea:release/v1.21 Oct 18, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants