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

UI: Update behavior when deleting nested secret from list #26845

Merged
merged 7 commits into from
May 6, 2024

Conversation

hashishaw
Copy link
Contributor

@hashishaw hashishaw commented May 6, 2024

TL;DR
This PR removes the withNavToNearestAncestor mixin and updates the UX behavior in nested secret lists that are not KV version 2 (eg. KV version 1, cubbyhole).

Previous Behavior
Say there's a secret engine with a secret at a deeply nested path (eg. kv1/one/two/three/four). A user viewing the list at kv1/one/two/three/ can see four in the list, and can delete from the list view. In the previous behavior, the UI would then try to attempt to navigate to each segment ancestor above until it got to a successful response, or got back to the list-root.

before-kv-nav

New Behavior
After updating everything to use router.transitionTo (required for upgrading to Ember 5), we could no longer catch the transition error from where it was called in the mixin. Instead, we are matching the updated pattern in KV version 2, and showing an empty state message while allowing the user to navigate back to the root themselves OR adjust the filter bar to move back up the tree. This behavior is more deterministic, and simplifies the error logic slightly.

after-kv-nav

  • Ent tests pass

@hashishaw hashishaw added the ui label May 6, 2024
@hashishaw hashishaw requested a review from a team as a code owner May 6, 2024 20:15
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 6, 2024
@hashishaw hashishaw added this to the 1.17.0-rc milestone May 6, 2024
Copy link

github-actions bot commented May 6, 2024

Build Results:
All builds succeeded! ✅

Copy link

github-actions bot commented May 6, 2024

CI Results:
All Go tests succeeded! ✅

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.

really nice solution and write up. thanks for tackling!

@hashishaw hashishaw enabled auto-merge (squash) May 6, 2024 20:54
@hashishaw hashishaw merged commit d4671a9 into main May 6, 2024
30 of 31 checks passed
@hashishaw hashishaw deleted the ui/replace-nav-to-nearest-ancestor branch May 6, 2024 21:04
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 ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants