nypl-design-system icon indicating copy to clipboard operation
nypl-design-system copied to clipboard

DSD-1791: Fix SearchBar select cutoff issue

Open jackiequach opened this issue 5 months ago • 1 comments

Fixes JIRA ticket DSD-1791

The Select component is sized to fit the largest option size; if the option exceeds the maxWidth of 255px (~30 characters) then the text is truncated.

This PR does the following:

  • Removes the right margin on the Select component of the SearchBar which caused the longest option text to be truncated even if the Select component is not at the maxWidth.
  • Fixes issue on Safari where overflowed text was not being truncated due to not having overflow: hidden

How has this been tested?

  • Locally on Storybook (Chrome, Firefox, Safari)

Accessibility concerns or updates

Accessibility Checklist

  • [ ] Checked Storybook's "Accessibility" tab for color contrast and other issues.
  • [ ] The feature works with keyboard inputs including tabbing back and forward and pressing space, enter, arrow, and esc keys.
  • [ ] For hidden text or when aria-live is used, a screenreader was used to verify the text is read.
  • [ ] For features that involve UI updates and focusing on DOM refs, focus management was reviewed.
  • [ ] The feature works when the page is zoomed in to 200% and 400%.

Open Questions

Checklist:

  • [ ] I have updated the Storybook documentation and changelog accordingly.
  • [ ] I have added relevant accessibility documentation for this pull request.
  • [ ] All new and existing tests passed.

Front End Review:

  • [ ] Review the Vercel preview deployment once it is ready.

jackiequach avatar Oct 02 '24 16:10 jackiequach