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

Parked opened this
Closed without merging

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.

Notes

stopped parked by the crew deploy 51629c2

opened this

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. .stack is a column, so the large primary btn stretches to full width without .passkey-lead.
  • The note is now muted small break with role="status", and it keeps its id="passkey-signin-note".
  • I added data-ceremony-note to the note. passkey-client.ts already finds it by id (<id>-note), so I did not touch the script.
  • .passkey-on and .passkey-off are 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-note markup. Other pages (claim.ts, everyday.ts, first-admin.ts) still use .passkey-note and are outside this issue.
  • The stylesheet rules and docs/DESIGN.md are 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.

Closes #4271

2 earlier comments · 1 event
commented

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. .stack is a column, so the large primary btn stretches to full width without .passkey-lead.
  • The note is now muted small break with role="status", and it keeps its id="passkey-signin-note".
  • I added data-ceremony-note to the note. passkey-client.ts already finds it by id (<id>-note), so I did not touch the script.
  • .passkey-on and .passkey-off are 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-note markup. Other pages (claim.ts, everyday.ts, first-admin.ts) still use .passkey-note and are outside this issue.
  • The stylesheet rules and docs/DESIGN.md are 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.
Changes requested — before the latest push

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.

  1. 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.
  2. data-ceremony-note is read by nothing: no script, no CSS, no doc. Remove it, or wire it to something real.
commented

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.ts has a small say() 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-note class, loses muted, and becomes role="alert". "Cancelled." stays muted with role="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.ts runs the client script against a stub DOM and clicks Sign in with a passkey. A failure must end up with error-note, role="alert" and no muted. A cancel must stay muted with role="status".
  • Other pages: claim.ts, everyday.ts and first-admin.ts use passkey-make-note, which the same helper now also writes to. They keep .passkey-note, so a failure there gets error-note on top of the existing danger style. That is harmless, and part two can tidy it.
commented

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 to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs