Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

🐞 Header build hash: CSS ellipsis of the exact value with a Copy icon (ovcs) - #4715

Merged
Findeton merged 5 commits into
ovcsfrom
ovcs-short-build-hash-header
Dec 3, 2026
Merged

Findeton merged 5 commits into
ovcsfrom
ovcs-short-build-hash-header

Conversation

@Findeton

@Findeton Findeton commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Meta #15638. Félix superseded the reveal design: the only things kept are CSS truncation and a Copy icon.

Behaviour

  • When the release build hash in the shared ui-essentials Header (Version with maxLength={BUILD_HASH_PREFIX_LENGTH}) is longer than 12 characters, the exact full value is the span's text. CSS bounds the span (max-width: 13ch, overflow: hidden, white-space: nowrap, text-overflow: ellipsis, user-select: text). Nothing is cut with a JS substring, there is no literal …, and there's no title, tooltip, popover or reveal. If you select the whole hash and copy it by hand, you get every character.
  • A separate Copy icon button (aria-label "Copy hash") sits outside the selectable text and copies the exact raw value. It works from the keyboard. It appears on hover and on keyboard focus, with a focus outline, and on no-hover (touch) devices it's always visible. A visually hidden role=status line announces the result. If the clipboard isn't available, the hash text gets selected so it can be copied by hand.
  • Short values, placeholders (-, dev) and missing values are still plain static text with no control. The version string is never truncated.
  • Removed: shortBuildHash, the "Show full hash" popover, and its strings (hash.showFull, hash.fullTitle, hash.close). No changes to ballot trackers, metadata, receipts or deployment.

Tests (Version.test.tsx)

  • The raw 64-character hex value stays in the DOM, with no …. The ellipsis styles are on the value span, and the Copy button isn't inside it.
  • Selecting all of the value span gives the full digest.
  • There's no reveal: no [title], tooltip, dialog or textbox, and only one button.
  • Pressing Tab then Enter on Copy calls clipboard.writeText with the exact digest, and the status announces it. Without a clipboard, the full hash is selected.
  • Short, placeholder and missing values, and the version string, render without a control.

Not run: jest, lint, tsc and CI weren't run locally (this worktree has no Node toolchain). CI on this push is the first real run.

🤖 Generated with Claude Code

…al (ovcs)

The build hash next to Version in the shared ui-essentials Header (admin,
voting, ballot verifier and results portals) now shows its first 12 chars
plus an ellipsis when longer. Short/placeholder values render unchanged.
The full exact value stays in a focusable tooltip and screen-reader text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 2

  • release/10.0
  • feat/meta-12767/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Findeton and others added 2 commits December 3, 2026 23:18
… (ovcs)

Replaces the tooltip/DOM-attribute reveal of the shortened header build hash
with a named, keyboard-operable "Show full hash" button. It opens a labelled
dialog popover holding the exact full value in a read-only, pre-selected
field and a Copy button (exact value to the clipboard, announced via a
status line). If the clipboard is unavailable or refuses, the field is
re-selected and the status says to copy it manually.

Short, placeholder ("-", "dev") and missing values stay static text with no
control; a missing main is normalized to "" before the length comparison.
New strings added to all ui-core locales. Ballot hashes, release data and
authentication are untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reveal (ovcs)

Supersedes the "Show full hash" popover (Meta #15638). A long release build
hash in the shared Header now keeps its exact full value in the text node;
its bounded span is clipped by CSS (overflow hidden, nowrap, text-overflow
ellipsis) and stays selectable, so selecting all of it and copying by hand
yields every character. No JS substring, literal ellipsis, title, tooltip,
popover or reveal.

A separate, named, keyboard-operable Copy icon outside the selectable text
copies the exact raw value. It shows on hover and keyboard focus (with a
focus outline) and always on no-hover/touch devices; the result is announced
in a status line, and if the clipboard is unavailable the hash text is
selected for manual copying.

Short, placeholder ("-", "dev") and missing values remain static text with no
control. shortBuildHash and the reveal-only strings (showFull, fullTitle,
close) are removed. Ballot trackers, metadata, receipts and deployment are
untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Findeton Findeton changed the title 🐞 Header shows a short release build hash with the full value on reveal (ovcs) 🐞 Header build hash: CSS ellipsis of the exact value with a Copy icon (ovcs) Dec 3, 2026
Findeton and others added 2 commits December 3, 2026 23:42
…y keeps exact case (ovcs)

The Version root uses the MUI Typography "button" variant, which can apply
text-transform: uppercase. Some browsers (e.g. Safari) may copy the rendered
casing on native selection. Set textTransform: "none" on the clipped hash
span only; the Version text, the CSS ellipsis, the hover/focus Copy icon and
the no-reveal behaviour are unchanged.

Adds a synthetic jsdom regression asserting no transform and the full
lowercase digest in the DOM. Not verified in a real Safari.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… clip (ovcs)

The clipped hash text and its Copy icon now share one hash box. The icon is
absolutely positioned at the box's right edge inside a reserved right padding
(32px slot for a 28px button), so it never overlaps the text and showing it on
hover, keyboard focus or touch does not move the text.

The hash text is monospace with a fixed width of 11ch: the first 10 characters
plus the CSS ellipsis (BUILD_HASH_PREFIX_LENGTH 12 -> 10). The exact full
value stays in the selectable DOM text with text-transform: none; no JS
substring, tooltip, popover or reveal. Hash label and Version are unchanged.

Adds jsdom tests for the same-container/right-slot icon and the 10-character
CSS sizing. Actual rendered clipping was not checked in a real browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Findeton
Findeton merged commit d92d0b9 into ovcs Dec 3, 2026
32 of 34 checks passed
@Findeton
Findeton deleted the ovcs-short-build-hash-header branch December 3, 2026 23:51
Findeton added a commit that referenced this pull request Dec 3, 2026
Follow-up to #4715. Remove inherited letter spacing from the monospace
hash to match its ten-character CSS width. Keep raw text and inline copy
unchanged; regression checks the spacing.
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