feat: PopoverPanel + Dropdown deprecation#566
Conversation
cb-ekuersch
left a comment
There was a problem hiding this comment.
Before we can recommend switching to Popover we should at least:
- audit Popover to make sure it can handle any/all use cases that Dropdown can. Any storybook stories from Dropdown should be able to be effortlessly migrated to Popover stories
- add docsite pages for Popover
ca7a9d9 to
1bcca8d
Compare
102cbda to
4f73334
Compare
🟡 Heimdall Review Status
🟡
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
🟡
0/1
|
Denominator calculation
|
5246936 to
5aa2102
Compare
- Add PopoverPanel, PopoverPanelContent, tests, stories, and @coinbase/cds-web/popover export - Document PopoverPanel (docgen, sidebar, component docs) - Deprecate Dropdown, DropdownProps-related types, and DropdownContent for removal in v10 - Popover: forwardRef with mergeRefs for Floating UI reference; flatten to one root div; add style/className to PopoverProps - Re-export PopoverPanel from overlays index; add Dropdown docs warning
fix ModalWrapper not closing when clicked outside without overlay
add support for componentConfig
5aa2102 to
e99745a
Compare
| import React, { memo, useCallback, useMemo } from 'react'; | ||
| import React, { forwardRef, memo, useCallback, useMemo } from 'react'; | ||
| import { zIndex } from '@coinbase/cds-common/tokens/zIndex'; | ||
| import { useMergeRefs } from '@coinbase/cds-common/hooks/useMergeRefs'; |
There was a problem hiding this comment.
will replace with mergeRefs after merging into v9
| type Placement as FloatingPlacement, | ||
| shift, | ||
| useFloating, | ||
| } from '@floating-ui/react-dom'; |
There was a problem hiding this comment.
originally replacing with popper with floating UI in popover was done in v9 feature branch, but moved it here since we needed to have PopoverPanel before v9 and Popover is affected
There was a problem hiding this comment.
non-breaking since all props are the same
| /** Can optionally pass a maxHeight. | ||
| * @default 300 | ||
| */ | ||
| maxPanelHeight?: React.CSSProperties['maxHeight']; |
There was a problem hiding this comment.
maxPanelWidth/Height instead of maxHeight to make it clear to which element dimension is set
| onClick={!disableOverlayPress ? onOverlayPress : undefined} | ||
| testID="modal-overlay" | ||
| /> | ||
| ) : ( |
There was a problem hiding this comment.
adding this here so Modal without overlay can still be closed when clicking outside
| /** | ||
| * @deprecated Import `useResponsiveHeight` from `@coinbase/cds-web/popover` instead. This will be removed in a future major release. | ||
| * @deprecationExpectedRemoval v10 | ||
| */ |
There was a problem hiding this comment.
added a replacement under popover directory. the replacement handle can handle maxHeight with responsive value
| onBlur?: (event?: React.FocusEvent) => void; | ||
| /** Callback fired when a mouse down event is fired on the subject */ | ||
| onMouseDown?: (event: React.MouseEvent) => void; | ||
| /** |
There was a problem hiding this comment.
added style can className support to Popover
What changed? Why?
Popover (internal)
offset (skid/gap), flip + shift + limitShift for fixed placements, and autoPlacement
for placement values that start with "auto".
reference ref (useMergeRefs).
PopoverPanel / PopoverPanelContent
(closePopover) => node, optional enableMobileModal, sizing (panelWidth, min/max
width/height), showOverlay, contentPosition, ref with openPopover/closePopover.
core/componentConfig.ts.
(package.json exports).
styles explorer, sidebar, webMetadata).
useResponsivePanelMaxHeight (renamed from useResponsiveHeight in popover)
PopoverPanel).
(was dropdownHeight in the shared logic).
sizing; keep the same viewport / calc(100vh - …) responsive behavior.
phone/tablet/desktop breakpoints via useBreakpoints.
with the original non-responsive maxHeight API; deprecate in favor of importing
useResponsivePanelMaxHeight from @coinbase/cds-web/popover (removal v10) and add a
short comment that new behavior lives under overlays/popover.
Dropdown deprecation
Dropdown webMetadata warning: use PopoverPanel / PopoverPanelContent instead
(expected removal v10).
Other
receives overlay press so dismiss works without a visible Overlay.
Breaking / migration notes for consumers
ref and subject style/className are additive.
dropdown/useResponsiveHeight is legacy and deprecated.
UI changes
storybook
docs
Screen.Recording.2026-04-02.at.1.15.52.AM.mov
Testing
How has it been tested?
Testing instructions
Illustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false