Skip to content
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

Enhance Tags / Saved Searches #8435

Merged
merged 5 commits into from
Sep 8, 2022
Merged

Enhance Tags / Saved Searches #8435

merged 5 commits into from
Sep 8, 2022

Conversation

droidmonkey
Copy link
Member

@droidmonkey droidmonkey commented Sep 1, 2022

Enhance Tags UX

  • Rename "Database Tags" to "Searches and Tags"
  • Separate searching for all entries and resetting the search
  • Support selecting multiple tags to search against
  • Fix using escaped quotes in search terms
  • Make tag searching more precise
  • Support is:expired-# to search for entries expiring within # days. Exclude recycled entries from expired search.
  • Don't list tags from entries that are recycled
  • Force hide tag auto-completion menu when tag editing widget is hidden. On rare occasions the focus out signal is not called when the tag view is hidden (entry edit is closed), this resolves that problem.
  • Remove spaces from before and after tags to prevent seemingly duplicate tags from being created.
  • Also fix some awkward signal/slot dances that were setup over time with the entry view and preview widget.

Add search saving and recall

  • Add ability to save searches and recall them from the "Searches and Tags" view
  • Add ability to remove a tag from all entries from the "Searches and Tags" view
  • Cleanup tag handling and widgets

Allow changing tags for multiple entries through context menu

  • Closes Set and unset tags from several entries at once #8277 - show context menu with currently available tags in database and checks those that are set on one or more selected entries. When a tag is selected it is either set or unset on all entries depending on its checked state.

Other Improvements

Screenshots

image

Save Searches!
image

Remove Searches and Tags!
image

New icons!
image

Testing strategy

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)
  • ✅ New feature (change that adds functionality)

@droidmonkey droidmonkey added bug new feature feature: Tags pr: backport pending Pull request yet to be backported to a previous release labels Sep 1, 2022
@droidmonkey droidmonkey added this to the v2.7.2 milestone Sep 1, 2022
@droidmonkey
Copy link
Member Author

note: looks like I need to fix the entry count display on unlock again...

@droidmonkey droidmonkey force-pushed the feature/enhance-tags branch 2 times, most recently from 7d5af6c to 8e02451 Compare September 3, 2022 12:33
@droidmonkey droidmonkey marked this pull request as ready for review September 3, 2022 12:34
@michaelk83
Copy link

michaelk83 commented Sep 3, 2022

"Reset View" is unclear. Maybe "Reset Search"? What does this do, and how is it different from "All Entries"?

Support is:expired-# to search for entries expiring within # days.

There are a few other bits in #7791 that are related to this. Though some of it can wait for a separate PR, I guess.

@michaelk83
Copy link

"Reset View" is unclear. Maybe "Reset Search"? What does this do, and how is it different from "All Entries"?

Found it:

m_presetTags << qMakePair(QString(""), tr("Reset View")) << qMakePair(QString("*"), tr("All Entries"))

Hmm.. "Reset Search" somewhat makes sense here, but how about "All (global)" and "All (current view)"?

@droidmonkey
Copy link
Member Author

droidmonkey commented Sep 3, 2022

"Clear Search" would make sense as well.

I will untag the expired entry view issue since it's a multiparter

@droidmonkey
Copy link
Member Author

@michaelk83 I went a little crazy and added a bunch of fun stuff, check it out again

@michaelk83
Copy link

(sorry for the delay)

I don't see the "Expiring in 3 days" and "Multiple tags" in the code. Are those just searches you've saved manually? The other 4 are enough by default, I think.

"Expiring in 3 days" and "Expired" will end up the same thing once #7791 is done.

The rest LGTM, though I haven't looked at the code much. I like the new "Searches and Tags" header and the little save button. Will need to update the docs for the new features.

src/gui/DatabaseWidget.cpp Outdated Show resolved Hide resolved
src/core/Entry.cpp Outdated Show resolved Hide resolved
@droidmonkey
Copy link
Member Author

Yes, expiring in 3 days is a saved search

@droidmonkey droidmonkey force-pushed the feature/enhance-tags branch 2 times, most recently from 7be7d9b to 55da7d0 Compare September 7, 2022 23:22
* Rename "Database Tags" to "Searches and Tags"
* Separate searching for all entries and resetting the search
* Support selecting multiple tags to search against
* Fix using escaped quotes in search terms
* Make tag searching more precise
* Support `is:expired-#` to search for entries expiring within # days. Exclude recycled entries from expired search.
* Don't list tags from entries that are recycled
* Force hide tag auto-completion menu when tag editing widget is hidden. On rare occasions the focus out signal is not called when the tag view is hidden (entry edit is closed), this resolves that problem.
* Remove spaces from before and after tags to prevent seemingly duplicate tags from being created.
* Also fix some awkward signal/slot dances that were setup over time with the entry view and preview widget.

Allow changing tags for multiple entries through context menu

* Closes #8277 - show context menu with currently available tags in database and checks those that are set on one or more selected entries. When a tag is selected it is either set or unset on all entries depending on its checked state.

* Add ability to save searches and recall them from the "Searches and Tags" view
* Add ability to remove a tag from all entries from the "Searches and Tags" view
* Cleanup tag handling and widgets
* Fix #8036 - use search interface to display expiring entries on first unlock.
@droidmonkey droidmonkey merged commit b0a68ea into develop Sep 8, 2022
@droidmonkey droidmonkey deleted the feature/enhance-tags branch September 8, 2022 10:46
@droidmonkey droidmonkey added pr: backported Pull request backported to previous release and removed pr: backport pending Pull request yet to be backported to a previous release labels Sep 11, 2022
@jamilraichouni
Copy link

jamilraichouni commented Oct 26, 2022

Not important but worth mentioning:
When using the macos GUI in English it states 2 Entry(s) for instance. But it must be x Entries if x > 1.
So in the case of the english word Entry you cannot cover singular and plural by appending the suffix (s). That works for User -> User(s) and many other english words but not in the given case or for 1 Baby and x Babies etc.

Moved my comment to #3963 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Tags pr: backported Pull request backported to previous release pr: bugfix Pull request that fixes a bug pr: new feature Pull request that adds a new feature
Projects
None yet
4 participants