-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
Build Results: |
CI Results: |
<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"> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ nice work!
This adds a
paths
tab to the kv engine secret view that gives users the API and CLI paths for copying, plus sample commandsexample: