Font resize component fixes: Phase 2#1800
Conversation
| .select-month { | ||
| width: 8.125rem; | ||
| margin-right: 0.9375rem; | ||
| width: 16ch; |
There was a problem hiding this comment.
Note
Replaced rem with ch here because the width is determined primarily by the number of characters expected/allowed. I did not use the current input width tokens because they rely on ex units, which is intended primarily for vertical height of the letters, rather than width.
|
|
||
| .select-month { | ||
| width: 8.125rem; | ||
| margin-right: 0.9375rem; |
There was a problem hiding this comment.
Note
Replaced margin-right here with a column-gap on .date-container. This simplified implementation and standardized it to more closely match the spacing in memorable date.
| .usa-memorable-date { | ||
| margin-top: 16px; | ||
| // USWDS v3.7.1 set flex-wrap: wrap; This caused the year to always wrap when the month select option was active. | ||
| flex-wrap: nowrap; |
There was a problem hiding this comment.
Note
We want to allow wrap here to accommodate zoom and text resizing.
| <div> | ||
| <input | ||
| class="usa-input" | ||
| id="search-field" | ||
| name="search" | ||
| type="search" | ||
| ref={el => (this.inputRef = el as HTMLInputElement)} | ||
| aria-autocomplete={ariaAutoComplete} | ||
| aria-controls={ariaControls} | ||
| aria-expanded={ariaExpanded} | ||
| aria-haspopup={ariaHasPopup} | ||
| aria-label={label} | ||
| autocomplete="off" | ||
| onFocus={handleInputFocus} | ||
| onInput={handleInput} | ||
| onKeyDown={handleInputKeyDown} | ||
| role={role} | ||
| value={value} | ||
| /> | ||
| </button> | ||
| <button type="button" onClick={handleClearButtonClick} class={clearButtonClasses} aria-label="Clear the search contents"> | ||
| <va-icon | ||
| class="usa-search__clear-icon" | ||
| icon="close" | ||
| size={3} | ||
| /> | ||
| </button> | ||
| </div> |
There was a problem hiding this comment.
Note
Adding this wrapper div lets us position the clear icon relative to the nested div, rather than having to position it relative to the calculated widths of the search button. This new structure should make the styles more resilient, but a markup change has the potential to cause breaks, so curious to hear feedback.
jamigibbs
left a comment
There was a problem hiding this comment.
I think dev looks good but I do have a question/concern about how the USWDS label style is being imported in va-date. I think we could do the same thing with the component module import pattern like the other USWDS-isified components. We'd just need to change the stylesheet to scss and add the CSS class. You are much more in the weeds here so I might not have the full context what what is needing to be done.
…ent-of-veterans-affairs/component-library into 4881-font-resizing-fixes
jamigibbs
left a comment
There was a problem hiding this comment.
It feels like a small miracle that there are no UI test changes to accept but dev looks good to me! Thank you! 🚀
|
I feel like it should be reporting changes in the UI tests :/ @jamigibbs Is it normal for Chromatic to miss them? Any tips to re-run the tests so they catch the differences? |
@amyleadem What has worked in the past is updating the |
…ent-of-veterans-affairs/component-library into 4881-font-resizing-fixes
|
Thanks @jamigibbs, that worked! Re-running Chromatic caught 30 changes (😮), but thankfully all of them are expected. If you could take a look and let me know if you have any concerns, that would be great. |
jeana-adhoc
left a comment
There was a problem hiding this comment.
I don't know how/why this has sat since October, but I just reviewed this, and it looks good.
I did not merge main down into this, but we ought to and hope nothing... breaks.

Chromatic
https://4881-font-resizing-fixes--65a6e2ed2314f7b8f98609d8.chromatic.com
Description
Fixed font resizing issues in the following components:
For reference, these issues are documented in the component stories spreadsheet (Google docs 🔒)
Related tickets and links
Closes department-of-veterans-affairs/vets-design-system-documentation#4881
Screenshots
va-additional-info (as found in va-text-input)
va-date
va-memorable-date
va-search-input
va-telephone-input
va-text-input
Testing and review
Approvals
See the QA Checklists section below for suggested approvals. Use your best judgment if additional reviews are needed. When in doubt, request a review.
Approval groups
Add approval groups to the PR as needed:
QA checklists
Use the QA checklists below as guides, not rules. Not all checklists will apply to every PR but there could be some overlap.
In all scenarios, changes should be fully tested by the author and verified by the reviewer(s); functionality, responsiveness, etc.
✨ New Component Added
minorlabel🌱 New Component Variation Added
minorlabel🐞 Component Fix
patchlabel♿️ Component Fix - Accessibility
patchlabel🚨 Component Fix - Breaking API Change
majorlabel🔧 Component Update - Non-Breaking API Change
minorlabel📖 Storybook Update
ignore-for-releaselabel🎨 CSS-Library Update
css-librarylabel