Skip to content

Replace ClipboardJS with the Clipboard API - #572

Merged
rbruhn merged 1 commit into
developmentfrom
replace-clipboardjs
Oct 17, 2026
Merged

rbruhn merged 1 commit into
developmentfrom
replace-clipboardjs

Conversation

@rbruhn

@rbruhn rbruhn commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #295.

Copy buttons

The team invite-link buttons on the admin event page (EventTeamPresenter::teamJoinUrlIcon()) used ClipboardJS, which calls the deprecated document.queryCommandSupported() and execCommand('copy'). ClipboardJS 2.0.11 is its latest version, so updating it wouldn't help.

  • A delegated click handler in resources/js/admin.js copies the button's data-clipboard-text with navigator.clipboard.writeText(), then shows "Copied to clipboard." (or a warning if the browser refuses). ClipboardJS gave no feedback.
  • The clipboard package and its window.ClipboardJS global are removed. The button markup is unchanged.
  • The built admin-app bundle no longer contains queryCommandSupported.

Docs

docs/lambdas.md drops BiospexLabelReconcile, which was deleted from AWS on 2026-10-17 (#505).

Tested locally

  • tests/Unit/Presenters/EventTeamPresenterTest.php: 8 passed (the markup is unchanged).
  • yarn build, then on a local admin event page: clicking a team's copy button copies its signup link (checked by pasting three links).

To verify on development

See #573.

The team invite-link copy buttons now use navigator.clipboard.writeText() and confirm with a notification, so the admin bundle no longer ships ClipboardJS and its deprecated queryCommandSupported and execCommand calls. Also drops the deleted BiospexLabelReconcile Lambda from the Lambda docs.
@rbruhn
rbruhn merged commit a4ccb8e into development Oct 17, 2026
2 checks passed
@rbruhn
rbruhn deleted the replace-clipboardjs branch October 17, 2026 20:41
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.

1 participant