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

[EuiSuperDatePicker] Add support for quickSelectButtonProps #8380

Conversation

mgadewoll
Copy link
Contributor

@mgadewoll mgadewoll commented Mar 2, 2025

Summary

This PR adds support for the props quickSelectButtonProps on EuiSuperDatePicker to allow passing additional props to the button, e.g. for handling custom events.

QA

  • ci passes (added unit test verifies prop is applied)
  • (optional) checkout this PR and test that additional props can be passed

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • 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.
    • 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)

@mgadewoll mgadewoll self-assigned this Mar 2, 2025
@mgadewoll mgadewoll force-pushed the superdatepicker/support-quick-select-button-props branch from c58d787 to 6c24e1e Compare March 3, 2025 07:15
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@mgadewoll mgadewoll marked this pull request as ready for review March 3, 2025 08:08
@mgadewoll mgadewoll requested a review from a team as a code owner March 3, 2025 08:08
@weronikaolejniczak weronikaolejniczak self-requested a review March 3, 2025 09:44
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

I tested, I can pass props and they affect the button. I cannot pass isDisabled and isLoading.

Screenshot 2025-03-03 at 11 06 44
Screenshot 2025-03-03 at 11 07 00

One thing I'm wondering about is, should we be able to manipulate the color prop as well? Seems to me like this button might always have to be the same style due to its function. It's fine to leave it but we can also narrow down the control to avoid misuse.

Screenshot 2025-03-03 at 11 08 30

@mgadewoll
Copy link
Contributor Author

mgadewoll commented Mar 3, 2025

One thing I'm wondering about is, should we be able to manipulate the color prop as well? Seems to me like this button might always have to be the same style due to its function. It's fine to leave it but we can also narrow down the control to avoid misuse.

@weronikaolejniczak That's a good point which I also considered. Ultimately I decided to align usage with what's already possible with the updateButtonProps for the EuiSuperUpdateButton (code) which also allows to pass style related props.

@mgadewoll mgadewoll merged commit 766d3ef into elastic:main Mar 3, 2025
6 checks passed
tkajtoch added a commit to elastic/kibana that referenced this pull request Mar 7, 2025
# Backport

This is a manual backport of #212974 and #213292

---

`99.3.0-classic.0` ⏩ `100.0.0-classic.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---


## [`v100.0.0`](https://github.com/elastic/eui/releases/v100.0.0)

**Bug fixes**

- Fixed `EuiComboBox` by cleaning duplicated values when having a
delimiter prop. ([#8335](elastic/eui#8335))

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

- Minor design updates to `EuiCollapsibleNavBeta`
([#8332](elastic/eui#8332))
  - Allow section without a title
- Second-level icons should be horizontally aligned with the top-level
icon
  - Turn off text truncation for nav items
- Added `quickSelectButtonProps` to `EuiSuperDatePicker`
([#8380](elastic/eui#8380))

**Bug fixes**

- Fixed a bug in `EuiHeader` where the navigation of
`EuiCollapsibleNavBeta` would render below the `EuiFlyout`'s overlay
([#8325](elastic/eui#8325))

**Accessibility**

- Improved the accessibility of `EuiComboBox` by adding `aria-setsize`
and `aria-posinset` to ensure correct information is provided for its
virtualized listbox ([#8333](elastic/eui#8333))
- Improved the `EuiAccordionTrigger`'s screen reader UX by passed
`aria-hidden` to the `EuiAccordionArrow` to avoid duplicated
announcements by screen readers.
([#8342](elastic/eui#8342))

---------

Co-authored-by: Elastic Machine <[email protected]>
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.

4 participants