feat(lockscreen): add a password reveal toggle to the login box - #4127
Open
liamwh wants to merge 1 commit into
Open
feat(lockscreen): add a password reveal toggle to the login box#4127liamwh wants to merge 1 commit into
liamwh wants to merge 1 commit into
Conversation
The control-center Wi-Fi password prompt has an eye toggle that temporarily reveals the typed password; the lock screen's password field has none, so a long password can only be typed blind. Add the same ghost eye/eye-off button between the password field and the login button, reusing the identical interaction: setPasswordMode(!revealed) plus a glyph swap. The password stays concealed by default, the reveal state never carries across lock cycles (each lock starts concealed), and the button is disabled while authentication is in flight, exactly like the field and the login button.
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.
Summary
Adds the same eye/eye-off password reveal toggle the control-center
Wi-Fi password prompt already has (
network_tab.cpp) to the lockscreen's login box — a ghost button between the password field and the
login button that flips
setPasswordModeand swaps its glyph.Motivation
The Wi-Fi prompt lets you briefly check a long password while typing;
the lock screen — where typos cost a full retype and an unlock attempt —
offers no such check. The interaction pattern already exists in-shell,
so this ports it to the one password field that lacked it.
Behaviour details:
setLockedState(true)), so arevealed password never survives into the next unlock;
the login button;
loginVisible) andpicks up the same radius/size/glyph sizing as the login button.
Type of Change
Related Issue
None found; searched issues/PRs for lock-screen reveal/show-password.
Testing
just formatjust configure(debug) + full build +meson test -C build-debug:92/92 OK
the lock screen login box with the toggle before review if wanted
(avoided locking a live session while preparing this PR).
The
setPasswordModeprimitive this reuses is covered bytests/input_password_mode_test.cpp; the lock surface itself has nounit-test scaffolding upstream (scene/wallpaper machinery), matching
the Wi-Fi prompt's reveal button, which is also untested at that layer.
Manual Coverage
Screenshots / Videos
Can provide on request (requires locking a session to capture).
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes
No new settings key: the Wi-Fi prompt's toggle is unconditional, so
this mirrors it rather than growing the login-box style surface. Happy
to add a
show_reveal_password_buttonstyle flag if maintainers preferconfigurability.
Disclaimer: AI-assisted tooling was used.