Add "Search Here..." to group context menu#13158
Add "Search Here..." to group context menu#13158AgostonSzepessy wants to merge 6 commits intokeepassxreboot:developfrom
Conversation
Populates search bar with `g:<group-name>`.
There was a problem hiding this comment.
Pull request overview
Adds a new group context-menu action that helps users quickly scope searches to a specific group by inserting a group-qualified term into the search bar.
Changes:
- Add a new
SearchWidget::setSearchGroupName()helper to programmatically populate/focus the search field. - Add
actionGroupSearchHereto the group context menu and wire it to a newMainWindow::searchInGroup()slot. - Update English translation sources for the new UI strings.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/gui/SearchWidget.h |
Exposes a new API for setting group-based search text. |
src/gui/SearchWidget.cpp |
Implements populating/focusing the search field with a group filter. |
src/gui/MainWindow.ui |
Adds the “Search Here...” action to the group context menu. |
src/gui/MainWindow.h |
Declares the new searchInGroup() slot. |
src/gui/MainWindow.cpp |
Sets icon, connects the action, and implements the slot behavior. |
share/translations/keepassxc_en.ts |
Adds translation entries for the new action text/tooltip. |
There was a problem hiding this comment.
Pull request overview
Adds a new “Search Here…” action to the group context menu so users can quickly populate the search bar with a g:<group> filter for the currently selected group (addresses #12945).
Changes:
- Add a new group context-menu action (
actionGroupSearchHere) and wire it to a newMainWindow::searchInGroup()slot. - Add
SearchWidget::setSearchGroupName()helper to populate the search field with a quotedg:"<group-path>"query. - Add a GUI test that creates groups/entries and verifies the search bar is populated correctly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gui/TestGui.h | Declares new GUI test and helper methods for group/entry setup. |
| tests/gui/TestGui.cpp | Implements helpers plus testSearchHere() validating the new action behavior. |
| src/gui/SearchWidget.h | Adds new public API to programmatically set the group search filter. |
| src/gui/SearchWidget.cpp | Implements query construction and focus behavior for “Search Here…”. |
| src/gui/MainWindow.ui | Adds the new QAction to the Groups menu/context menu. |
| src/gui/MainWindow.h | Declares the new searchInGroup() slot. |
| src/gui/MainWindow.cpp | Wires the new action, enables it, and populates the search widget using the current group path. |
| share/translations/keepassxc_en.ts | Adds new translatable strings for the action text/tooltip. |
|
Oh I love this |
There was a problem hiding this comment.
Pull request overview
Adds a “Search Here…” group menu action to quickly populate the search bar with a group-scoped query, and introduces a GUI test to validate the behavior.
Changes:
- Add
actionGroupSearchHereto the Groups menu and wire it to a newMainWindow::searchInGroup()slot. - Extend
SearchWidgetwithsetSearchGroupName()to set a quotedg:"<group path>"query and focus the search field. - Expand GUI test data helpers and add a new GUI test that triggers the action and verifies the search text.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gui/TestGui.h | Declares new GUI test and helper functions for groups/entries. |
| tests/gui/TestGui.cpp | Adds group/entry creation helpers, extends canned data, and adds testSearchHere(). |
| src/gui/SearchWidget.h | Exposes setSearchGroupName() for MainWindow-driven search presetting. |
| src/gui/SearchWidget.cpp | Implements group query construction and focuses the search edit. |
| src/gui/MainWindow.ui | Adds the new Groups menu action and tooltip text. |
| src/gui/MainWindow.h | Declares searchInGroup() slot. |
| src/gui/MainWindow.cpp | Connects the action, updates enabled state, and sets search text from current group. |
| share/translations/keepassxc_en.ts | Adds new translatable strings for the action text/tooltip. |
When the user clicks "Search Here...", the search bar is populated with with
g:<group-name>.Screenshots
Testing strategy
I added a test in
TestGui.cppthat tests the functionality. I also tested it manually.Type of change