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: Display minus icon for empty MaskedInput value. Show MaskedInput for KV secrets without values #22039

Merged

Conversation

malinac02
Copy link
Contributor

@malinac02 malinac02 commented Jul 24, 2023

Description:

  1. This PR changes what the <MaskedInput> component shows when it has no value
  • Before: it showed just a blank space when the "show value" button is pressed.
  • After: it shows a minus icon (<Icon @name="minus" />) so that it is more clear to users that there is simply no value there
    • When downloaded, the content is an empty string
    • When copied, a blank space is copied and a copy success alert shows
  1. This PR changes what the KV secrets page shows when there secrets with no value
  • Reproduction Steps: enable KV engine > create a path > create a secret in that path with only a key, no value > view the path so you can see the key/value pairs
  • Before: secrets with only a key and no value showed the minus icon for the value.
  • After: a key with no value shows the newly updated <MaskedInput>. This makes it so that the KV secrets page looks more consistent even if there are keys with no values

Pictures:
Before:
Before

After:
After 1
After 2

…ged SecretFormShow to show this MaskedInput with minus icon instead of showing just a minus icon
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jul 24, 2023
@malinac02 malinac02 added the ui label Jul 24, 2023
@malinac02 malinac02 added this to the 1.15 milestone Jul 24, 2023
@malinac02 malinac02 changed the title UI: Display a minus icon when MaskedInput value is empty UI: Display a minus icon when MaskedInput value is empty. Show MaskedInput for KV secrets without values Jul 26, 2023
@malinac02 malinac02 changed the title UI: Display a minus icon when MaskedInput value is empty. Show MaskedInput for KV secrets without values UI: Display minus icon for empty MaskedInput value. Show MaskedInput for KV secrets without values Jul 26, 2023
@malinac02 malinac02 marked this pull request as ready for review July 26, 2023 00:09
@malinac02 malinac02 marked this pull request as draft July 26, 2023 00:20
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

@malinac02 malinac02 marked this pull request as ready for review July 26, 2023 18:09
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 work! Just a comment about test naming, but nothing blocking. 😄

@malinac02 malinac02 merged commit 7e6bb1f into main Jul 31, 2023
98 checks passed
@malinac02 malinac02 deleted the ui/VAULT-18247/kv-secret-display-MaskedInput-with-minus-icon branch July 31, 2023 19:29
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.

None yet

2 participants