eui
eui copied to clipboard
feat(eui): add tooltipProps prop to EuiCopy
Summary
[!IMPORTANT] This is a breaking change.
Closes https://github.com/elastic/eui/issues/8382
On this PR, I:
- feat(eui): add tooltipProps prop to EuiCopy
- chore(eui): rewrite EuiCopy tests to RTL
- chore(eui): add a test for tooltipProps in EuiCopy
- refactor(website): use tooltipProps for EuiCopy
Storybook
Control displays correctly:
No VRT references difference that could be a result of the changes on this PR.
Docs impact
Button guidelines (Staging link)
| Production | Localhost |
|---|---|
![]() |
![]() |
It set anchorClassName to eui-fullWidth so that the anchor takes the whole width of the container. Otherwise, the result would be:
Context menu (Staging link)
| Production | Localhost |
|---|---|
![]() |
![]() |
It set anchorClassName to eui-fullWidth so that the anchor takes the whole width of the container.
Icons (Staging link)
| Production | Localhost |
|---|---|
![]() |
![]() |
It set display="block" on the EuiToolTip anchor:
https://github.com/elastic/eui/blob/f319078347eaf905afb667c7492c989fdb1d581e/packages/eui/src/components/tool_tip/tool_tip.tsx#L345-L358
Kibana impact
There are 3 usages that pass props other than: textToCopy (required), beforeMessage, afterMessage
src/platform/packages/private/kbn-esql-editor/src/editor_footer/history_starred_queries.tsx(content)src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx(anchorClassName)src/platform/plugins/shared/share/public/components/url_panel_content.tsx(anchorClassName)
Cloud UI impact
There are no usages that pass props other than: textToCopy (required), beforeMessage, afterMessage
QA
Specific checklist
- [ ] The unit tests pass in CI
- [ ] The doc pages have no regression (staging links above)
- [ ] The
EuiCopycomponent has no regression in Storybook (you have to run Storybook locally with:yarn workspace @elastic/eui start) or on the documentation page - [ ] The Kibana and Cloud UI affected usages lists are complete
General checklist
- Browser QA
- [ ] ~Checked in both light and dark modes~
- [ ] ~Checked in both MacOS and Windows high contrast modes~
- (emulate forced colors if you do not have access to a Windows machine.)
- [ ] ~Checked in mobile~
- [ ] ~Checked in Chrome, Safari, Edge, and Firefox~
- [ ] ~Checked for accessibility including keyboard-only and screenreader modes~
- Docs site QA
- [ ] ~Added documentation~ (updated it)
- [ ] ~Props have proper autodocs (using
@defaultif default values are missing) and playground toggles~ (control for the prop, by default object) - [ ] ~Checked Code Sandbox works for any docs examples~
- Code quality checklist
- [x] Added or updated jest ~and cypress tests~
- [ ] ~Updated visual regression tests~
- Release checklist
- [x] A changelog entry exists and is marked appropriately.
- [x] If applicable, added the breaking change issue label (and filled out the breaking change checklist)
- Designer checklist
- [ ] ~If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)~





