Skip to content

KeyValueInputs - Showcase #2973

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

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft

Conversation

didoo
Copy link
Contributor

@didoo didoo commented Jun 26, 2025

πŸ“Œ Summary

This is a follow-up of #2911, where we add the showcase pages for the KeyValueInput and re-create functional demos of UX flows that we've spotted in production.

πŸ› οΈ Detailed description

In this PR I have:

  • cherry-picked showcase related changes from KeyValueInputs - Component implementationΒ #2911 (branch hds-4903/key-value-component)
  • added a11y acceptance and percy tests
  • improved some of the existing demos
  • created fully-functional demos of KeyValueInputs within an <Hds::Form>
    • with validation and limit
    • with dynamic inputs
    • as filter for a table

Previews:

πŸ”— External links

Jira ticket: https://hashicorp.atlassian.net/browse/HDS-5069


πŸ‘€ Component checklist

  • Percy was checked for any visual regression

πŸ’¬ Please consider using conventional comments when reviewing this PR.

πŸ“‹ PCI review checklist
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've worked with GRC to document the impact of any changes to security controls.
    Examples of changes to controls include access controls, encryption, logging, etc.
  • If applicable, I've worked with GRC to ensure compliance due to a significant change to the in-scope PCI environment.
    Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.

@didoo didoo requested a review from a team as a code owner June 26, 2025 08:40
Copy link

vercel bot commented Jun 26, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Jul 4, 2025 8:05pm
hds-website βœ… Ready (Inspect) Visit Preview Jul 4, 2025 8:05pm

@didoo didoo changed the base branch from main to hds-4903/key-value-component June 26, 2025 08:41
@didoo didoo marked this pull request as draft June 26, 2025 08:46
@didoo didoo force-pushed the hds-4903/key-value-component branch from 61d2b67 to 3e927db Compare June 26, 2025 19:17
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from f218096 to b7b5c47 Compare June 26, 2025 19:19
@didoo didoo force-pushed the hds-4903/key-value-component branch from 3e927db to fb29869 Compare June 26, 2025 19:22
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from b7b5c47 to 18f8ded Compare June 26, 2025 19:23
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from 9ad8d4c to 18f8ded Compare June 26, 2025 20:51
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from 18f8ded to 5d963f5 Compare June 26, 2025 20:52
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from 5d963f5 to 4935322 Compare June 26, 2025 21:01
@didoo didoo force-pushed the hds-4903/key-value-component-showcase branch from 73d229a to 5b4a7cf Compare June 26, 2025 21:38
@dchyun
Copy link
Contributor

dchyun commented Jul 3, 2025

The new demo is a great walkthrough of the expected pattern! I went through all the listed steps, and some of my own attempting to break it and it is working smoothly for all of those cases.

My one suggestion is on the expected behavior for how the delete button acts on the first row when no other rows are present.

In the current demo:

  • With the toggle off, a delete button is never present when there is only one row. Any delete button in the first row is removed if the number of rows is changed from 2 to 1.
  • With the toggle on, a delete button is always present in the first row, even if it is clicked to clear the input values.

Based on the design guidance on delete behavior the expected interaction is slightly different.

  • The presence of the delete button in the first row is based only on if the user has entered any data into those fields.
  • It is only removed if those fields are empty.
  • Clicking it clears the fields and removes the button
  • Ex: If two rows are present and one is deleted, the delete button in the remaining row is still shown if that row is not empty.

Copy link
Contributor

@shleewhite shleewhite left a comment

Choose a reason for hiding this comment

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

Just a quick initial review, will circle back to look more thoroughly after the long weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants