-
Notifications
You must be signed in to change notification settings - Fork 317
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
Console search #7082
Console search #7082
Conversation
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.
Great job, especially I loved LookingLuke
component 😄. Make sure to also fix lint and general errors.
56d90e9
to
fb52287
Compare
@@ -0,0 +1,113 @@ | |||
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V. |
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.
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V. | |
// Copyright © 2024 The Things Network Foundation, The Things Industries B.V. |
@@ -0,0 +1,38 @@ | |||
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V. |
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.
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V. | |
// Copyright © 2024 The Things Network Foundation, The Things Industries B.V. |
Summary
This PR adds the search functionality to the console redesign branch.
Changes
<ScrollFader />
component to streamline fading away content in scrollable overflow containersTesting
Steps
/
orCmd+K
to open the search panelEnter
Results
Notes for Reviewers
The search works in a way that it shows the top entities by default if no search term is given. Once a search term is entered, the search logic will run individual search APIs of gateways, applications, end devices and organizations and aggregate the results. It also fetches the most recent 100 applications, gateways and organizations (cached per 5 minutes) in a best effort to have not only the entity ID but also the entity name available. It also fetches the most recently added 1000 end devices of the top 3 applications for the same reason.
As described, this also contains logic that tracks "top entities" based on frequency and recency of use. I will open up a separate PR to integrate this into the existing work for the sidebar top entities, as well as the top entities panel in the Console overview.
There's also a fix included that makes sure the view is updated properly when switching between entities of the same type. Before this fix the ID and name in the entity title section would remain the same after navigating. Using the
selectSelected{ENTITY}
selectors fixed that.Checklist
README.md
for the chosen target branch.CHANGELOG.md
.CONTRIBUTING.md
, there are no fixup commits left.