hotfix: correct EuiFlexGroup and EuiFlexItem ref prop type and other small adjustments#7724
Merged
tkajtoch merged 6 commits intoelastic:mainfrom May 7, 2024
Merged
Conversation
…sed to support styled components and other component decorator functions that lose the generic typings
|
Preview staging links for this PR:
|
Collaborator
💚 Build Succeeded
History
|
1Copenut
approved these changes
May 1, 2024
Contributor
1Copenut
left a comment
There was a problem hiding this comment.
Changes LGTM. I followed your suggested QA pattern by puling your branch and adding the const Test = () => Component block into the docs pages and running yarn lint. I then reverted to main with the changes and ran yarn lint again.
The linting failed both times on main and passed both times on your feature branch.
jbudz
pushed a commit
to elastic/kibana
that referenced
this pull request
May 10, 2024
`v94.2.1-backport.0` ⏩ `v94.3.0` _[Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_ --- ## [`v94.3.0`](https://github.com/elastic/eui/releases/v94.3.0) - Updated `launch` glyph for `EuiIcon` ([#7670](elastic/eui#7670)) - Updated `EuiComboBox`'s `options` to support including tooltip details for selectable options. Use `toolTipContent` to render tooltip information, and `toolTipProps` to optionally customize the tooltip rendering behavior ([#7700](elastic/eui#7700)) - Updated the following existing glyphs in `EuiIcon`: ([#7727](elastic/eui#7727)) - `error` (now an outlined version instead of filled) - `tokenMetricCounter` - `tokenMetricGauge` - Added the following new glyphs to `EuiIcon`: ([#7727](elastic/eui#7727)) - `tokenDimension` - `clickLeft` - `clickRight` - `clockCounter` - `errorFilled` (the previous `error` glyph design) - `warningFilled` **Bug fixes** - Fixed a visual layout bug for `EuiComboBox` with `isLoading` in mobile views ([#7700](elastic/eui#7700)) - Fixed missing styles on header cells of `EuiDataGrid` that prevented content text alignment styles to apply ([#7720](elastic/eui#7720)) - Fixed `EuiFlexGroup` and `EuiFlexItem` `ref` prop typing to support refs of the same type as the passed `component` type and allow `displayName` to be defined for easy component naming when using component wrappers like `styled()` ([#7724](elastic/eui#7724)) --- Most of the code changes you'll see in this PR are caused by the recent EuiFlex* changes making it generic. This, unfortunately, is something that `styled()` doesn't always like. I replaced the failing usages of `styled(EuiFlexGroup)` and `styled(EuiFlexItem)` to use `component` and other native EuiFlex* props, resulting in the same output but being better typed. We plan to add more props to EuiFlex* components giving developers control over properties like `flex-grow` and `flex-shring`, and reducing the need for writing any custom CSS when using these components. This should reduce the number of `styled()` wrappers needed even further --------- Co-authored-by: kibanamachine <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
This PR fixes
reftyping bug in the recently merged #7612, addsCommonPropsandPropsWithChildrentypes toEuiFlexGroupprops to get it aligned withEuiFlexItem(it's unnecessary after the fixes added to kibana EUI upgrade PR but I kept it just in case), and allows definingdisplayNameon the component with no type casts necessary.QA
EuiFlexGroupandEuiFlexItemref prop doesn't raise any type errorsGeneral checklist