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
Cannot set width of va-select input #2644
Comments
Hey team! Please add your planning poker estimate with Zenhub @Andrew565 @ataker @harshil1793 @it-harrison @jamigibbs @micahchiang @nickjg231 @powellkerry @rmessina1010 @rsmithadhoc |
Can the designers weigh in on this to make sure we want to add this functionality to We added it to text input because it's a USWDS feature for text input but I don't see the same thing for select: |
@jamigibbs - I don't see any issue with creating the same breakpoints for va-select that we use for va-text-input. Of course, the dev would need to make sure that the right size selected would correspond to the length of the selectable items in the list so the text don't get cut off. I would like to hear more input from the rest of the design team. @danbrady @babsdenney |
@LWWright7 I agree with you. It doesn't seem like an issue, the main concern would be making sure the options in the select are not cut off. @jamigibbs It is strange that the width setting is noticeably missing from the select in the USWDS. Looking at this PR, the USWDS recently updated some of their components to include new values for variants. It looks like maybe the USWDS decided not to add the width value to the Select. USWDS-Site: Fix component pages from audit (Phase 3) It might be worthwhile to ask the USWDS why they don't have a width variant for the select. The USWDS is manually applying a width to the examples on the select page. I would like to know more of the reasoning behind why the USWDS doesn't have a select width setting. |
@josephrlee Can you provide a screenshot of the form that is using the |
I agree with what everyone has said and don't see an issue with adding sizes. Some other random thoughts:
|
@jamigibbs, it's for the the type of work question on the FSR; it's in two places. One for the veteran employment question and the other for the spouse employment question: When our custom class is not applied, it inherits the full |
Unrelated to this request, I think our form is probably using the wrong component altogether. There are only 4 options in this screenshot above, so according to the USWDS guidance, it should be a radio button group instead. |
@josephrlee That's a good find. It does look like the design system would like it to be radio group with only 4 options. I think we can still add the width option to |
@jamigibbs , I am one of the designers on the team. :) I created a ticket on our teams board to get it done. Just need to check with our FE's on the level of effort for it! Also, thanks for getting the width prop added to the |
Bug Report
What happened
Can't set the width of a
va-select
component width without using custom CSS.Related ticket: #1712
What I expected to happen
Ideally, I would like to be able to have a
width
prop like is possible on theva-text-input
.Reproducing
Steps to reproduce:
Urgency
How urgent is this request? Please select the appropriate option below and/or provide details
Details
Here's what we've implemented in the FSR to accomplish this: https://github.com/department-of-veterans-affairs/vets-website/blob/4ed97e5e0438d2f45e66ba4c1f94568d36cdb738/src/applications/financial-status-report/components/employment/EmploymentRecord.jsx#L127
https://github.com/department-of-veterans-affairs/vets-website/blob/4ed97e5e0438d2f45e66ba4c1f94568d36cdb738/src/applications/financial-status-report/sass/financial-status-report.scss#L268
The text was updated successfully, but these errors were encountered: