feat(web): per-field show/hide password toggle on signup form #294

Merged
YousifShkara merged 2 commits from feat/BUNYIP-282-signup-password-toggle into main 2026-06-30 09:22:47 +02:00
Owner

The /register password and confirm fields now carry an inline eye-icon button that toggles the input's visibility between password and text. Defaults to hidden; the toggle swaps the icon (fa-eye / fa-eye-slash), aria-pressed, and aria-label so the reveal state is announced to assistive tech. Reduces mistyped-password rejections + the "passwords don't match" restart loop on the signup card without changing the server-side validation contract.

New password_field(id, label, autocomplete) helper in bunyip-web/src/handlers/auth_pages.rs emits the input + absolutely-positioned toggle button. A new password_toggle_script() mirrors the existing password_live_validation_script() idempotent-attach pattern (no double-bind on a future htmx swap). The CSP already allows inline scripts on bunyip-web (crate::security), so no policy change.

Scoped strictly to the signup card: login, password reset, change-password, account-delete confirm, and admin Stripe secret inputs still render via the plain field helper and stay typing-blind. A follow-up ticket can extend the helper if signup feedback warrants it.

#BUNYIP-282

The /register password and confirm fields now carry an inline eye-icon button that toggles the input's visibility between `password` and `text`. Defaults to hidden; the toggle swaps the icon (`fa-eye` / `fa-eye-slash`), `aria-pressed`, and `aria-label` so the reveal state is announced to assistive tech. Reduces mistyped-password rejections + the "passwords don't match" restart loop on the signup card without changing the server-side validation contract. New `password_field(id, label, autocomplete)` helper in `bunyip-web/src/handlers/auth_pages.rs` emits the input + absolutely-positioned toggle button. A new `password_toggle_script()` mirrors the existing `password_live_validation_script()` idempotent-attach pattern (no double-bind on a future htmx swap). The CSP already allows inline scripts on bunyip-web (`crate::security`), so no policy change. Scoped strictly to the signup card: login, password reset, change-password, account-delete confirm, and admin Stripe secret inputs still render via the plain `field` helper and stay typing-blind. A follow-up ticket can extend the helper if signup feedback warrants it. #BUNYIP-282
feat(web): per-field show/hide password toggle on signup form
Some checks failed
E2E / Playwright against deployment (pull_request) Failing after 1m4s
Check / fmt + clippy + build + tests (pull_request) Has been cancelled
fbc3c9361e
The /register password and confirm fields now carry an inline eye-icon button that toggles the input's visibility between `password` and `text`. Defaults to hidden; the toggle swaps the icon (`fa-eye` / `fa-eye-slash`), `aria-pressed`, and `aria-label` so the reveal state is announced to assistive tech. Reduces mistyped-password rejections + the "passwords don't match" restart loop on the signup card without changing the server-side validation contract.

New `password_field(id, label, autocomplete)` helper in `bunyip-web/src/handlers/auth_pages.rs` emits the input + absolutely-positioned toggle button. A new `password_toggle_script()` mirrors the existing `password_live_validation_script()` idempotent-attach pattern (no double-bind on a future htmx swap). The CSP already allows inline scripts on bunyip-web (`crate::security`), so no policy change.

Scoped strictly to the signup card: login, password reset, change-password, account-delete confirm, and admin Stripe secret inputs still render via the plain `field` helper and stay typing-blind. A follow-up ticket can extend the helper if signup feedback warrants it.

#BUNYIP-282
Merge remote-tracking branch 'origin/main' into feat/BUNYIP-282-signup-password-toggle
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 37s
Check / fmt + clippy + build + tests (pull_request) Successful in 18m5s
Create release / Create release from merged PR (pull_request) Has been skipped
ed2fee7d1b
YousifShkara deleted branch feat/BUNYIP-282-signup-password-toggle 2026-06-30 09:22:47 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!294
No description provided.