[EuiTabs] Pass size and expand to all children using a React context provider#6478
Merged
cee-chen merged 3 commits intoelastic:mainfrom Dec 14, 2022
Merged
[EuiTabs] Pass size and expand to all children using a React context provider#6478cee-chen merged 3 commits intoelastic:mainfrom
size and expand to all children using a React context provider#6478cee-chen merged 3 commits intoelastic:mainfrom
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
Contributor
|
jenkins test this |
cee-chen
approved these changes
Dec 14, 2022
Contributor
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/ |
jbudz
pushed a commit
to elastic/kibana
that referenced
this pull request
Dec 22, 2022
## Summary `eui@71.0.0` ⏩ `eui@72.0.0` --- ## [`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 `trim@0.0.1` 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 <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
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