Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiListGroupItem] Render extraAction button when showToolTip is true #7159

Merged

Conversation

nickpeihl
Copy link
Member

@nickpeihl nickpeihl commented Sep 6, 2023

Summary

Renders the extraAction button in the EuiListGroupItem when showToolTip === true.

When providing a list of links in an EuiListGroup I wanted to show which links open in a new tab by adding the popout icon, similar to external links in EuiLink. However, the extraAction button was not rendering when the showToolTip prop was included.

Here is an example testing this PR where I am showing the links I'm creating with tooltips and the external icon indicator. Notice how the Dashboard links have tooltips and the first link can also show the extra action button. The second link does not include the extraAction prop so the button is not rendered.

extra-actions-with-tooltip.mp4

Using the extra action button to show that the link will pop open a new tab is maybe a bit of a hack. The extra action button accomplishes the same effect as clicking the link. But I do prefer how the button is still visible while the text may be truncated since users can change the size of the links panel on the dashboard.

truncated-with-tooltips.mp4

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Checked in both light and dark modes
  • Checked in Chrome, Safari, Edge, and Firefox
  • Added or updated jest and cypress tests
  • A changelog entry exists and is marked appropriately

@nickpeihl nickpeihl changed the title Render extraAction button in EuiListGroupItem when showToolTip is true [EuiListGroupItem] Render extraAction button when showToolTip is true Sep 6, 2023
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_7159/

@cee-chen cee-chen self-requested a review September 6, 2023 17:46
Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for finding and fixing this bug @nickpeihl! ❤️‍🔥

@cee-chen cee-chen enabled auto-merge (squash) September 6, 2023 17:46
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_7159/

@cee-chen cee-chen merged commit 1594206 into elastic:main Sep 6, 2023
6 of 7 checks passed
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

@nickpeihl nickpeihl deleted the listgroupitem-showTooltip-extraAction branch September 6, 2023 19:01
jbudz added a commit to elastic/kibana that referenced this pull request Sep 18, 2023
EUI `88.2.0` ➡️ `88.3.0`

## [`88.3.0`](https://github.com/elastic/eui/tree/v88.3.0)

- `EuiGlobalToastList` now shows a "Clear all" button by default once
above a certain number of toasts (defaults to 3). This threshold is
configurable with the `showClearAllButtonAt` prop
([#7111](elastic/eui#7111))
- Added an optional `onClearAllToasts` callback to `EuiGlobalToastList`
([#7111](elastic/eui#7111))
- Added the `value`, `onChange`, and `onCancel` props that allow
`EuiInlineEdit` to be used as a controlled component
([#7157](elastic/eui#7157))
- Added `grabOmnidirectional`, `transitionLeftIn`, `transitionLeftOut`,
`transitionTopIn`, and `transitionTopOut` icon glyphs.
([#7168](elastic/eui#7168))

**Bug fixes**

- Fixed `EuiInlineEdit` components to correctly spread `...rest`
attributes to the parent wrapper
([#7157](elastic/eui#7157))
- Fixed `EuiListGroupItem` to correctly render the `extraAction` button
when `showToolTip` is also passed
([#7159](elastic/eui#7159))

**Dependency updates**

- Updated `@hello-pangea/dnd` to v16.3.0
([#7125](elastic/eui#7125))
- Updated `@types/lodash` to v4.14.198
([#7126](elastic/eui#7126))

**Accessibility**

- `EuiAccordion` now correctly respects reduced motion settings
([#7161](elastic/eui#7161))
- `EuiAccordion` now shows a focus outline to keyboard users around its
revealed children on open
([#7161](elastic/eui#7161))

**CSS-in-JS conversions**

- Converted `EuiSplitPanel` to Emotion
([#7172](elastic/eui#7172))


⚠️ As a quick heads up, serverless tests appear to have been extremely
flake/failure-prone the last couple weeks, particularly Cypress tests.
We've evaluated the listed failures and fixed ones that were related to
changes in this PR, and we're relatively confident the remaining
failures are not related to changes from EUI. Please let us know if you
think this is not the case.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Cee Chen <constance.chen@elastic.co>
Co-authored-by: Jon <jon@elastic.co>
jbudz added a commit to elastic/kibana that referenced this pull request Sep 20, 2023
⚠️ NOTE: This PR is a copy of #166292 (which was reverted due to failing
Storybook builds). This is the same exact PR but with Storybook building
fixed.

---

EUI `88.2.0` ➡️ `88.3.0`

## [`88.3.0`](https://github.com/elastic/eui/tree/v88.3.0)

- `EuiGlobalToastList` now shows a "Clear all" button by default once
above a certain number of toasts (defaults to 3). This threshold is
configurable with the `showClearAllButtonAt` prop
([#7111](elastic/eui#7111))
- Added an optional `onClearAllToasts` callback to `EuiGlobalToastList`
([#7111](elastic/eui#7111))
- Added the `value`, `onChange`, and `onCancel` props that allow
`EuiInlineEdit` to be used as a controlled component
([#7157](elastic/eui#7157))
- Added `grabOmnidirectional`, `transitionLeftIn`, `transitionLeftOut`,
`transitionTopIn`, and `transitionTopOut` icon glyphs.
([#7168](elastic/eui#7168))

**Bug fixes**

- Fixed `EuiInlineEdit` components to correctly spread `...rest`
attributes to the parent wrapper
([#7157](elastic/eui#7157))
- Fixed `EuiListGroupItem` to correctly render the `extraAction` button
when `showToolTip` is also passed
([#7159](elastic/eui#7159))

**Dependency updates**

- Updated `@hello-pangea/dnd` to v16.3.0
([#7125](elastic/eui#7125))
- Updated `@types/lodash` to v4.14.198
([#7126](elastic/eui#7126))

**Accessibility**

- `EuiAccordion` now correctly respects reduced motion settings
([#7161](elastic/eui#7161))
- `EuiAccordion` now shows a focus outline to keyboard users around its
revealed children on open
([#7161](elastic/eui#7161))

**CSS-in-JS conversions**

- Converted `EuiSplitPanel` to Emotion
([#7172](elastic/eui#7172))

---------

Co-authored-by: Bree Hall <briannajdhall@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
delanni pushed a commit to delanni/kibana that referenced this pull request Sep 21, 2023
⚠️ NOTE: This PR is a copy of elastic#166292 (which was reverted due to failing
Storybook builds). This is the same exact PR but with Storybook building
fixed.

---

EUI `88.2.0` ➡️ `88.3.0`

## [`88.3.0`](https://github.com/elastic/eui/tree/v88.3.0)

- `EuiGlobalToastList` now shows a "Clear all" button by default once
above a certain number of toasts (defaults to 3). This threshold is
configurable with the `showClearAllButtonAt` prop
([elastic#7111](elastic/eui#7111))
- Added an optional `onClearAllToasts` callback to `EuiGlobalToastList`
([elastic#7111](elastic/eui#7111))
- Added the `value`, `onChange`, and `onCancel` props that allow
`EuiInlineEdit` to be used as a controlled component
([elastic#7157](elastic/eui#7157))
- Added `grabOmnidirectional`, `transitionLeftIn`, `transitionLeftOut`,
`transitionTopIn`, and `transitionTopOut` icon glyphs.
([elastic#7168](elastic/eui#7168))

**Bug fixes**

- Fixed `EuiInlineEdit` components to correctly spread `...rest`
attributes to the parent wrapper
([elastic#7157](elastic/eui#7157))
- Fixed `EuiListGroupItem` to correctly render the `extraAction` button
when `showToolTip` is also passed
([elastic#7159](elastic/eui#7159))

**Dependency updates**

- Updated `@hello-pangea/dnd` to v16.3.0
([elastic#7125](elastic/eui#7125))
- Updated `@types/lodash` to v4.14.198
([elastic#7126](elastic/eui#7126))

**Accessibility**

- `EuiAccordion` now correctly respects reduced motion settings
([elastic#7161](elastic/eui#7161))
- `EuiAccordion` now shows a focus outline to keyboard users around its
revealed children on open
([elastic#7161](elastic/eui#7161))

**CSS-in-JS conversions**

- Converted `EuiSplitPanel` to Emotion
([elastic#7172](elastic/eui#7172))

---------

Co-authored-by: Bree Hall <briannajdhall@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants