keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

Colored passwords in the preview pane

Open wolframroesler opened this issue 4 years ago • 16 comments

In the entry preview pane, the password is now displayed with in multiple colours (digits in blue, upper-case letters in red, etc). The idea and the color scheme are taken from the iOS app "Strongbox".

A checkbox was added to section "General -> User Interface" of the settings dialog to turn color display off.

Fixes #4099

Screenshots

Screenshot from 2021-10-26 16-56-18

Screenshot from 2021-10-26 16-57-46

Testing strategy

Tested manually.

Type of change

  • ✅ New feature (change that adds functionality)

wolframroesler avatar Oct 30 '21 21:10 wolframroesler

Codecov Report

Base: 64.39% // Head: 64.42% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (91bfe3a) compared to base (54f9b25). Patch coverage: 25.00% of modified lines in pull request are covered.

:exclamation: Current head 91bfe3a differs from pull request most recent head 4faed7a. Consider uploading reports for the commit 4faed7a to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7097      +/-   ##
===========================================
+ Coverage    64.39%   64.42%   +0.03%     
===========================================
  Files          339      339              
  Lines        43990    43968      -22     
===========================================
- Hits         28324    28322       -2     
+ Misses       15666    15646      -20     
Impacted Files Coverage Δ
src/core/Config.cpp 89.76% <ø> (ø)
src/core/Config.h 100.00% <ø> (ø)
src/gui/EntryPreviewWidget.cpp 85.52% <17.65%> (-2.53%) :arrow_down:
src/gui/ApplicationSettingsWidget.cpp 51.42% <50.00%> (-0.01%) :arrow_down:
src/gui/Application.cpp 31.97% <100.00%> (+0.41%) :arrow_up:
src/core/FileWatcher.cpp 85.54% <0.00%> (-1.20%) :arrow_down:
src/core/Entry.cpp 82.55% <0.00%> (-0.16%) :arrow_down:
src/gui/MainWindow.cpp 71.45% <0.00%> (-0.04%) :arrow_down:
src/gui/osutils/nixutils/NixUtils.h 50.00% <0.00%> (ø)
src/gui/osutils/nixutils/NixUtils.cpp 43.00% <0.00%> (+1.56%) :arrow_up:
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Oct 30 '21 21:10 codecov-commenter

Not really possible to resolve the conflict in demo.kdbx. You may keep or undo my changes, doesn't really matter, I didn't change anything significant.

wolframroesler avatar Mar 04 '22 13:03 wolframroesler

Didn't realise this was in draft state. Un-drafted so it can be reviewed and eventually merged. Any chance to get it into the upcoming 2.7?

wolframroesler avatar Mar 04 '22 13:03 wolframroesler

This will be looked at for 2.7.1

droidmonkey avatar Mar 04 '22 14:03 droidmonkey

Thanks @droidmonkey. Rebased it onto current develop and resolved the conflict in demo.kdbx so all should be good now.

wolframroesler avatar Mar 04 '22 15:03 wolframroesler

This will be looked at for 2.7.1

version 2.7.1 does not include this evolution, is it correct?

sky4055 avatar Apr 07 '22 06:04 sky4055

Still open and unmerged

droidmonkey avatar Apr 07 '22 10:04 droidmonkey

I am really just not a fan of colored passwords at all. KeePassDX implemented it on Android and it looks terrible, immediately disabled. I am, however, in favor of a popup widget that separately shows the password in large text with color and maybe even the position numbers below the letters. This could also be a way to perform "pickchars" auto-type directly from this widget.

Thoughts @wolframroesler @phoerious

droidmonkey avatar Jun 19 '22 14:06 droidmonkey

The pop-idea sounds good, but should go into a different issue.

About the colours, some like them and some don't, the feedback I got when asking about it on Twitter (https://twitter.com/WolframRoesler/status/1452928493549981696) was mostly positive. Some people would definitely benefit from it (myself included) so the feature should be available IMHO, especially because there's a configuration option to turn it off; perhaps we could turn it off by default if it's too distracting for the majority of users.

Strongbox has been having it for a long time. What feedback did you receive, @strongbox-mark?

wolframroesler avatar Jun 19 '22 18:06 wolframroesler

Strongbox has been having it for a long time. What feedback did you receive, @strongbox-mark?

Yes, entirely positive for both the Large Text popup feature and the colorized passwords. Not a single complaint, all positive comments, but I can understand why some don't like it. :)

BTW, on a completely separate topic, I can't respond to the other issue #863 as it's limited to collaborators - I meant to get in touch / reply to @varkolintu there, as this is something I'm considering adding support to Strongbox for (Credit Card fields or some kind of standardization for them). Was going to drop you guys a mail, but since we're here, can you add me as a collaborator there so that I can respond/chat, or is there a better place to do it?

strongbox-mark avatar Jun 20 '22 06:06 strongbox-mark

Strongbox has been having it for a long time. What feedback did you receive, @strongbox-mark?

Yes, entirely positive for both the Large Text popup feature and the colorized passwords. Not a single complaint, all positive comments, but I can understand why some don't like it. :)

BTW, on a completely separate topic, I can't respond to the other issue #863 as it's limited to collaborators - I meant to get in touch / reply to @varkolintu there, as this is something I'm considering adding support to Strongbox for (Credit Card fields or some kind of standardization for them). Was going to drop you guys a mail, but since we're here, can you add me as a collaborator there so that I can respond/chat, or is there a better place to do it?

and on Stongbox I can't do without this feature. I'm looking forward to it on KeepassXC!

sky4055 avatar Jun 20 '22 06:06 sky4055

@strongbox-mark unlocked the issue! Although that thread is super long, we could also start a new discussion thread about the api / implementation. I too am very interested in it, just a lot of gui work.

I'll merge this feature in after another review of the code. A similar comment I have from the other colorized text one... it would be good to extract the code that actually creates the html so we can use it across multiple widgets (like the password generator) if we so desire. Although Qt annoyingly does not allow html in qlineedit.

droidmonkey avatar Jun 20 '22 10:06 droidmonkey

Nice one, thank you @droidmonkey - Yes, it's such a big feature it's daunting, I wonder if we can some how trim the scope down very heavily and go for some kind of simplified "Entry Type" system with a fairly fixed set of well-known or conventional fields doing the heavy lifting... Of course, GUI work on top will be arduous for all of us :/

strongbox-mark avatar Jun 20 '22 15:06 strongbox-mark

I am really just not a fan of colored passwords at all. KeePassDX implemented it on Android and it looks terrible, immediately disabled.

Concerning the password colors, I also have only positive feedback, except yours. It allows users who manually copy elements to find their way around better. Of course, if you have suggestions to improve visibility by harmonizing colors between applications, I am open to proposals to update KeePassDX.

J-Jamet avatar Jun 21 '22 11:06 J-Jamet

I'd love to see this feature in KeePassXC. Is this being worked on/considered to be added soon? I took a look at the milestones for v2.7.2 and v2.8.0 and they don't contain this. After reading the conversation I get the impression that the work has been done and it just needs a review.

mariuszdb avatar Sep 08 '22 20:09 mariuszdb

Hi @mariuszdb, you're right, the implementation is finished (cf. the screenshots above) and ready to be reviewed and merged.

wolframroesler avatar Sep 15 '22 11:09 wolframroesler

Made a few changes to the code and actually found a bug in our theme switching as well! This also fixes password overflow UI by showing a horizontal scroll bar on long passwords.

image

droidmonkey avatar Oct 02 '22 13:10 droidmonkey

This is a great improvement that I just discovered, thanks for the merge! I would like to request different colors however. Green and blue can not always be well distinguished.

Take this screenshot for example. At 1:1 zoom I can not easily tell apart blue from green. Both sort-of look black-ish (move your head back from the screen a bit if it's still easy for you :) )

Screenshot_2023-01-21_23-41-40

Thanks!

haarp avatar Jan 21 '23 22:01 haarp