Skip to content

Conversation

mattesony
Copy link
Contributor

@mattesony mattesony commented Nov 2, 2022

Implements #1972. I think it needs an action to unexpire as well, since the user could get into trouble quickly if they accidentally expire a bunch of things. I'll stick both in a submenu to reduce clutter if I do it. I took the liberty of making an icon for the expire action out of the expired status svg, at least as a recognizable placeholder. If that's not good long-term, I was eyeing Material Design's timer-alert-outline, but I didn't want to deviate from what was already there. The icon for the expire action is timer-alert-outline.

In the reports, I ran into an issue with getting the context menu action to show "Expire entry" for a single item and "Expire entries" for multiple selected like the other actions. Whatever magic the other actions are using, I couldn't find it. See screenshots.

Screenshots

Note that icon has been changed since I took these -- see screenshot lower in comments.

Top menu:

image

Database widget:

image

Health Check Report:

image

HIBP report:

image

Testing strategy

Manual testing (so far)

Type of change

  • ✅ New feature (change that adds functionality)

@mattesony mattesony force-pushed the 1972-expire branch 2 times, most recently from 9728398 to c23dab8 Compare November 2, 2022 08:08
@droidmonkey
Copy link
Member

That icon looks too much like delete, we also try to avoid the filled icons.

@mattesony
Copy link
Contributor Author

mattesony commented Nov 2, 2022

That icon looks too much like delete, we also try to avoid the filled icons.

I agree that it's too close; here it is with the timer-alert-outline icon if you're interested:
image

The other thought I had was to make it the central X with no circle, but that's probably too close as well. I pushed the icon change, but I'm happy to leave it iconless or whatever is preferred.

@droidmonkey
Copy link
Member

droidmonkey commented Nov 2, 2022

Oh I like the clock one!

In all technicality there is no need for a "NOW" preset. Unchecking and checking the expire box sets the datetime to now.

@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2022

Codecov Report

Base: 64.45% // Head: 64.34% // Decreases project coverage by -0.11% ⚠️

Coverage data is based on head (fa58619) compared to base (033dd79).
Patch coverage: 8.33% of modified lines in pull request are covered.

❗ Current head fa58619 differs from pull request most recent head f1b7952. Consider uploading reports for the commit f1b7952 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8731      +/-   ##
===========================================
- Coverage    64.45%   64.34%   -0.11%     
===========================================
  Files          341      341              
  Lines        44247    44315      +68     
===========================================
- Hits         28518    28512       -6     
- Misses       15729    15803      +74     
Impacted Files Coverage Δ
src/gui/DatabaseWidget.cpp 60.75% <0.00%> (-0.63%) ⬇️
src/gui/GuiTools.cpp 45.88% <0.00%> (-4.77%) ⬇️
src/gui/reports/ReportsWidgetBrowserStatistics.cpp 8.16% <0.00%> (-0.49%) ⬇️
src/gui/reports/ReportsWidgetHealthcheck.cpp 7.03% <0.00%> (-0.41%) ⬇️
src/gui/reports/ReportsWidgetHibp.cpp 7.64% <0.00%> (-0.32%) ⬇️
src/gui/MainWindow.cpp 71.57% <100.00%> (+0.08%) ⬆️
...rc/fdosecrets/widgets/SettingsWidgetFdoSecrets.cpp 56.06% <0.00%> (-3.03%) ⬇️
src/fdosecrets/dbus/DBusMgr.cpp 52.20% <0.00%> (-1.47%) ⬇️
src/core/FileWatcher.cpp 86.75% <0.00%> (-1.20%) ⬇️
... and 2 more

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

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

@mattesony
Copy link
Contributor Author

In all technicality there is no need for a "NOW" preset. Unchecking and checking the expire box sets the datetime to now.

Oh cool, somehow I never noticed that. I've taken it out to keep things simple.

@mattesony mattesony changed the title Implement #1972: Add ability to expire entries from context menus and "Now" expiry preset in edit menu Implement #1972: Add ability to expire entries from context menus Nov 2, 2022
@droidmonkey droidmonkey added this to the v2.8.0 milestone Jan 6, 2024
@droidmonkey droidmonkey marked this pull request as ready for review January 6, 2024 22:16
@droidmonkey droidmonkey modified the milestones: v2.8.0, v2.7.10 Aug 19, 2024
@phoerious phoerious added pr: new feature Pull request adds a new feature and removed new feature labels Nov 22, 2024
Copy link
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned up the code, ready for merge

@droidmonkey droidmonkey merged commit 29ac4da into keepassxreboot:develop Jan 12, 2025
11 checks passed
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Jan 19, 2025
droidmonkey added a commit that referenced this pull request Jan 19, 2025
Closes #1972

Add ability to immediately expire an entry from the context menu

---------
Co-authored-by: Jonathan White <support@dmapps.us>
pull bot pushed a commit to Graysonbarton/keepassxc that referenced this pull request Jan 26, 2025
Closes keepassxreboot#1972

Add ability to immediately expire an entry from the context menu

---------
Co-authored-by: Jonathan White <support@dmapps.us>
pull bot pushed a commit to blog2i2j/keepassxreboot.._..keepassxc that referenced this pull request Feb 22, 2025
Closes keepassxreboot#1972

Add ability to immediately expire an entry from the context menu

---------
Co-authored-by: Jonathan White <support@dmapps.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: backported Pull request backported to previous release pr: new feature Pull request adds a new feature user interface ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants