-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace hide/show Passphrase icon control, with checkbox control #1430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Er1kkkaaa! I added a few thoughts, with the caveat that it was a very quick glance, so I may be wrong in things! 🙂
|
||
passwordline.on_toggle_password_Action() | ||
checkbox.isChecked() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does checkbox.isChecked()
do anything in this context? Was it meant to be an assertion, or maybe a debug statement?
I see a
To translate this string you'll have to update |
Actually, my bad, I just haven't pulled your most recent changes. Aaaaaand it looks like you already fixed that one! |
If you run |
There are some changes in this branch that are not related to the checkbox work. I suspect you may have merged the As @creviera thought, the linting/formatting tools do clean up the remaining errors automatically. (I tend to run them in bulk: I ran this code, and it seems fully operational to me, in that the standard keyboard navigation behaves as expected 🎉 (And I must say that as much as I liked the icon, I love this fix!) I'm happy to rebase / lint /squash commits to take this to the merging line if that helps, also happy to pair with you @Er1kkkaaa if you've got the time / want to do those little bits of "bureaucracy" yourself 😉 Edit: I just saw the hover state. The background highlight lowers the text contrast significantly, I'll see if there is an easy way to get it closer to Nina's intention. 👁️ |
Here is what the branch looks like once rebased: https://github.com/freedomofpress/securedrop-client/compare/main...gonzalo-bulnes:1351-checkbox-control?expand=1 |
@gonzalo-bulnes, is this PR something you think is worth continuing to rebase and keep updated, or is it in a state where it makes more sense to close for now (based on your review)? |
I think it might make sense to ship it. As mich as I likes the lillte eye icon, this is a significant accessibilty improvement. : ) |
Okay, if it's close to ready for review, I'll add it to the project board so we can get someone to review it once it's fully ready (assuming it just needs a rebase and looks like there are failing tests) |
Minor CSS pseudo-classes only use one colon (unlike pseudo-elements) See https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes
See mockups in #1351
I've re-based this branch with no changes, then added two commits to adjust the highlight when the component is hovered. I'll force push this now. 🙂 |
2edb6f2
to
060656c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I signed @Er1kkkaaa's commits as I was rebasing the branch, but didn't modify them. I've a mixed feeling on squashing them without @Er1kkkaaa, because I wouldn't want to mis-represent her intent. With that in mind, I would personally merge them as-is. Any thoughts @creviera ?
Besides that, I'll call this PR ready to go!
To that purpose, I'm attaching a few screenshots so that @tina-ux can chime in if needed.
The default is to keep the passphrase hidden (broader UI for context):
Focus state. Granted this one is barely visible, it is the default Qt decoration for focused checkboxes. I spent a bit of time looking for ways to bring it closer to @ninavizz intent, and ran out my time box. That's an improvement I'd leave for later on, as we progress standardizing the UI components.
Checked.
Checked + hover.
Thank you @gonzalo-bulnes! Quick question: is it possible to determine the font of the text inside form input fields on Qubes? For this stage, things look good to me! Choosing a checkbox and a descriptive text label to "Show Passphrase" is indeed good practice both for usability and accessibility. Good call on limiting the time spent on the focus state checkbox, we can revisit that small detail down the road. There are some other design challenges in this log in form that I would like to revisit at a ulterior time such as the placement of "show passphrase" and some broader design decisions that dampen visibility, but for now it looks good :) |
@tina-ux We can control the font-size of the input fields (including the passphrase field). As far as I can tell, it currently defaults to Basic font properties can be set using Qt styles sheets, which behave like a subset of CSS. I say basic to mean the equivalents of CSS |
Note: we will get more styling options as we update Qt. For example, Related to #1194 |
@gonzalo-bulnes Hah! Thank you for going above and beyond with the screenshots and the info! I was indeed asking about setting a font family for the input field. I'll keep this in mind for when we come back to this login window. |
I agree. No need to worry about squashing. I'll review the PR now that it's green and ready to review! Thanks @gonzalo-bulnes for prepping it. |
Just took a look at the small appended commits and based on @gonzalo-bulnes's approval, looks like this is good to merge! No need for me hold things up. The new way to show/hide the passphrase looks great- thanks @Er1kkkaaa :) |
Thank you so much @Er1kkkaaa for your diligent work on this!! 🚀 |
Description
The following work is a custom checkbox control created as a replacement of the hide/show passphrase icon control present in the Sign-in and Export Dialog.
Fixes #1351
Test Plan
Checklist
If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:
If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
If these changes modify the database schema, you should include a database migration. Please check as applicable:
main
and confirmed that the migration applies cleanlymain
and would like the reviewer to do so