fix: Menu and CSSContainerQuery interop#682
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
409c6dd to
ec81c0e
Compare
| @@ -0,0 +1,12 @@ | |||
| import { render } from '@testing-library/react' | |||
| import { CSSContainerQuery } from '../css-container-query' | |||
|
|
|||
There was a problem hiding this comment.
note: same test as previously implemented, just no describe or it usage.
| /** | ||
| * Returns the closest ancestor acting as a popover for the given element. Useful in event | ||
| * handlers when needing to imperatively control the popover from one of its descendants. | ||
| */ |
There was a problem hiding this comment.
note: new helper function. This is reexported by Menu
ec81c0e to
93b8005
Compare
| @@ -1,4 +1,7 @@ | |||
| export * from './breakpoints' | |||
There was a problem hiding this comment.
note: export CSS container query, plus other ones that have been missed in recent work.
| @@ -85,7 +85,6 @@ export * from './core/checkbox-group' | |||
| export * from './core/chip' | |||
| export * from './core/chip-group' | |||
| export * from './core/compact-select-native' | |||
There was a problem hiding this comment.
note: now handled by the export * from './utils' later on in this barrel file
| @@ -75,5 +75,5 @@ Menu.Divider = MenuDivider | |||
| Menu.Group = MenuGroup | |||
| Menu.Item = MenuItem | |||
|
|
|||
There was a problem hiding this comment.
note: make the new helper for menu's available. It's just a reexport of the popover one for now.
Menu.getClosestMenuElementhelper function to allow menu items to more easily find their parent menu. This is particularly useful for menu items that need to manually close the menu.@reapit/elements/core/container-queryover to@reapit/elements/utils/css-container-queryto align with it's actual name (CSSContainerQuery) and more clearly communicate it's not a "core" component