Skip to content

[core] Deprecate Popover in favor of PopoverNext#8006

Closed
ggdouglas wants to merge 10 commits into
developfrom
gd/deprecate-popover
Closed

[core] Deprecate Popover in favor of PopoverNext#8006
ggdouglas wants to merge 10 commits into
developfrom
gd/deprecate-popover

Conversation

@ggdouglas
Copy link
Copy Markdown
Contributor

@ggdouglas ggdouglas commented Apr 2, 2026

Summary

Marks the legacy Popover class component as deprecated, following the same pattern used for Overlay -> Overlay2. PopoverNext is the recommended replacement (see #7573).

Changes

Adds a @deprecated JSDoc tag and a @fileoverview frozen-code notice to popover.tsx. The re-export in components/index.ts gets the corresponding eslint-disable-next-line comment.

Shared types like PopoverProps, PopoverInteractionKind, and PopoverAnimation are not deprecated since PopoverNext also uses them.

Copilot AI review requested due to automatic review settings April 2, 2026 02:39
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 2, 2026

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[core] Deprecate Popover in favor of PopoverNext


Generate changelog in packages/datetime/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[core] Deprecate Popover in favor of PopoverNext


Generate changelog in packages/select/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[core] Deprecate Popover in favor of PopoverNext


Generate changelog in packages/table/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[core] Deprecate Popover in favor of PopoverNext


Check the box to generate changelog(s)

  • Generate changelog entry

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 2, 2026

Successfully generated changelog entries for:

  • packages/core/changelog
  • packages/datetime/changelog
  • packages/select/changelog
  • packages/table/changelog

Need to regenerate?

Simply interact with the changelog bot comment again to regenerate these entries.


📋Changelog Preview

💡 Improvements

  • [core] Deprecate Popover in favor of PopoverNext (#8006)
  • [core] Deprecate Popover in favor of PopoverNext (#8006)
  • [core] Deprecate Popover in favor of PopoverNext (#8006)

⏸️ Deprecations

  • [core] Deprecate Popover in favor of PopoverNext (#8006)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 @fileoverview frozen-code notice and @deprecated JSDoc to packages/core/src/components/popover/popover.tsx.
  • Added targeted/file-level ESLint disables for @typescript-eslint/no-deprecated around legacy Popover usages 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.

Comment on lines 184 to 185
// eslint-disable-next-line @typescript-eslint/no-deprecated
const timeout = this.props.popoverProps?.transitionDuration ?? Popover.defaultProps.transitionDuration;
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
// eslint-disable-next-line @typescript-eslint/no-deprecated
const timeout = this.props.popoverProps?.transitionDuration ?? Popover.defaultProps.transitionDuration;
const timeout = this.props.popoverProps?.transitionDuration ?? 300;

Copilot uses AI. Check for mistakes.
Comment on lines 48 to 49
// eslint-disable-next-line @typescript-eslint/no-deprecated
popoverRef?: React.RefObject<Popover<DefaultPopoverTargetHTMLProps>>;
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-deprecated
popoverRef?: React.RefObject<Popover<DefaultPopoverTargetHTMLProps>>;
popoverRef?: React.RefObject<any>;

Copilot uses AI. Check for mistakes.
Comment thread packages/datetime/src/common/datetimePopoverProps.ts Outdated
Comment thread packages/select/src/components/suggest/suggest.test.tsx Outdated
Comment thread packages/core/src/components/popover/popover.tsx
@blueprint-previews
Copy link
Copy Markdown

Deprecate Popover component in favor of PopoverNext

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

Inline Popover default to avoid deprecated class reference

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gd/deprecate-popover branch from b838227 to f039903 Compare May 19, 2026 15:36
@ggdouglas ggdouglas changed the base branch from develop to gd/popover-next-internal-migration May 19, 2026 15:37
@blueprint-previews
Copy link
Copy Markdown

Deprecate Popover component in favor of PopoverNext

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gd/deprecate-popover branch from f039903 to f778906 Compare May 19, 2026 16:13
@ggdouglas ggdouglas force-pushed the gd/popover-next-internal-migration branch from 89fa1fd to 3e75a68 Compare May 19, 2026 16:13
@blueprint-previews
Copy link
Copy Markdown

Deprecate Popover component in favor of PopoverNext

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

Base automatically changed from gd/popover-next-internal-migration to develop May 19, 2026 17:45
@ggdouglas
Copy link
Copy Markdown
Contributor Author

Replaced by #8124

@ggdouglas ggdouglas closed this May 19, 2026
@ggdouglas ggdouglas deleted the gd/deprecate-popover branch May 19, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants