Skip to content

feat(website): add copy buttons to triage columns#5525

Open
Yong-yuan-X wants to merge 1 commit into
google:masterfrom
Yong-yuan-X:fix/5368-triage-copy-buttons
Open

feat(website): add copy buttons to triage columns#5525
Yong-yuan-X wants to merge 1 commit into
google:masterfrom
Yong-yuan-X:fix/5368-triage-copy-buttons

Conversation

@Yong-yuan-X

Copy link
Copy Markdown

Overview

Adds a floating copy-to-clipboard button to each result column on the /triage page, making it easier to copy conversion data during local testing.

Fixes #5368

Details

  • Adds a copy icon to the bottom-right corner of each result box.
  • Keeps the copy button visible while the JSON content is scrolled.
  • Copies the complete formatted JSON for the selected source.
  • Disables copying while data is unavailable or loading.
  • Displays a check icon and a Copied label after a successful copy.
  • Restores the copy icon after 1.5 seconds.
  • Uses the existing @github/clipboard-copy-element component.

Screenshots

Copy buttons

image

Copy feedback

image

Testing

  • Ran pnpm run build.

  • Launched the website emulator with OAuth bypass enabled:

    BYPASS_OAUTH_FOR_LOCAL_DEV=true make run-website-emulator
  • Loaded CVE-2021-44228 from api.osv.dev.

  • Verified that each column copies its complete JSON content.

  • Verified that the button remains fixed after scrolling the result content.

  • Verified that clicking the button displays visible feedback and then resets.

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.

Add a copy to clipboard icon to triage boxes

1 participant