Skip to content

Conversation

beagins
Copy link
Contributor

@beagins beagins commented Apr 4, 2025

Description

This branch is merging into a feature side branch (not main)
The current implementation looks ugly, styling will be addressed in a separate PR**
  • Replace Hds::SuperSelect with Hds::Dropdown component*
  • Show namespace count label: All/Matching Namespaces (#)
  • Enterprise tests passing ✅

    236 tests completed in 174031 milliseconds, with 0 failed, 10 skipped, and 0 todo.
    1433 assertions of 1433 passed, 0 failed.

* The SuperSelect component was limited in regards to implementing search across an array of objects instead of strings, and when displaying the namespace count label below the search field. The Dropdown component is more flexible, making it possible for the implementation to match the existing design.

Screenshots

Screenshot 2025-04-16 at 12 49 32 PM

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 4, 2025
Copy link

github-actions bot commented Apr 4, 2025

CI Results:
All Go tests succeeded! ✅

@beagins beagins force-pushed the VAULT-34216/namespace-picker-feature-branch branch from 6c14cca to 25ee251 Compare April 15, 2025 21:16
@beagins beagins force-pushed the VAULT-34216/namespace-count branch from 2af01e4 to 7e4dea9 Compare April 15, 2025 21:17
@beagins beagins force-pushed the VAULT-34216/namespace-picker-feature-branch branch from 25ee251 to bf374ec Compare April 15, 2025 23:12
@beagins beagins force-pushed the VAULT-34216/namespace-count branch from 7e4dea9 to 03ae355 Compare April 15, 2025 23:14
@beagins beagins marked this pull request as ready for review April 15, 2025 23:56
@beagins beagins requested a review from a team as a code owner April 15, 2025 23:56
Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Nice job! I know fiddling with a component for a while and abandoning it can be a rough journey. Now you'll be the SuperSelect expert on when to and not to use 😂

Most of the comments are just some funny ember things, just a couple questions about implementation. Looks great, though! 😄

@lane-wetmore lane-wetmore added ui and removed ui labels Apr 16, 2025
{{/each}}

{{! Check if the user has permissions to list namespaces. If true, display additional footer options like "Refresh list" and "Manage". }}
{{#if this.hasListPermissions}}
Copy link
Contributor Author

@beagins beagins Apr 17, 2025

Choose a reason for hiding this comment

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

Note: The previous implementation of namespace picker hid both the Refresh & Manage buttons if the user did not have permissions to list namespaces. I kept this logic for now, but added a TODO in the component file to see if it makes sense to hide both buttons or only hide the Manage button.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the list one is un-gated, so everyone has access (it will just only return what a user can view) The permissions wrap should only apply to hide/showing manage

Just an FYI 😄 but definitely fine to address as a follow-on

beagins and others added 2 commits April 17, 2025 10:26
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
@beagins beagins merged commit b257976 into VAULT-34216/namespace-picker-feature-branch Apr 18, 2025
25 checks passed
@beagins beagins deleted the VAULT-34216/namespace-count branch April 18, 2025 01:03
beagins added a commit that referenced this pull request Apr 18, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 19, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 22, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 24, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 29, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 29, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 29, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request Apr 30, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request May 1, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request May 1, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
beagins added a commit that referenced this pull request May 5, 2025
…pace count label (#30183)

* [VAULT-35046] Show namespace count label; use Hds::Dropdown instead of Hds::Superselect

* address misc pr comments

* update tests

* address PR comment

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* Update ui/app/components/namespace-picker.hbs

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>

* address PR comments: update tests

* use getter for namespace label

---------

Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
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.

4 participants