-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Emotion] Convert
EuiListGroup
(#6207)
* Converted list group styles to emotion * Initial list group item styles * Converting `EuiListGroupItem` and `EuiPinnableListGroup` to Emotion * Adding extra action component * Removed `inherit` color from `EuiListGroupItem` * Removed `ghost` color in favor of theme provider * Passing down `size` and `color` props * Added new CL entry * Added list group inner * Making focus outlines look good * Adding `alwaysShow` * Custom color in last example * Updating ghost examples with theme provider * Reverting class names in use * CL * [EuiDataGrid] Remove mounted snapshots in favor of render * [PR feedback ] misc test/css tweaks - make `css` merging as top-level prop and as iconProps work correctly - add requiredProps to basic renders test * [PR feedback] Remove unnecessary `euiListGroupItemInnerStyles` args in favor of array logic * [PR feedback] Remove `euiListGroupItemStyles` in favor of array conditionals & obj keys + DRY out repeated euiBackgroundColor() calls * Fix non-dark-mode EuiListGroup in docs * [docs] Convert EuiListGroup docs from js to tsx * [EuiListGroupItemExtraAction] Export props type and document more clearly in props table + move alwayShow to top of props list * [EuiListGroupItemExtraAction] Fix non-working hover/focus CSS selectors - `.euiListGroupItem-isDisabled` is no longer a className, so the :not() selector is not working and the action still appears on hover on disabled items - passing `parentIsDisabled` as an internal prop from EuiListGroupItem and making it an array conditional solves the hover issue - the parent li is not focusable so the `:focus &` selector doesn't work either. Changing it to to the button and `+ &` solves the issue + remove unnecessary comment * [EuiListGroupItemExtraAction] Add basic unit tests + clean up styles array further - the hover CSS is unnecessary if alwaysShow is true, so add a condition for it * Fix overflowing text pushing action icons outside of item * [EuiListGroupItemExtraAction] Fix margin-right spacing - currently 8px on prod which generally seems to match the button padding size better * [Enhancement] Improve button hitbox of tooltip wrapped items - this allows button content inside tooltips to grow to 100% of the EuiListGroupItem - this is an enhancement from current prod behavior * Clean up wrapText CSS - Remove unnecessary CSS on __inner - the width: 100% is totally unnecessary (tested with both extra action and without) and the word break can be applied to the __label CSS instead - DRY out unsetting CSS by using ternary instead of base CSS (but keep empty base for naming) - DRY out CSS by using text utils * Fix raw `icon` elements being passed it not receiving our new Emotion CSS * Fix/cleanup misc custom maxWidth behavior - use logical CSS property instead of max-width - do not apply maxWidthDefault emotion style if using a custom inline max-width - fix maxWidth conditional checks - remove || fallback / type def in favor of let - improve props documentation/typing * [docs] other misc props documentation improvements * misc code organization * [EuiListGroupItem] Add working `shouldRenderCustomStyles` + test nested `iconProps` and `extraAction` props + fix `extraAction` props not correctly passing/merging `className` + fix misc console.warn about missing EuiButtonIcon aria-label + add test for `style` prop on parent EuiListGroupItem, since it gets spread to the wrapped child and not the className wrapper * Remove `euiPinnableListGroup__itemExtraAction` classes - they're now being correctly passed to the `EuiListGroupItemExtraAction` but they're not really doing anything / just adding a lot of noise - consumers can simply hook into `.euiListGroupItemExtraAction` instead - no Kibana references to these classes, so IMO they're safe to remove Co-authored-by: Constance Chen <[email protected]>
- Loading branch information
1 parent
bc232d2
commit deabfa9
Showing
42 changed files
with
1,261 additions
and
1,340 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import React, { FunctionComponent } from 'react'; | ||
|
||
import { EuiPinnableListGroupItemProps } from '../../../../src/components/list_group'; | ||
import { | ||
EuiPinnableListGroupItemProps, | ||
EuiListGroupItemExtraActionProps, | ||
} from '../../../../src/components/list_group'; | ||
|
||
export const EuiPinnableListGroupItem: FunctionComponent<EuiPinnableListGroupItemProps> = () => ( | ||
<div /> | ||
); | ||
|
||
export const EuiListGroupItemExtraAction: FunctionComponent<EuiListGroupItemExtraActionProps> = () => ( | ||
<div /> | ||
); |
Oops, something went wrong.