The Wayback Machine - https://web.archive.org/web/20210807165246/https://github.com/go-gitea/gitea/pull/15899
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

Replace clipboard.js with async clipboard api #15899

Merged
merged 3 commits into from May 30, 2021
Merged

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented May 16, 2021

Use async clipboard api over this dependency, saving around 10kB bundle size before minify while delivering the same functionality.

The issue comment button works but does not have a popup indication (didn't have one before either). We could add some toast-style notifications in the future to fix that but I think it's out of scope of this PR.

@silverwind silverwind force-pushed the silverwind:clip branch from 7d7c744 to 52d235f May 16, 2021
Use async clipboard api [1] over this dependency, saving around 10kB
bundle size before minify while delivering the same functionality.

The issue comment button works but does not have a popup indication. We
could add some toast-style notifications in the future to fix that but I
think it's out of scope of this PR.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
@silverwind silverwind force-pushed the silverwind:clip branch from 52d235f to 251f5fb May 16, 2021
@6543 6543 added this to the 1.15.0 milestone May 16, 2021
@lunny
lunny approved these changes May 24, 2021
@zeripath
Copy link
Contributor

@zeripath zeripath commented May 30, 2021

make lgtm work

@zeripath zeripath merged commit 3720503 into go-gitea:main May 30, 2021
2 checks passed
2 checks passed
approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details
@silverwind silverwind deleted the silverwind:clip branch May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants