-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add password strength indicator to password entry fields #7885
Add password strength indicator to password entry fields #7885
Conversation
Great! Can you align the quality text to be under the text edit (shift it right)? |
Codecov Report
@@ Coverage Diff @@
## develop #7885 +/- ##
===========================================
+ Coverage 64.31% 64.38% +0.07%
===========================================
Files 339 339
Lines 43430 43529 +99
===========================================
+ Hits 27932 28025 +93
- Misses 15498 15504 +6
Continue to review full report at Codecov.
|
Nope that is the preferred way to update the PR. For the quality label I was thinking inline with the quality bar, not below it. You can wrap the two elements in a horizontal layout to make it "one" for the form layout. Really this should be built into the PasswordWidget not the databasekey/PasswordEditWidget. That way you can show the quality no matter where the PasswordWidget is used. Make it an option because you obviously don't need that when unlocking your database. |
I agree, that would be the best. Now, from what I see, PasswordEdit extends QLineEdit. I see that you add the icons in there but, as far as I understand, in order to implement the progress bar as in the screenshots, PasswordEdit would have to extend a Layout instead (so we can include both widgets in the object). Is that what you mean? Am I missing something? |
Yes that's exactly what I mean. |
Ok, I'll give it a try. |
23dabb7
to
402d273
Compare
The change involves many files so here is a small summary:
What a simple "first issue" :) |
It looks like a test is having a bad time compiling (I didn't even look at them to be honest) and there was some issue with the formatting (I probably didn't reformat all the files after the class refactor). I'll have a look at some point during the next few days. |
src/autotype/PickcharsDialog.cpp
Outdated
@@ -77,7 +77,9 @@ PickcharsDialog::PickcharsDialog(const QString& string, QWidget* parent) | |||
// Remove last selected character | |||
auto shortcut = new QShortcut(Qt::Key_Backspace, this); | |||
connect(shortcut, &QShortcut::activated, this, [this] { | |||
auto text = m_ui->selectedChars->text(); | |||
// auto text = m_ui->selectedChars->text(); |
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.
to be removed
src/autotype/PickcharsDialog.cpp
Outdated
auto text = m_ui->selectedChars->text(); | ||
// auto text = m_ui->selectedChars->text(); | ||
auto text = m_ui->selectedChars->getText(); | ||
// m_ui->selectedChars->setText(text.left(text.size() - 1)); |
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.
to be removed
Looking nice! Love the compact design |
7baf8fa
to
5e30494
Compare
4ad252d
to
0b93393
Compare
Cleaned up the code and improved the visual look of the quality bar. Great job on this one! |
26b6822
to
a6d3a0a
Compare
Fixes keepassxreboot#7437 (entry edit view only) Fixes keepassxreboot#5220
a6d3a0a
to
829095e
Compare
Thanks! |
Fixes #7437 (partially, entry edit view only)
Fixes #5220
This change adds a password strength indicator to PasswordEditWidget (I have followed the way it is done in PasswordGeneratorWidget).
I want to contribute some code to the project and thought that this could be a good "first issue". Please be gentle ;)
Screenshots
Testing strategy
Testing was quite straightforward. As far as I know, the screenshots above are the only two places where PasswordEditWidget is used. I went to the windows shown above and tried different combinations of passwords to see how the indicator behaves, trying to replicate exactly what is done in PasswordGeneratorWidget.
Both development and testing were made on Linux only.
Type of change
Comments
I'm basically doing the same as in PasswordGeneratorWidget so, would it be worth refactoring and making a derived class of QProgressBar? I would say it is but it is up to you, just let me know.
Thanks for the software ;)