[core] Deprecate Popover in favor of PopoverNext#8006
Conversation
Generate changelog in
|
✅ Successfully generated changelog entries for:
Need to regenerate?Simply interact with the changelog bot comment again to regenerate these entries. 📋Changelog Preview💡 Improvements
⏸️ Deprecations
|
There was a problem hiding this comment.
Pull request overview
Deprecates the legacy Popover component in favor of PopoverNext, while suppressing internal @typescript-eslint/no-deprecated warnings across the monorepo to keep existing usages building cleanly.
Changes:
- Added
@fileoverviewfrozen-code notice and@deprecatedJSDoc topackages/core/src/components/popover/popover.tsx. - Added targeted/file-level ESLint disables for
@typescript-eslint/no-deprecatedaround legacyPopoverusages in source and test files. - Updated the core components re-export to suppress deprecation lint for
Popover.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/table/src/headers/columnHeaderCell.tsx | Suppresses deprecation lint for a legacy Popover menu usage. |
| packages/table/src/cell/formats/truncatedFormat.tsx | Suppresses deprecation lint for truncated-cell Popover usage. |
| packages/select/src/components/suggest/suggest.tsx | Suppresses deprecation lint around Popover usage and defaultProps access. |
| packages/select/src/components/suggest/suggest.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/select/src/components/select/select.tsx | Suppresses deprecation lint for legacy Popover usage. |
| packages/select/src/components/select/select.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/select/src/components/multi-select/multiSelect.tsx | Suppresses deprecation lint for Popover ref typing and usage. |
| packages/select/src/components/multi-select/multiSelect.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/select/src/common/selectPopoverProps.ts | Suppresses deprecation lint for exported popoverRef type using legacy Popover. |
| packages/docs-app/src/components/navHeader.tsx | Suppresses deprecation lint for legacy Popover usage. |
| packages/demo-app/src/examples/PopoverExample.tsx | Suppresses deprecation lint for demo usage of legacy Popover. |
| packages/datetime/src/components/timezone-select/timezoneSelect.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/datetime/src/components/date-range-input/dateRangeInput.tsx | Suppresses deprecation lint for legacy Popover usage. |
| packages/datetime/src/components/date-range-input/dateRangeInput.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/datetime/src/components/date-input/dateInput.tsx | Suppresses deprecation lint for legacy Popover usage. |
| packages/datetime/src/components/date-input/dateInput.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/datetime/src/common/datetimePopoverProps.ts | Suppresses deprecation lint for exported popoverRef type using legacy Popover. |
| packages/core/src/components/tooltip/tooltip.tsx | Suppresses deprecation lint for internal Popover ref and render usage. |
| packages/core/src/components/popover/popover.tsx | Adds deprecation and frozen-code documentation to legacy Popover. |
| packages/core/src/components/popover/popover.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/core/src/components/menu/menuItem.tsx | Suppresses deprecation lint for legacy Popover submenu usage. |
| packages/core/src/components/menu/menuItem.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/core/src/components/index.ts | Suppresses deprecation lint for Popover re-export. |
| packages/core/src/components/context-menu/contextMenuPopover.tsx | Suppresses deprecation lint for legacy Popover usage. |
| packages/core/src/components/context-menu/contextMenu.test.tsx | File-level disable for deprecated Popover references in tests. |
| packages/core/src/components/breadcrumbs/breadcrumbs.tsx | Suppresses deprecation lint for legacy overflow Popover usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // eslint-disable-next-line @typescript-eslint/no-deprecated | ||
| const timeout = this.props.popoverProps?.transitionDuration ?? Popover.defaultProps.transitionDuration; |
There was a problem hiding this comment.
Suggest now depends on a deprecated symbol (Popover.defaultProps.transitionDuration) for timing logic. To reduce coupling and make a future PopoverNext migration easier, prefer a non-deprecated source for the default (e.g., a shared constant exported from a non-deprecated module, or a local fallback literal matching the current default).
| // eslint-disable-next-line @typescript-eslint/no-deprecated | |
| const timeout = this.props.popoverProps?.transitionDuration ?? Popover.defaultProps.transitionDuration; | |
| const timeout = this.props.popoverProps?.transitionDuration ?? 300; |
| // eslint-disable-next-line @typescript-eslint/no-deprecated | ||
| popoverRef?: React.RefObject<Popover<DefaultPopoverTargetHTMLProps>>; |
There was a problem hiding this comment.
This exported public type (SelectPopoverProps.popoverRef) still forces the legacy deprecated Popover class into the public API surface. Consider introducing a non-deprecated “popover handle”/interface type (or a union that can support both Popover and PopoverNext refs) so downstream consumers don’t need to reference a deprecated symbol to type their refs.
| // eslint-disable-next-line @typescript-eslint/no-deprecated | |
| popoverRef?: React.RefObject<Popover<DefaultPopoverTargetHTMLProps>>; | |
| popoverRef?: React.RefObject<any>; |
Deprecate Popover component in favor of PopoverNextBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
96b0b03 to
b838227
Compare
Inline Popover default to avoid deprecated class referenceBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
b838227 to
f039903
Compare
Deprecate Popover component in favor of PopoverNextBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
f039903 to
f778906
Compare
89fa1fd to
3e75a68
Compare
Deprecate Popover component in favor of PopoverNextBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
|
Replaced by #8124 |
Summary
Marks the legacy
Popoverclass component as deprecated, following the same pattern used forOverlay->Overlay2.PopoverNextis the recommended replacement (see #7573).Changes
Adds a
@deprecatedJSDoc tag and a@fileoverviewfrozen-code notice topopover.tsx. The re-export incomponents/index.tsgets the correspondingeslint-disable-next-linecomment.Shared types like
PopoverProps,PopoverInteractionKind, andPopoverAnimationare not deprecated sincePopoverNextalso uses them.