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

Console search #7082

Merged
merged 16 commits into from
May 29, 2024
Merged

Console search #7082

merged 16 commits into from
May 29, 2024

Conversation

kschiffer
Copy link
Contributor

Summary

This PR adds the search functionality to the console redesign branch.

Changes

  • Add search functionality
  • Add functionality to track "top entities"
  • Add <ScrollFader /> component to streamline fading away content in scrollable overflow containers
  • Various related changes to libraries, components and styles

Testing

Steps
  1. Go to the console
  2. Press / or Cmd+K to open the search panel
  3. Type in a search term
  4. See results
  5. Select a result item and hit Enter
Results
image image

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

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added c/console This is related to the Console ui/web This is related to a web interface labels May 15, 2024
@kschiffer kschiffer self-assigned this May 15, 2024
@kschiffer kschiffer requested a review from a team as a code owner May 15, 2024 17:40
@kschiffer kschiffer requested review from mjamescompton, PavelJankoski and ryaplots and removed request for a team May 15, 2024 17:40
Copy link
Contributor

@PavelJankoski PavelJankoski left a 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.

@kschiffer kschiffer force-pushed the feature/console-search branch from 56d90e9 to fb52287 Compare May 27, 2024 16:58
@kschiffer kschiffer requested a review from PavelJankoski May 27, 2024 16:58
@@ -0,0 +1,113 @@
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Copyright © 2022 The Things Network Foundation, The Things Industries B.V.
// Copyright © 2024 The Things Network Foundation, The Things Industries B.V.

@kschiffer kschiffer merged commit c6c6f99 into feature/console-redesign May 29, 2024
6 of 12 checks passed
@kschiffer kschiffer deleted the feature/console-search branch May 29, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/console This is related to the Console ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants