Add a responsiveHeader prop to the EuiAccordion#2141
Add a responsiveHeader prop to the EuiAccordion#2141sulemanof wants to merge 1 commit intoelastic:masterfrom
Conversation
| <EuiFlexGroup | ||
| gutterSize="none" | ||
| alignItems="center" | ||
| responsive={responsiveHeader}> |
There was a problem hiding this comment.
Thanks @sulemanof ! I actually think this just has been overlooked since there are few instances of accordions using the extra actions. However, I don't think there's a reason responsive should ever be true. The inner label will just wrap and everything else will just stay center aligned. How about we remove this new prop and just change this to be
| responsive={responsiveHeader}> | |
| responsive={false}> |
There was a problem hiding this comment.
In fact, looking at @maryia-lapata's PR and the nested craziness of selectors in this file https://github.com/elastic/kibana/pull/40866/files#diff-1235e98f96e13b1964ee5a0e1b0ff94d makes me think we need to remove the EuiFlexGroup dependency all together from EuiAccordion.
There was a problem hiding this comment.
I think it's largely due to the negative margin issue with our flex system. It causes really dumb problems with anything that has an overflow applied (like accordion). #937
We could either address it there or simply make something more specific in accordion like you mention. Likely though, people would just add flex groups back into it for more complicated layouts.
Summary
While using the accordion on small screens there could be a necessity not to wrap buttons on the right side:
Such a necessity was caused in kibana default vis editor (in the metric
euiFlexGroup--responsiveis deleted to show the desired behavior):Checklist