Repository navigation
Start each value under its label when the Details rows stack - #43
Conversation
In a card 380px wide or less, as on a phone or in the wallet's side column, each Details row stacks: the label, then its value on the line under it. The value kept the end alignment it has when the two sit side by side, so a short value sat at the far edge of the card, away from its label, and a long one wrapped ragged. Stacked, it now starts where the label does. Side by side, in a wider card, nothing changes. The narrow-card rule moves below `.check .v`, so its text-align wins. Both alignments are start and end rather than left and right, so a right-to-left page mirrors the layout instead of breaking it; left-to-right renders pixel-for-pixel as with left and right. The did:key test expected the mark at the right, above a long identifier; at 360px the rows stack, so it is now at the left, where the identifier starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Try it: https://digitalcredentials.github.io/verifier-plugin/pr-43/ Updates on every push to this PR, and goes away when it closes. The browser tests run against this copy too. |
|
Smoke test before merge, 6 November 2026, on b50acb1. Against the published preview (https://digitalcredentials.github.io/verifier-plugin/pr-43/):
CI on b50acb1: What merging changes:
Not checked: a real screen reader. The marks are hidden from screen readers, and the text read out is unchanged by this PR. Found while testing, out of scope here: two small problems with how the mark sits beside its value. Both happen on |
In the wallet: lcw-sandbox.org (9 November 2026)All clear. This PR has now reached the wallet. James deployed lcw-sandbox.org with lcw-front-end
|



For digitalcredentials/lcw-front-end#177 (make the web wallet usable on a phone).
What changes
The card's Details rows (Tampering, Issuer, Status, Dates, How it was built) are a label and a value.
Stacked, the value now starts under its label, with its mark at the start of the line.
Where a reader sees it:
The wallet picks this up when it next takes the
releasebuild: digitalcredentials/lcw-front-end#208, which already plans to.The code (5 lines of CSS)
In
src/verifier-credential.ts,.check .vsets the value's alignment:.check .v { text-align: start; }. That's@container (max-width: 380px)..check .v { text-align: end; … }. The two selectors are equally specific, so the later rule wins. Left where it was, above, the new line would have been silently ignored.rightbecomesendand the new rule usesstart, rather thanrightandleft. In English these are the same thing, and the screenshots below are byte-identical. In a right-to-left page they follow the reading direction. Withleft, a stacked value there would hug the far edge, the same problem in mirror image. The card isn't translated today, so this just avoids building in a new problem.How it was checked
New browser tests in
test/browser/states.spec.ts:stacked on a phone, each value starts under its label(360px, on the "Verified" and "Registry offline" demo credentials): each value is below its label and starts within 1px of the label's left edge. Fails on main ("Tampering: the value does not start under its label"); passes here.side by side in a wide card, each value keeps to the right(1024px, same two credentials): each value is beside its label and ends within 1px of the row's right edge. Passes on main and here; it guards the wide layout.stacked in a right-to-left page, each value starts under its label, at the right(360px): the same check, mirrored. It fails if the stacked rule usesleft, and passes withstart.One existing test changed on purpose:
a value too long for the row, such as an issuer's did:key, stays inside the card.Deliberate breaks, each judged by the test run's exit code, with control runs before and after to show the unbroken code passes. 7 of 7 caught:
.check .v, where it loses;leftinstead ofstart.Screenshots of the demo card, two runs each, main against this branch. They cover Verified, Registry offline, Issuer unknown, Expired and Not their seal, plus the Developer and JSON views:
In the wallet: main and this branch were each built and installed into a separate copy of the wallet, signed in to the sandbox demo account, and shown the demo credential.
Repeated runs:
switching views does not re-announce, and keeps focus on the button used. It fails on main in WebKit too: Safari's engine doesn't focus a button when it's clicked. CI runs Chromium only, where it passes. It's unrelated to this change.Repo checks:
npm run lint,npm run typecheck,npm test(156,425 passed) andnpm run buildpass.Independent review: a fresh reviewer, given only the code and the goal. 2 findings, neither blocking.
left/rightare physical, so a right-to-left page would show the stacked value at the far edge. This was reproduced (up to 209px off), fixed withstart/end, and is now covered by the right-to-left test.did:key, its mark sits alone on the line above it. The reviewer thinks the whitespace between the mark and the value in the markup lets the line break there. That's for a separate ticket if it's wanted.The reviewer also confirmed:
By hand: Sunny opened this PR's preview on a phone, and in Chrome at 400px, and checked the Details rows on the Verified, Registry offline and Issuer unknown credentials: each value starts under its label, including a value that wraps onto a second line.
How to undo
Revert the one commit. Nothing stored changes, and the wallet only sees the change once #208 takes a new
releasebuild.Reading guide (about 3 minutes)
src/verifier-credential.ts, the.checkrules. The narrow-card block now comes after.check .v, and holds both the one-column grid andtext-align: start..check .vitself saysendinstead ofright.test/browser/states.spec.ts:valueEdges, which measures where each value starts and ends;fromRight→fromLeft).🤖 Generated with Claude Code