-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add assets search and search submit commands #10789
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
base: main
Are you sure you want to change the base?
Add assets search and search submit commands #10789
Conversation
Signed-off-by: Lin Wang <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10789 +/- ##
==========================================
- Coverage 60.56% 60.53% -0.04%
==========================================
Files 4492 4512 +20
Lines 120315 121375 +1060
Branches 19952 20251 +299
==========================================
+ Hits 72869 73471 +602
- Misses 42403 42754 +351
- Partials 5043 5150 +107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
|
|
||
| export interface GlobalSearchServiceSetupContract { | ||
| registerSearchCommand(searchCommand: GlobalSearchCommand): void; | ||
| registerSearchSubmitCommand(searchResultCommand: GlobalSearchSubmitCommand): void; |
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.
what's the difference between registerSearchCommand and registerSearchSubmitCommand? would be nice to add comment to each of them
| public setup(): GlobalSearchServiceSetupContract { | ||
| return { | ||
| registerSearchCommand: this.registerSearchCommand.bind(this), | ||
| registerSearchSubmitCommand: this.registerSearchSubmitCommand, |
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.
I don't seem to see where is this function called registerSearchSubmitCommand, did I miss anything?
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.
For now the only search submit command is in the dashboards-assistant repo. Will raise a new PR for adding an example for this new methods.
|
Can we specify the type of assets when searching? Right now it seems to search all types of saved object, can we specify type in the query? for example: |
Signed-off-by: Lin Wang <[email protected]>
Description
This PR enhances the global search functionality by adding two new capabilities:
Assets Search Command: Enables searching for dashboards and visualizations directly from the global search bar. Users can now quickly find and navigate to saved objects without leaving their current context.
Search Submit Commands: Introduces a new command type that executes when users press Enter in the search bar, providing a more intuitive way to perform search-related actions.
Key changes include:
searchAssetsfunction to search for dashboards and visualizations via the saved objects APIGlobalSearchSubmitCommandinterface for Enter-key triggered actionsIssues
#10741
Screenshot
Changelog
Check List
yarn test:jestyarn test:jest_integration