Skip to content

Conversation

beagins
Copy link
Contributor

@beagins beagins commented Apr 28, 2025

Note: These changes are being merged into a feature branch, not main

Description

  • Handle edge case performance issue: user with many namespaces (10k) should not see any lag when opening the namespace picker. Implemented front-end infinite scroll, loading and displaying 200 namespaces at a time.
  • Enterprise tests passing ✅

    248 tests completed in 161114 milliseconds, with 0 failed, 10 skipped, and 0 todo.
    1468 assertions of 1468 passed, 0 failed.

Demos

Before: Loading 10K namespaces

Screen.Recording.2025-04-28.at.4.14.10.PM.mov

After: Loading 10K namespaces with front-end infinite scroll (loading 200 at a time)

Screen.Recording.2025-04-28.at.4.11.54.PM.mov

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
    • LTS: If this fixes a critical security vulnerability or severity 1 bug, it will also need to be backported to the current LTS versions of Vault. To ensure this, use all available enterprise labels.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Apr 28, 2025
Copy link

github-actions bot commented Apr 28, 2025

CI Results:
All Go tests succeeded! ✅

@beagins beagins marked this pull request as ready for review April 29, 2025 00:29
@beagins beagins requested a review from a team as a code owner April 29, 2025 00:29
Copy link

Build Results:
All builds succeeded! ✅

@beagins beagins force-pushed the VAULT-34216/namespace-picker-feature-branch branch from f53662c to da316fa Compare April 29, 2025 01:33
@beagins beagins requested a review from a team as a code owner April 29, 2025 01:33
@beagins beagins requested review from bosouza and removed request for a team April 29, 2025 01:33
@beagins beagins force-pushed the VAULT-34216/infinite-scroll branch from 49006cd to a9cc95b Compare April 29, 2025 01:34
@@ -3,49 +3,61 @@
SPDX-License-Identifier: BUSL-1.1
}}

<div class="namespace-picker" ...attributes>
<div class="top-padding-4 has-bottom-padding-4 has-side-padding-8" ...attributes>
Copy link
Contributor

Choose a reason for hiding this comment

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

🥳

@@ -77,7 +77,6 @@
@use 'components/loader';
@use 'components/login-form';
@use 'components/masked-input';
@use 'components/namespace-picker';
Copy link
Contributor

Choose a reason for hiding this comment

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

nice catch!

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

Great work!

@beagins beagins merged commit 7c57f56 into VAULT-34216/namespace-picker-feature-branch Apr 29, 2025
25 checks passed
@beagins beagins deleted the VAULT-34216/infinite-scroll branch April 29, 2025 03:33
beagins added a commit that referenced this pull request Apr 29, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
beagins added a commit that referenced this pull request Apr 29, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
beagins added a commit that referenced this pull request Apr 30, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
beagins added a commit that referenced this pull request May 1, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
beagins added a commit that referenced this pull request May 1, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
beagins added a commit that referenced this pull request May 5, 2025
…30433)

* [VAULT-34483] UI: implement front-end pagination via infinite scroll

* remove unnecessary height definition

* fix test: Integration | Component | sidebar-frame: it should render namespace picker in sidebar footer

* update comment

* move visibleNamespaceOptions into a getter so that it updates when search input is cleared

* handle edge case: display current namespace when no other namespaces listed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants