-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiProvider] Add new componentDefaults
configuration
#6995
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
e76c8da
to
1a3a35e
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
1a3a35e
to
92f1d8b
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
92f1d8b
to
839b68d
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
839b68d
to
8f11a68
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
1 similar comment
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
buildkite test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
…on (#6923) * Set up `EuiComponentDefaultsProvider` + light tests - actual defaults/override tests should be written per-component * Add documentation * Add support for beta/new badges to subitems in nav and subheadings * changelog
…ponentDefaults` (#6941) * [EuiPortal] Add global settings for Portal-Based Components * changelog * Remove `PortalProvider` usage in favor of `EuiComponentDefaultsProvider` Update EuiPortal component - update class naming to match other instances in EUI for consistency (e.g. EuiAccordionClass) - update function component typing and syntax - minor object spread syntax nit * Add EuiPortal tests for provided `insert` behavior - has to be Cypress, as our current version of jest/jsdom does not support `insertAdjacentElement` + clarify in comments of the new provider test how individual component tests should be handled * changelog * Clean up types - not super necessary to have a separate file for it, these types are only used within EuiPortal - use `as const` array and typeof instead of `keyof` - simplify insert positions map typing --------- Co-authored-by: y1j2x34 <y1j2x34@qq.com>
…d via `EuiProvider.componentDefaults` (#6942) * [cleanup] Fix EuiFocusTrap's props / props table - it's kind of a dumpster fire right now with many props not being picked up so I'm wholesale rearranging many things - storybook props/controls also throws its own special brand of fun into this * [cleanup] Update existing Storybook stories to account for new props controls - we can remove the specified `crossFrame` arg now that it actually exists as a prop - default `returnFocus` to a boolean, since it can also take a function - add an `onDeactivation` state update (useful when testing `clickOutsideDisables=true`) * [cleanup] Remove skipped focus trap Jest tests - these were already converted to Cypress tests, so there's no point / no need to keep them * [cleanup] Convert Jest tests to RTL + add a `shouldRenderCustomStyles` to confirm that react-focus-on accepts className/css/style props * Configure `EuiFocusTrap` to accept component defaults * Add Cypress test for `gapMode` * Add Storybook story for `crossFrame` & misc EuiProvider QA * changelog
…rovider.componentProps` (#6951) Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
…p-level EUI export
…ePagination` component defaults (#6993)
6acdd1d
to
72c7e0b
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
src/components/provider/component_defaults/component_defaults.test.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone through all commits again to make sure I didn't miss anything before. The changes look great!
Co-authored-by: Tomasz Kajtoch <tomek@kajto.ch>
Thanks a million Tomasz! Based on the comments on that keep coming in elastic/kibana#56406, people will really be happy about this in Kibana! :) |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_6995_buildkite/ |
💚 Build Succeeded
History
|
Summary
This feature branch merges into main the following already-reviewed PRs:
componentDefaults
prop, context, & documentation #6923insert
prop to be configured viaEuiProvider.componentDefaults
#6941gapMode
andcrossFrame
props to be configured viaEuiProvider.componentDefaults
#6942EuiProvider.componentProps
#6951EuiTablePagination
component defaults #6993As a reminder, the new
<EuiProvider componentDefaults>
API is in beta, and is currently only releasing with a limited number of supported components initially to test out usage and developer experience. In the future, EUI would potentially be open to either accepting specific requests for configurable component defaults, or (very pie in the sky) configuring all props across all EUI components to accept custom consumer defaults.QA
In theory this work should already be thoroughly QA'd by each preceding branch, but feel free to do a quick final pass/read through of https://eui.elastic.co/pr_6995/#/utilities/provider#component-defaults to ensure our documentation of this new prop is understandable.
General checklist
- [ ] A changelog entry exists and is marked appropriatelyN/A - each preceding feature branch PR should have added its own changelog