-
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.
[EuiBasicTable][EuiInMemoryTable] Enable more action props to accept …
…an optional callback + fix missing tooltips on collapsed actions (#7373)
- Loading branch information
Showing
17 changed files
with
382 additions
and
212 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- Updated the actions column in `EuiBasicTable` and `EuiInMemoryTable`s. Alongside `name`, the `description`, `href`, and `data-test-subj` properties now also accept an optional callback that the current `item` will be passed to | ||
- Updated `EuiContextMenuItem` with a new `toolTipProps` prop | ||
|
||
**Bug fixes** | ||
|
||
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not showing tooltip descriptions when rendered in the all actions popover menu | ||
- Fixed missing underlines on `EuiContextMenu` link hover | ||
|
||
**Deprecations** | ||
|
||
- Deprecated `EuiContextMenuItem`'s `toolTipTitle` prop. Use `toolTipProps.title` instead | ||
- Deprecated `EuiContextMenuItem`'s `toolTipPosition` prop. Use `toolTipProps.position` instead | ||
|
||
**Accessibility** | ||
|
||
- Fixed `EuiBasicTable` and `EuiInMemoryTable` actions not correctly reading out action descriptions to screen readers | ||
- Fixed `EuiBasicTable` and `EuiInMemoryTable` primary actions not visibly appearing on keyboard focus |
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
107 changes: 36 additions & 71 deletions
107
src/components/basic_table/__snapshots__/default_item_action.test.tsx.snap
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,86 +1,51 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DefaultItemAction render - button 1`] = ` | ||
<EuiToolTip | ||
content="action 1" | ||
delay="long" | ||
display="inlineBlock" | ||
position="top" | ||
exports[`DefaultItemAction renders an EuiButtonEmpty when \`type="button" 1`] = ` | ||
<span | ||
class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" | ||
> | ||
<EuiButtonEmpty | ||
color="primary" | ||
flush="right" | ||
isDisabled={false} | ||
onClick={[Function]} | ||
size="s" | ||
<button | ||
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-s-empty-primary-flush-right" | ||
type="button" | ||
> | ||
action1 | ||
</EuiButtonEmpty> | ||
</EuiToolTip> | ||
`; | ||
|
||
exports[`DefaultItemAction render - default button 1`] = ` | ||
<EuiToolTip | ||
content="action 1" | ||
delay="long" | ||
display="inlineBlock" | ||
position="top" | ||
> | ||
<EuiButtonEmpty | ||
color="primary" | ||
flush="right" | ||
isDisabled={false} | ||
onClick={[Function]} | ||
size="s" | ||
> | ||
action1 | ||
</EuiButtonEmpty> | ||
</EuiToolTip> | ||
`; | ||
|
||
exports[`DefaultItemAction render - icon 1`] = ` | ||
<EuiToolTip | ||
content="action 1" | ||
delay="long" | ||
display="inlineBlock" | ||
position="top" | ||
> | ||
<EuiButtonIcon | ||
aria-labelledby="generated-id" | ||
color="primary" | ||
iconType="trash" | ||
isDisabled={false} | ||
onClick={[Function]} | ||
/> | ||
<EuiScreenReaderOnly> | ||
<span | ||
id="generated-id" | ||
class="euiButtonEmpty__content emotion-euiButtonDisplayContent" | ||
> | ||
<span> | ||
<span | ||
class="eui-textTruncate euiButtonEmpty__text" | ||
> | ||
action1 | ||
</span> | ||
</span> | ||
</EuiScreenReaderOnly> | ||
</EuiToolTip> | ||
</button> | ||
</span> | ||
`; | ||
|
||
exports[`DefaultItemAction render - name 1`] = ` | ||
<EuiToolTip | ||
content="action 1" | ||
delay="long" | ||
display="inlineBlock" | ||
position="top" | ||
> | ||
<EuiButtonEmpty | ||
color="primary" | ||
flush="right" | ||
isDisabled={false} | ||
onClick={[Function]} | ||
size="s" | ||
exports[`DefaultItemAction renders an EuiButtonIcon with screen reader text when \`type="icon"\` 1`] = ` | ||
<div> | ||
<span | ||
class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock" | ||
> | ||
<button | ||
aria-labelledby="generated-id" | ||
class="euiButtonIcon emotion-euiButtonIcon-xs-empty-primary" | ||
type="button" | ||
> | ||
<span | ||
aria-hidden="true" | ||
class="euiButtonIcon__icon" | ||
color="inherit" | ||
data-euiicon-type="trash" | ||
/> | ||
</button> | ||
</span> | ||
<span | ||
class="emotion-euiScreenReaderOnly" | ||
id="generated-id" | ||
> | ||
<span> | ||
xyz | ||
action1 | ||
</span> | ||
</EuiButtonEmpty> | ||
</EuiToolTip> | ||
</span> | ||
</div> | ||
`; |
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
Oops, something went wrong.