Skip to content

Fix /id copy lyrics button layout regression - #145

Merged
tacticalnoot merged 1 commit into
mainfrom
codex/fix-copy-lyrics-button-layout
May 16, 2026
Merged

Fix /id copy lyrics button layout regression#145
tacticalnoot merged 1 commit into
mainfrom
codex/fix-copy-lyrics-button-layout

Conversation

@tacticalnoot

Copy link
Copy Markdown
Owner

Motivation

  • Prevent the floating copy button on the /[id] page from expanding / breaking its hit area when lyrics are large by removing the long lyrics payload from the DOM attribute and keeping the button a small fixed control.

Description

  • Removed data-lyrics={lyricsDisplay} from src/pages/[id].astro and injected a server-side lyricsToCopy constant via JSON.stringify(lyricsDisplay), and updated the inline click handler to call navigator.clipboard.writeText(lyricsToCopy) while preserving the existing “Copied” / “Copy failed” feedback.

Testing

  • Ran pnpm -s check; the command completed but reported unrelated pre-existing type errors in other components, so no new type errors were introduced by this change.

Codex Task

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying smol-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6a6a123
Status:⚡️  Build in progress...

View logs

@tacticalnoot
tacticalnoot merged commit 9b2ae90 into main May 16, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant