[PR #2720] [MERGED] Use HTML button element for copying to clipboard #3935

Closed
opened 2026-02-26 13:35:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/2720
Author: @scallaway
Created: 2/27/2025
Status: Merged
Merged: 2/27/2025
Merged by: @MickLesk

Base: mainHead: copy-to-clipboard-button


📝 Commits (1)

  • 6105fc4 feat: use HTML button element for copying to clipboard

📊 Changes

1 file changed (+4 additions, -8 deletions)

View changed files

📝 frontend/src/components/ui/code-copy-button.tsx (+4 -8)

📄 Description

✍️ Description

It's much more semantic to use the <button /> HTML component rather than trying to build the same functionality out of a <div /> so that's what is updated here.

This also updates some of the classes that were on the button as they're no longer required and removes some commented out code that doesn't need to be left around.

There was also a <span /> with the contents "Copy" that I couldn't work out when it was meant to be displayed, so I swapped that over to an HTML tooltip on the <button />.

Note, I didn't create a ticket for this initially as I just discovered it when I was going through the site and couldn't copy to clipboard using Vimium (it couldn't find the button).

Before this PR can be reviewed, the following must be completed:

  • Self-review performed – Code follows established patterns and conventions.
  • Testing performed – Manual QA has been done

🛠️ Type of Change

Select all that apply:

  • [] 🆕 New script – A fully functional and tested script or script set.
  • [] 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • [] 💥 Breaking change – Alters existing functionality in a way that may require updates.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/2720 **Author:** [@scallaway](https://github.com/scallaway) **Created:** 2/27/2025 **Status:** ✅ Merged **Merged:** 2/27/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `copy-to-clipboard-button` --- ### 📝 Commits (1) - [`6105fc4`](https://github.com/community-scripts/ProxmoxVE/commit/6105fc49914329b09365f7e5821b0c19d34b0736) feat: use HTML button element for copying to clipboard ### 📊 Changes **1 file changed** (+4 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/ui/code-copy-button.tsx` (+4 -8) </details> ### 📄 Description ## ✍️ Description It's much more semantic to use the `<button />` HTML component rather than trying to build the same functionality out of a `<div />` so that's what is updated here. This also updates some of the classes that were on the button as they're no longer required and removes some commented out code that doesn't need to be left around. There was also a `<span />` with the contents "Copy" that I couldn't work out when it was meant to be displayed, so I swapped that over to an HTML tooltip on the `<button />`. Note, I didn't create a ticket for this initially as I just discovered it when I was going through the site and couldn't copy to clipboard using Vimium (it couldn't find the button). Before this PR can be reviewed, the following must be completed: - [x] **Self-review performed** – Code follows established patterns and conventions. - [x] **Testing performed** – Manual QA has been done ## 🛠️ Type of Change Select all that apply: - [] 🆕 **New script** – A fully functional and tested script or script set. - [] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [X] ✨ **New feature** – Adds new, non-breaking functionality. - [] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 13:35:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#3935
No description provided.