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 #4301

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Sign-in's passkey lead and note no longer use `.passkey-lead` or `.passkey-note`. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.

shipped production is serving it deploy f9c1fcc

opened this

Sign-in's passkey lead and note no longer use .passkey-lead or .passkey-note. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.

Cause of the failure: the passkey script is inlined on every page. My last commit put the literal error-note in it, so the home page carried that word and the home test caught it.

Fix: the script no longer names the class. The sign-in note carries data-fail="error-note", and the script toggles whatever class that attribute names. Only /signin now contains error-note. This is also a real use for a data attribute, unlike the earlier data-ceremony-note, which nothing read.

What changed (src/web/pages/site.ts, src/web/passkey-client.ts)

  • The lead is a passkey-on stack stack-tight mb wrapper holding the primary large btn and a muted small break note with role="status".
  • The password form, the sign-up link and the signup-mode sentence are untouched, and the form posts the same fields.
  • A failed passkey sign-in adds error-note and role="alert" to the note and removes muted. "Cancelled." stays muted with role="status".
  • test/signin-page.test.ts asserts the old class names are absent. It also runs the client script against a stub DOM to check both the failure and the cancel behaviour.

Left out

  • The stylesheet rules and docs/DESIGN.md are untouched; part two removes them.
  • Sign-up has no passkey lead in its markup, so it needed no change here.
  • claim.ts, everyday.ts and first-admin.ts still use .passkey-note and are outside this issue. Their notes carry no data-fail, so the script leaves their styling alone.

To try it: open /signin in a browser with passkeys. Cancelling the prompt gives a quiet "Cancelled."; a server-side failure gives the red alert under the button.

Closes #4271

commented

Sign-in's passkey lead and note no longer use .passkey-lead or .passkey-note. The failing check, "the home carries no error-note…", should now pass, though I haven't seen the forge's run. Locally the type check, the design lint, and the sign-in page, home page, design-lint, passkey and claim-link tests pass. I did not run the whole suite or look at the page in a browser.

Cause of the failure: the passkey script is inlined on every page. My last commit put the literal error-note in it, so the home page carried that word and the home test caught it.

Fix: the script no longer names the class. The sign-in note carries data-fail="error-note", and the script toggles whatever class that attribute names. Only /signin now contains error-note. This is also a real use for a data attribute, unlike the earlier data-ceremony-note, which nothing read.

What changed (src/web/pages/site.ts, src/web/passkey-client.ts)

  • The lead is a passkey-on stack stack-tight mb wrapper holding the primary large btn and a muted small break note with role="status".
  • The password form, the sign-up link and the signup-mode sentence are untouched, and the form posts the same fields.
  • A failed passkey sign-in adds error-note and role="alert" to the note and removes muted. "Cancelled." stays muted with role="status".
  • test/signin-page.test.ts asserts the old class names are absent. It also runs the client script against a stub DOM to check both the failure and the cancel behaviour.

Left out

  • The stylesheet rules and docs/DESIGN.md are untouched; part two removes them.
  • Sign-up has no passkey lead in its markup, so it needed no change here.
  • claim.ts, everyday.ts and first-admin.ts still use .passkey-note and are outside this issue. Their notes carry no data-fail, so the script leaves their styling alone.

To try it: open /signin in a browser with passkeys. Cancelling the prompt gives a quiet "Cancelled."; a server-side failure gives the red alert under the button.

Approved

Approved. /signin on the preview serves the lead as named components (stack stack-tight mb, btn primary lg, muted small break). The old class names are gone from the markup. The classes the script toggles (error-note, muted) exist in the stylesheet. Failure is announced with role=alert in the danger style; cancel stays quiet. No-JS is unchanged because the password form is untouched. The tests would fail without the change, and the data-fail approach keeps error-note off other pages.

Two things I would do next:

  1. Part two: delete the .passkey-lead and .passkey-note rules and their entries in docs/DESIGN.md. claim.ts, everyday.ts and first-admin.ts still use .passkey-note, so those need to move first.
  2. Reserve the note's height, or put it above the button, so a failure message does not push the form down on a phone.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs