Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a "quickbar" chip that emulates the search button found in the top right of the UI. It can additionally be set to search by entity, device, or command (identical to the e, d, and c hotkeys).
Related Issue
This PR fixes or closes issue: fixes #1012
Motivation and Context
As mentioned in the issue, many users (myself included) prefer to hide the top navigation bar for more of a minimalist UI, but this removes the search functionality. This chip restores the functionality (and enhances it a smidge by giving more search options). It does this by simply sending a
KeyboardEvent
with the relevant hotkey button press. If there's a more robust way to trigger the quickbar, please let me know and I'd be happy to tweak this.I also wanted to implement an "Edit Dashboard" chip, but couldn't find a good way to trigger that button.
How Has This Been Tested
I tested this in the dev setup described in the README, as well as running it on my instance for a few months now. I additionally added it to the
chips-view.yaml
as a simple test that things work.I'm far from a typescript export, but I don't believe this should cause any issues with existing code.
Types of changes
Checklist
I believe my code follows the code style of this project, but as typescript isn't my primary language I could be mistaken. I'd be happy to change anything you'd recommend!