Skip to content

Conversation

@DhariniJeeva
Copy link
Collaborator

@DhariniJeeva DhariniJeeva commented Oct 9, 2025

Description

https://hashicorp.atlassian.net/browse/ICU-17397

This PR migrates to use hds key value inputs component.

Note: This pr only migrates a couple of forms with text and select inputs. The remaining forms will be migrated once this pattern is established.

Screenshots (if appropriate)

Screenshot 2025-10-08 at 3 29 10 PM Screenshot 2025-10-08 at 3 28 51 PM

sample error :
Screenshot 2025-10-13 at 6 29 23 PM

No change in response

critical options with data
Screenshot 2025-10-08 at 10 18 25 PM

critical options without data
Screenshot 2025-10-08 at 10 18 04 PM

account_claims_map with data
Screenshot 2025-10-08 at 10 24 27 PM

account_claims_map without data
Screenshot 2025-10-08 at 10 24 43 PM

How to Test

Checklist

  • I have added before and after screenshots for UI changes
  • I have added JSON response output for API changes~
  • [ ] I have added steps to reproduce and test for bug fixes in the description
  • I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added a11y-tests label to run a11y audit tests if needed

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.
  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
  • If applicable, I've documented the impact of any changes to security controls.
    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

chore: 🤖 key value migration

test: 💍 refactor tests

fix: 🐛 vars, tests

fix: 🐛 test

fix: 🐛 include custom label

fix: 🐛 empty key/value

fix: 🐛 filter logic

fix: 🐛 comment

fix: 🐛 comments

refactor: 💡 comments and helper method

chore: 🤖 undo file change
@DhariniJeeva DhariniJeeva self-assigned this Oct 9, 2025
@DhariniJeeva DhariniJeeva requested a review from a team as a code owner October 9, 2025 19:04
@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
boundary-ui Ready Ready Preview Comment Oct 14, 2025 3:00am
boundary-ui-desktop Ready Ready Preview Comment Oct 14, 2025 3:00am

Copy link

@didoo didoo left a comment

Choose a reason for hiding this comment

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

Left a few comments, mostly suggestion and nitpicks, apart from the one about the Error block being yielded in the wrong container, which should be fixed to make sure the errors are correctly displayed

disabled={{@disabled}}
>
<:header as |H|>
{{#if @legend}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be optional? It seems we should always have a legend to be accessible

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have a use cases for not having a legend? I also lean towards this not being optional.

{{/if}}
</R.Field>

{{#unless this.hideValueField}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be hiding the key field instead of the value field if we just want one field? Though should this even be necessary?

</R.Field>
{{/unless}}

<R.DeleteRowButton
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like we need to hide this if there's no input yet according to HDS suggestions.

<:row as |R|>
<R.Field as |F|>
<F.Label>{{or @keyLabel (t 'form.key.label')}}</F.Label>
{{#if (eq @keyFieldType 'select')}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering if this component is trying too hard to simplify the HDS component without adding enough convenience for the limitations it now builds in.

It seems the hideValueField is only necessary because we need to handle the option of one field or two fields but we actually should be able to handle any number of fields as HDS also supports generic fields and not just inputs which we now limit.

Would it make more sense to cut down and remove the baked in fields (as well as the switches for keyFieldType) and just let the consumer handle adding in the fields? We could just yield back the <:row as |R|> to the consumer to handle this. I also notice all the keys/values also share the same name/errors which doesn't seem right.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking over this and Zed's comment, I think I would lean towards allowing the consumer to handle this by yielding back. That should give us the flexibility without this complexity I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants