Skip to content

[EuiPopoverFooter] Fix buggy panel padding size context#6698

Merged
cee-chen merged 6 commits intoelastic:mainfrom
cee-chen:fix-popover-context
Apr 6, 2023
Merged

[EuiPopoverFooter] Fix buggy panel padding size context#6698
cee-chen merged 6 commits intoelastic:mainfrom
cee-chen:fix-popover-context

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented Apr 6, 2023

Summary

closes #6695

The main (fairly simple) context fix is in 7619bfc.

The other commits are an Emotion cleanup that I noticed while here and should have caught when cleaning up EuiPopoverTitle in #6221

Repro steps

  • Go to https://codesandbox.io/s/exciting-water-vq07t2?file=/demo.js
  • Open the popover, and then click the date range picker in the popover
  • Click any time or date in the nested popover (causing a state rerender)
  • Close the date popover and notice that the original popover's footer has now changed/bugged out

before

QA

  • Go to http://localhost:8030/#/layout/popover
  • Click the popover button in the first example
  • Open the nested date range picker popover, click any date/time
  • Confirm that the original popover's footer has not changed/bugged out

after

General checklist

  • Revert [REVERT ME] commit
  • Checked in Chrome, Safari, Edge, and Firefox
  • A changelog entry exists and is marked appropriately

- [ ] Added or updated jest and cypress tests I skipped writing a specific regression test for this bug as nested popovers are generally a recommended-against edge-case, and code regression is incredibly unlikely as the context usage was simply wrong in the first place

cee-chen added 4 commits April 6, 2023 09:32
This component only should be *setting* context, not *using* it (which is causing incorrect inheritance from nested popovers)
- use Emotion keys and an internal helper util instead

+ comment cleanup so
@cee-chen cee-chen changed the title [EuiPopoverFooter] [EuiPopoverFooter] Fix buggy panel padding size context Apr 6, 2023
Copy link
Copy Markdown
Contributor

@breehall breehall left a comment

Choose a reason for hiding this comment

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

✅ I can confirm that this is fixed. I pulled the branch locally and did not find a padding issue when changing the dates.

@cee-chen
Copy link
Copy Markdown
Contributor Author

cee-chen commented Apr 6, 2023

🎉 Thanks a ton for confirming the fix Bree!

@cee-chen cee-chen enabled auto-merge (squash) April 6, 2023 19:49
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_6698/

@cee-chen cee-chen merged commit d6c8e10 into elastic:main Apr 6, 2023
@cee-chen cee-chen deleted the fix-popover-context branch April 6, 2023 20:25
jbudz added a commit to elastic/kibana that referenced this pull request Apr 18, 2023
EUI `77.0.0` ➡️ `77.1.1`

## [`77.1.0`](https://github.com/elastic/eui/tree/v77.1.0)

- Updated `EuiDatePicker` to display a warning icon and correctly set
`aria-invalid` when `isInvalid` is passed
([#6677](elastic/eui#6677))
- Updated `EuiFilePicker` to display an alert icon when `isInvalid`
([#6678](elastic/eui#6678))
- Updated `EuiTextArea` to display an alert icon when `isInvalid`
([#6679](elastic/eui#6679))
- Updated `EuiTextArea` to support the `isLoading` prop
([#6679](elastic/eui#6679))
- Updated `EuiComboBox` to display a warning icon and correctly set
`aria-invalid` when `isInvalid` is passed
([#6680](elastic/eui#6680))

**Bug fixes**

- Fixed `EuiAccordion` to not set an `aria-expanded` attribute on
non-interactive `buttonElement`s
([#6694](elastic/eui#6694))
- Fixed an `EuiPopoverFooter` bug causing nested popovers within
popovers (note: not a recommended use-case) to unintentionally override
its panel padding size inherited from context
([#6698](elastic/eui#6698))
- Fixed `EuiComboBox` to only delete the last selected item on backspace
if the input caret is present
([#6699](elastic/eui#6699))

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
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.

[EuiPopoverFooter] Mysteriously receives wrong padding value from EuiPopoverPanelContext

3 participants