Repository navigation
[EuiTabs] Pass size and expand to all children using a React context provider - #6478
Conversation
|
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
37ee90a to
8a4724b
Compare
size and expand props to all children using a React context providersize and expand to all children using a React context provider
|
jenkins test this |
cee-chen
left a comment
There was a problem hiding this comment.
Awesome work on this @dawitam11 - I've QA'd locally and everything works great. I've updated the tests for EuiTabs to more clearly capture intended effects via snapshots, as well as a test case for the specific issue in #6311 (wrappers/grandchildren). LMK if anything in the commit I pushed up didn't make sense.
Really appreciate your fantastic community contributions as always! 🎉
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6478/ |
## Summary `[email protected]` ⏩ `[email protected]` --- ## [`72.0.0`](https://github.com/elastic/eui/tree/v72.0.0) - Added the `customQuickSelectRender` render prop to `EuiSuperDatePicker`, which allows customizing the Quick Select popover ([#6382](elastic/eui#6382)) - `EuiFilePicker` styles have been updated to look more like an interactive element. ([#6479](elastic/eui#6479)) - Added a third argument to `EuiSelectable`'s `onChange` callback. The single `option` object that triggered the `onChange` event is now also passed to consumers with its most recent `checked` state ([#6487](elastic/eui#6487)) **Bug fixes** - `EuiTabs` now passes `size` and `expand` to all children using a React context provider. ([#6478](elastic/eui#6478)) - Fixed security warnings caused by `[email protected]` sub-dependency ([#6482](elastic/eui#6482)) **Breaking changes** - Removed `size` and `expand` props from `EuiTab` ([#6478](elastic/eui#6478)) ## [`71.1.0`](https://github.com/elastic/eui/tree/v71.1.0) **Deprecations** - Renamed `EuiPageSideBarProps` to `EuiPageSideBarProps_Deprecated`, to reduce usage/confusion with `EuiPageSidebar` ([#6468](elastic/eui#6468)) Co-authored-by: Kibana Machine <[email protected]>
Summary
EuiTabscomponent passessizeandexpandprops only to children (EuiTabcomponents) that are direct descendants. The props will not be passed if the children, or one of the children, is wrapped in another element. This PR fixes the issue by using context instead of props to passsizeandexpandvalues to allEuiTabchildren at any level.EuiTabs in nested wrappers do not correctly inheritsizefromEuiTabs#6367General checklist
- [ ] Checked in mobile- [ ] Checked in both light and dark modes- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] Updated the Figma library counterpart