[Emotion] Pre-emptively fix/regression test form components with tricky className
/css
locations
#6254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Related PRs: #6239, #6248, #6253, #6255
Several of our form components (note: with nested childProps, I didn't look for any others) have somewhat tricky DOM structure in that the wrapper their
className
s go on is not the same as the location that...rest
is spread to. This means that to accuratelyshouldRenderCustomStyles
test these components, I had to create a fake Emotion CSS className to merge with a custom/passedcss
prop.I thought this worth doing now rather than later (i.e. during the actual Emotion conversion of the components) to ensure that:
css
array merge approach is in place and not forgotten when converted to Emotionalso CC @miukimiu and @thompsongl since IIRC y'all are working on EuiDualRange currently - not sure if this conflicts with your work or compliments it.
Checklist
[ ] A changelog entry exists and is marked appropriatelyN/A, in theory not a bugfix