-
Notifications
You must be signed in to change notification settings - Fork 37
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
STCOM-1240 Added support for clear icon in TextArea #2181
Conversation
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.
8f33226
to
c09224a
Compare
Good catch, @JohnC-80, I added another commit to handle resizing: chrome_Of4UOmy7Vk.mp4 |
c09224a
to
14c8698
Compare
Hello @JohnC-80 Could you please re-review @BogdanDenis already fixed last feedback? |
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.
Apologies for delay in feedback here. ResizeObserver seems like a great way to handle this, but it looks like there does need to be some statefulness to this or perhaps more attention to positioning the element when it does appear. Attaching a gif that shows 2 issues - When I focus away from the text area, the clear Icon shifts back to its original position.
The gif also shows what happens when I switch to RTL direction.
Hey @JohnC-80, I added some changes to support RTL and fix positioning when losing focus chrome_4xsJ3GsLEP.mp4 |
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 2 New issues |
* STCOM-1240 Added support for clear icon in TextArea * STCOM-1240 Handle resize of TextArea * STCOM-1240 Fix TextArea end controls position with rtl and when losing focus
stripes-components leverages `window.ResizeObserver` since STCOM-1240 (/folio-org/stripes-components/pull/2181), which is not present on JSDom and therefore must be mocked. Refs UIU-3066, STCOM-1240
Description
Added support for clear icon in
<TextArea>
Checked the component in multiple apps and changes in component structure don't seem to affect visuals
Screenshots
Issues
STCOM-1240
Related PRs
folio-org/stripes-testing#2648