-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[VAULT-34808] UI: move the radio
block in FormField
under the HDS block
#30555
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
[VAULT-34808] UI: move the radio
block in Fo
8000
rmField
under the HDS block
#30555
Conversation
084e541
to
665a654
Compare
CI Results: |
0dffe69
to
d245fa1
Compare
e406bb1
to
6664da0
Compare
793c5d3
to
914d1a6
Compare
174a9af
to
810c1e6
Compare
914d1a6
to
509a832
Compare
810c1e6
to
5d3f5c3
Compare
9aaea0b
to
d2a44e6
Compare
5d3f5c3
to
f3e4d6b
Compare
d2a44e6
to
bbf755a
Compare
f3e4d6b
to
5e71766
Compare
@Monkeychip can you (or someone else) have a look at this other PR? It is built on top of #30345, so we have a "standard" for how to write the tests for the form fields migrated to HDS. Let me also know if you want me to take screenshots of before/after the changes for some of the pages. |
Build Results: |
{{#if this.hasRadioSubText}} | ||
<F.HelperText data-test-help-text={{val.subText}}>{{val.subText}}</F.HelperText> | ||
{{else if this.hasRadioHelpText}} | ||
<F.HelperText data-test-help-text={{val.helpText}}>{{val.helpText}}</F.HelperText> |
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.
In this case the @helpText
instead of being hidden behind a tooltip, is exposed as field's helper text (better for accessibility). See thread for context: https://hashicorp.slack.com/archives/C05DGFEBCP2/p1746701234173239
@@ -205,6 +205,12 @@ export default class FormFieldComponent extends Component { | |||
this.setAndBroadcast(updatedValue); | |||
} | |||
@action | |||
setAndBroadcastRadio(item) { | |||
// we want to read the original value instead of `event.target.value` so we have `false` (boolean) and not `"false"` (string) |
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.
thank you for the comment!
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.
Great work!
2662e40
to
128ee85
Compare
@Monkeychip I had to rebase to fix a couple of conflicts, can you re-approve? thanks |
128ee85
to
f245ad6
Compare
f245ad6
to
95cad10
Compare
… block (#30555) * [UI] moved template logic for `radio` editType in `FormField` under the `isHdsField` block (#34742) * [UI] added integration tests for `FormField` with editType=‘radio’ (#34742) * [UI] fix broken tests (#34742)
… block (#30555) * [UI] moved template logic for `radio` editType in `FormField` under the `isHdsField` block (#34742) * [UI] added integration tests for `FormField` with editType=‘radio’ (#34742) * [UI] fix broken tests (#34742)
Description
What does this PR do?
isHdsFormField
ofFormField
to include theeditType === 'radio'
use caseeditType === 'radio'
inFormField
under theisHdsField
blockonChange
argument, I had to add a newsetAndBroadcastRadio
action in the controllerJira ticket: https://hashicorp.atlassian.net/browse/VAULT-34808
TODO only if you're a HashiCorp employee
backport/
label that matches the desired release branch. Note that in the CE repo, the latest release branch will look likebackport/x.x.x
, but older release branches will bebackport/ent/x.x.x+ent
.of a public function, even if that change is in a CE file, double check that
applying the patch for this PR to the ENT repo and running tests doesn't
break any tests. Sometimes ENT only tests rely on public functions in CE
files.
in the PR description, commit message, or branch name.
description. Also, make sure the changelog is in this PR, not in your ENT PR.