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: add copyable paths for CLI and API commands to kv v2 #22551

Merged
merged 16 commits into from
Aug 25, 2023

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented Aug 24, 2023

This adds a paths tab to the kv engine secret view that gives users the API and CLI paths for copying, plus sample commands
Screenshot 2023-08-24 at 11 34 05 AM

example:

path-copy

@hellobontempo hellobontempo added this to the 1.15 milestone Aug 24, 2023
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 24, 2023
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

<p class="helper-text has-text-grey has-bottom-padding-s">
This command obtains data and metadata for the latest version of this secret. In this example, Vault is located at
http://127.0.0.1:8200. For other API commands,
<DocLink @path="/vault/api-docs/secret/kv/kv-v2">
Copy link
Contributor

@kiannaquach kiannaquach Aug 24, 2023

Choose a reason for hiding this comment

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

[Future improvement + for different project]: Refactor the DocLink to use the HDS Inline Link. Stylistically it doesn't make a big difference, but might be good to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the note! I'm trying to decide the best way to adopt the HDS links 🤔 They're great out of the box in place of <LinkTo>.

But for our other link components I'm going back and forth a lot. We could get rid of our components all together and just use HDS components directly...however I like that <DocLink> prefills the path. It was really useful having the host default for when the website changed hosts, we only had to update links in a few places instead of everywhere that had the old web address.

One thought is to have an @inline arg that renders the HDS inline component. Another option is to that if the component has an @icon arg it renders a standalone link, otherwise it renders inline.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh yeah, links are a tough one to make decisions about! I like the idea of using HDS components out of the box since it eliminates confusion on what component to use. We don't have a component library with documentation so it's hard to figure out what components to use whereas hds is more explicit when comes to that. However, I also love that the DocLink makes it convenient so we don't have to prefix doc links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah - I think this is a great point that figuring out a component library could be useful to consider after HDS adoption is complete if we still have a bunch of components floating around. We previously used storybook but it became too difficult to maintain

Copy link
Contributor

@hashishaw hashishaw left a comment

Choose a reason for hiding this comment

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

✨ nice work!

@hellobontempo hellobontempo merged commit 42a3374 into main Aug 25, 2023
100 of 101 checks passed
@hellobontempo hellobontempo deleted the ui/VAULT-14763/add-copyable-paths-kv-v2 branch August 25, 2023 16:03
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.

3 participants