Skip to content

feat(EuiSuperUpdateButton): support custom button labels via children prop - #7576

Merged
tkajtoch merged 8 commits into
elastic:mainfrom
tkajtoch:feat/super-update-button-custom-content
Mar 18, 2024
Merged

tkajtoch merged 8 commits into
elastic:mainfrom
tkajtoch:feat/super-update-button-custom-content

Conversation

@tkajtoch

@tkajtoch tkajtoch commented Mar 13, 2024 •

Copy link
Copy Markdown
Contributor

Summary

This adds support for custom button labels by passing the children prop to EuiSuperUpdateButton and converts existing enzyme tests to React Testing Library.

QA

General checklist

  • Browser QA
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.

@tkajtoch tkajtoch self-assigned this Mar 13, 2024
@tkajtoch
tkajtoch marked this pull request as ready for review March 13, 2024 13:35
@tkajtoch
tkajtoch requested a review from a team as a code owner March 13, 2024 13:35

@mgadewoll mgadewoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚢 🐈‍⬛ LGTM! Nice update to move related tests to RTL 👍

Comment thread changelogs/upcoming/7576.md Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

++ Lene's comment, super appreciate the conversion from Enzyme+snapshots to RTL and specific assertions! 🎉

* when the data needs updating (the `needsUpdate` prop)
* or is loading (the `isLoading` prop).
*/
children?: ReactNode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Really like this detail of adding props docs for children, thanks for going the extra mile!

@tkajtoch
tkajtoch force-pushed the feat/super-update-button-custom-content branch from b9a707b to 5ccf144 Compare March 18, 2024 13:30
@kibanamachine

Copy link
Copy Markdown
Contributor

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @tkajtoch

@cee-chen cee-chen left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Going to go ahead and merge this in for this week's release, so that Kibana/Shared UX can start using it sooner. Awesome job and extra cleanup on this Tomasz!

@tkajtoch
tkajtoch merged commit 9f9a6b2 into elastic:main Mar 18, 2024
cee-chen added a commit to elastic/kibana that referenced this pull request Mar 22, 2024
`v93.3.0`⏩ `v93.4.0`

---

## [`v93.4.0`](https://github.com/elastic/eui/releases/v93.4.0)

- Added the following properties to `EuiButtonGroup`'s `options`
configs: `toolTipContent`, `toolTipProps`, and `title`. These new
properties allow wrapping buttons in `EuiToolTips`, and additionally
customizing or disabling the native browser `title` tooltip.
([#7461](elastic/eui#7461))
- Enhanced `EuiResizeObserver` and `useResizeObserver`'s performance to
not trigger page reflows on resize event
([#7575](elastic/eui#7575))
- Updated `EuiSuperUpdateButton` to support custom button text via an
optional `children` prop
([#7576](elastic/eui#7576))

**Bug fixes**

- Fixed `EuiFlyout` to not repeatedly remove/add a body class on resize
([#7462](elastic/eui#7462))
- Fixed `EuiToast` title text to wrap instead of overflowing out of the
container ([#7568](elastic/eui#7568))
- Fixed a visual bug with `EuiHeaderBreadcrumbs` with popovers
([#7580](elastic/eui#7580))

**Deprecations**

- Deprecated `euiPalettePositive` and `euiPaletteNegative` in favour of
a more culturally inclusive `euiPaletteGreen` and `euiPaletteRed`
([#7570](elastic/eui#7570))
- Deprecated all charts theme exports in favor of `@elastic/charts`
exports: ([#7572](elastic/eui#7572))
- Deprecated `EUI_CHARTS_THEME_<DARK|LIGHT>` in favor of
`<DARK|LIGHT>_THEME` from `@elastic/charts`.
([#7572](elastic/eui#7572))
- Deprecated `EUI_SPARKLINE_THEME_PARTIAL` in favor of
`useSparklineOverrides` theme from the kibana `charts` plugin `theme`
service.

**Accessibility**

- Updated `EuiModal` to set an `aria-modal` attribute and a default
`dialog` role ([#7564](elastic/eui#7564))
- Updated `EuiConfirmModal` to set a default `alertdialog` role
([#7564](elastic/eui#7564))
- Fixed `EuiModal` and `EuiConfirmModal` to properly trap
Safari+VoiceOver's virtual cursor
([#7564](elastic/eui#7564))
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.

5 participants