Repository navigation
feat(textfield): a password revealable by an eye - #30
Merged
Merged
Conversation
TextField { kind: InputKind::Password, revealable: true } puts an eye at
the field's end that shows the password as text and hides it again: the
same <input>, its type changed, so its text and caret stay. lucide's eye
joins the icons. The gallery's Text card has a password field, and a Blitz
test presses its eye both ways and types after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P3EBi4NUiH6dAfkRnuv9cz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TextField { kind: InputKind::Password, revealable: true }puts an eye at the field's end that shows the password as text and hides it again. It is the same<input>with itstypechanged, so its text and caret stay.src/components/text_field.rs: therevealableprop. It is aToggleButton(Ghost, "Show password" / "Hide password",aria-pressed) beside the input, before the field'sactionif it has one. On any kind other thanPasswordit does nothing.src/icon.rs: Lucide'seyejoins the icons, next toeye-off.a_password_is_shown_by_its_eye_and_hidden_again, presses the eye both ways and types afterwards. An SSR test insrc/lib.rschecks the markup.Related. Blitz draws a password input's text exactly as typed, hiding it only from assistive tech. A KeePass client built on Unit (adammharris/kdbx) found this. The fix belongs in diaryx-org/blitz: a
feat/password-inputbranch is written and tested but not yet pushed. It draws a bullet per character and keeps the text in a buffer that is wiped when it changes. This PR doesn't depend on it; under Blitz fromleaf, the field still draws as typed until that branch lands.Checks.
shipand corgi aren't installed in this environment, so I ran each job in.config/ship.figlby hand with cargo:-D warnings, the wasm32 web lint, and docs-D warningsare clean.cargo test --workspacepasses: 78 library tests, 79 Blitz tests and the audit.UNIT_APPEARANCE=dark.Generated by Claude Code