feat: MPS-24 — click-to-copy checksum hashes + styled report table
Operator: make the checksum report hashes click-to-copy (they were unstyled and overflowing the column). - New reusable static/js/copy.js: delegated [data-copy] handler, async Clipboard API + hidden-textarea/execCommand fallback, transient 'Copied!' feedback. Generic (not checksum-specific) so other ad-hoc inline copy buttons can migrate later. Cache-busted (?v=git_hash). - content.j2: each hash wrapped in button.copy-hash via a local Jinja macro (DRY). Capability-driven: no-JS the hash text is still visible + selectable. - New .checksum-table / .copy-hash CSS: table-layout:fixed + word-break:break-all so the 64-char SHA wraps fully visible instead of truncating; theme-aware tokens only (dark-mode correct, no [data-theme] override that could regress like the trans-blue bug). - /styleguide#copyhash added. Test: test_checksum_report_is_click_to_copy. 1151 passed. - Docs: mps-24.md Phase 2.8q.
This commit is contained in:
parent
52e6c57145
commit
5888848999
6 changed files with 229 additions and 2 deletions
|
|
@ -363,6 +363,19 @@ Tests (`test_functional.py::TestProductTagsSpa`):
|
|||
Deferred (occasional click, not the hot path): AJAX-ifying the
|
||||
"Suggest categories" link — still a full navigation by design.
|
||||
|
||||
**Phase 2.8q — click-to-copy hashes + styled checksum table** (shipped
|
||||
2026-05-18): operator: make the checksum hashes click-to-copy (they
|
||||
were unstyled, overflowing the column). New reusable
|
||||
`static/js/copy.js` (delegated `[data-copy]`, async Clipboard API +
|
||||
hidden-textarea fallback, "Copied!" feedback, cache-busted) — generic,
|
||||
not checksum-specific. `content.j2` wraps each hash in a
|
||||
`button.copy-hash` (local Jinja macro, DRY). New `.checksum-table` /
|
||||
`.copy-hash` CSS: `table-layout:fixed` + `word-break:break-all` so the
|
||||
64-char SHA wraps fully visible instead of truncating; theme-aware
|
||||
tokens only (no `[data-theme]` overrides → can't re-introduce the
|
||||
trans-blue-class bug). `/styleguide#copyhash` added. Test:
|
||||
`test_checksum_report_is_click_to_copy`.
|
||||
|
||||
**Phase 2.8p — Checksums as a verifiable page report** (shipped
|
||||
2026-05-17): operator wants the content page's "Checksums" panel to
|
||||
cover the whole page, not just the product file —
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue