-
Notifications
You must be signed in to change notification settings - Fork 841
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
[EuiModal] Ensure Modal closes in correct order for nested EuiPopover #7939
Merged
mgadewoll
merged 9 commits into
elastic:main
from
mgadewoll:modal/7879-prevent-closing-nested-popovers
Aug 2, 2024
Merged
[EuiModal] Ensure Modal closes in correct order for nested EuiPopover #7939
mgadewoll
merged 9 commits into
elastic:main
from
mgadewoll:modal/7879-prevent-closing-nested-popovers
Aug 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cee-chen
reviewed
Aug 1, 2024
cee-chen
reviewed
Aug 1, 2024
cee-chen
reviewed
Aug 1, 2024
cee-chen
reviewed
Aug 1, 2024
cee-chen
reviewed
Aug 2, 2024
packages/eui/.loki/reference/chrome_mobile_Layout_EuiModal_EuiModal_Nested_Popover.png
Outdated
Show resolved
Hide resolved
cee-chen
reviewed
Aug 2, 2024
packages/eui/.loki/reference/chrome_desktop_Layout_EuiModal_EuiModal_Nested_Popover.png
Outdated
Show resolved
Hide resolved
cee-chen
approved these changes
Aug 2, 2024
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.
🎉 Fantastic job again!
mgadewoll
commented
Aug 2, 2024
packages/eui/.loki/reference/chrome_desktop_Layout_EuiModal_EuiModal_Initial_Focus.png
Show resolved
Hide resolved
💚 Build Succeeded
History
|
cee-chen
added a commit
to elastic/kibana
that referenced
this pull request
Aug 5, 2024
`v95.5.0` ⏩ `v95.6.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)_ --- ## [`v95.6.0`](https://github.com/elastic/eui/releases/v95.6.0) - Updated `EuiIcon` with a new `crossInCircle` glyph ([#7924](elastic/eui#7924)) **Bug fixes** - Fixed `EuiEmptyPrompt` to correctly collapse and expand responsively when used with custom breakpoints larger than the default `xl` breakpoint ([#7935](elastic/eui#7935)) **Accessibility** - Improved the experience of `EuiModal` by ensuring nested `EuiPopover` closes on `Escape` keypress instead of the modal ([#7939](elastic/eui#7939)) **CSS-in-JS conversions** - Converted `EuiDatePicker` to Emotion ([#7937](elastic/eui#7937)) - Removed `$euiDatePickerCalendarWidth` - Removed `$euiDatePickerPadding` - Removed `$euiDatePickerGap` - Removed `$euiDatePickerCalendarColumns` - Removed `$euiDatePickerButtonSize` - Removed `$euiDatePickerMinControlWidth` - Removed `$euiDatePickerMaxControlWidth` - Removed `@mixin datePickerCaret` - Removed `@mixin datePickerArrow`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
closes #7879
This PR updates
EuiModal
to ensure that nestedEuiPopover
is closed first onEscape
key press, instead of the EuiModal closing completely.Both
EuiModal
andEuiPopover
close callbacks already havestopPropagation
in place. Instead the suggested change adds a check if the event target is inside of the modal or not, ensuring that the Modal event does not take over unexpectedly.Screen.Recording.2024-08-01.at.14.04.43.mov
QA
Escape
key press on the opened popover closes the popover and not the modalEscape
key press closes the modalGeneral checklist
Checked in both light and dark modesChecked in mobileAdded documentationProps have proper autodocs (using@default
if default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesIf applicable, added the breaking change issue label (and filled out the breaking change 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)