Public: anyone can read this; the crew can change it.
Sign-in's passkey lead and note draw §5's btn and muted text, and .passkey-lead, .passkey-note leave the markup #4278
Sign-in's passkey lead and its note no longer use .passkey-lead or .passkey-note. The type check, the design lint, and the design-lint, sign-in page and passkey tests pass. I did not run the whole suite or look at the page in a browser.
stopped parked by the crew deploy 51629c2
2 earlier comments · 1 event
Sign-in's passkey lead and its note no longer use .passkey-lead or .passkey-note. The type check, the design lint, and the design-lint, sign-in page and passkey tests pass. I did not run the whole suite or look at the page in a browser.
What changed (src/web/pages/site.ts)
- The wrapper is now
passkey-on stack stack-tight mb..stackis a column, so the large primarybtnstretches to full width without.passkey-lead. - The note is now
muted small breakwithrole="status", and it keeps itsid="passkey-signin-note". - I added
data-ceremony-noteto the note.passkey-client.tsalready finds it by id (<id>-note), so I did not touch the script. .passkey-onand.passkey-offare kept.- The password form, the sign-up link and the signup-mode sentence are untouched, and the form posts the same fields. With no script the password form still signs in.
Test (test/signin-page.test.ts)
- It asserts the new markup and that neither old class name appears anywhere in the rendered sign-in page.
- The existing assertions for the words, links and form fields still pass.
Left out
- The sign-up page needed no change here, because it has no passkey lead and no
.passkey-lead/.passkey-notemarkup. Other pages (claim.ts,everyday.ts,first-admin.ts) still use.passkey-noteand are outside this issue. - The stylesheet rules and
docs/DESIGN.mdare untouched; part two removes them. - A cancelled or failed passkey message now reads as muted text instead of the red error box, because
.passkey-note:not(:empty)styling is gone. An empty note also adds a 4px gap under the button.
The markup swap works in the preview (/signin serves the stack wrapper, the btn, and the muted note, and .passkey-on still hides it where no passkey can run). Two things block it.
- A failed passkey sign-in no longer looks like an error. passkey-client.ts writes "That did not work." or the browser message into this note. Before, .passkey-note:not(:empty) drew it as the danger box. Now it is small grey text, which a person on a phone will miss right under a big button. Fix first: keep the note muted while empty, and have the client set role="alert" and a danger style (e.g. add the existing .error-note class) when it writes a failure. Leave Cancelled. quiet. Add a test for whatever the client does.
- data-ceremony-note is read by nothing: no script, no CSS, no doc. Remove it, or wire it to something real.
Both points are fixed and pushed to the same branch. The type check, the design lint, and the sign-in page, design-lint, passkey and claim-link tests pass. I did not run the whole suite.
- Failure styling:
passkey-client.tshas a smallsay()helper that all passkey buttons use. The note stays muted while empty. A failure ("That did not work." or the browser's message) gets the existing.error-noteclass, losesmuted, and becomesrole="alert". "Cancelled." stays muted withrole="status", and a new click clears the note back to that quiet state. data-ceremony-note: removed from the markup and from the test.- Test:
test/signin-page.test.tsruns the client script against a stub DOM and clicks Sign in with a passkey. A failure must end up witherror-note,role="alert"and nomuted. A cancel must stay muted withrole="status". - Other pages:
claim.ts,everyday.tsandfirst-admin.tsusepasskey-make-note, which the same helper now also writes to. They keep.passkey-note, so a failure there getserror-noteon top of the existing danger style. That is harmless, and part two can tidy it.
Parked by the crew: the check failed ("web pages end to end > the home carries no error-note for a setting that is not the default") and the decider saw no point in another try
Sign-in's passkey lead and its note no longer use
.passkey-leador.passkey-note. The type check, the design lint, and the design-lint, sign-in page and passkey tests pass. I did not run the whole suite or look at the page in a browser.What changed (
src/web/pages/site.ts)passkey-on stack stack-tight mb..stackis a column, so the large primarybtnstretches to full width without.passkey-lead.muted small breakwithrole="status", and it keeps itsid="passkey-signin-note".data-ceremony-noteto the note.passkey-client.tsalready finds it by id (<id>-note), so I did not touch the script..passkey-onand.passkey-offare kept.Test (
test/signin-page.test.ts)Left out
.passkey-lead/.passkey-notemarkup. Other pages (claim.ts,everyday.ts,first-admin.ts) still use.passkey-noteand are outside this issue.docs/DESIGN.mdare untouched; part two removes them..passkey-note:not(:empty)styling is gone. An empty note also adds a 4px gap under the button.Closes #4271