Skip to content

[core] Fix inaccurate modifiersCustom migration warning (#8131)#8151

Open
adityasingh2400 wants to merge 2 commits into
palantir:developfrom
adityasingh2400:fix-8131-modifierscustom-warning
Open

[core] Fix inaccurate modifiersCustom migration warning (#8131)#8151
adityasingh2400 wants to merge 2 commits into
palantir:developfrom
adityasingh2400:fix-8131-modifierscustom-warning

Conversation

@adityasingh2400
Copy link
Copy Markdown
Contributor

Addresses the incorrect warning text from #8131

This does not fully resolve the feature request in #8131 (whether to expose a public middleware prop on Tooltip is a maintainer API decision). It only corrects the dev-only warning so it points at a migration path that actually exists today.

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

On 6.15.0, Tooltip migrated to PopoverNext internally. When a consumer passes modifiersCustom, popoverPropsToNextProps drops it and emits a dev-only warning telling the user to "Migrate to the middleware prop manually."

The problem reported in #8131 is that components which wrap Popover internally (Tooltip, and also Select, Suggest, MultiSelect, Breadcrumbs, MenuItem, ContextMenuPopover, the datetime inputs) do not expose a public middleware prop. They forward middleware to PopoverNext internally, but a Tooltip consumer reading the warning has no middleware prop to migrate to, so the warning points at a nonexistent target.

This changes only the warning message (and the matching JSDoc line) to describe the paths that do exist:

  • on PopoverNext, reimplement the behavior as a Floating UI middleware and pass it via the middleware prop
  • on a wrapping component such as Tooltip, pass it via the modifiers prop, which Blueprint already converts to middleware internally
  • and it states plainly that wrapping components have no public middleware prop

No API change and no behavioral change. modifiersCustom is still dropped exactly as before, the warning still fires once, only the text is corrected.

The corrected message reads:

[Blueprint] popoverPropsToNextProps: modifiersCustom has no equivalent in PopoverNext and will be dropped. Reimplement the behavior as a Floating UI middleware: pass it via the middleware prop on PopoverNext, or via the modifiers prop on a wrapping component such as Tooltip (Blueprint converts modifiers to middleware). Components that wrap Popover do not expose a middleware prop directly.

Reviewers should focus on:

Whether the suggested migration paths are the ones you want to point consumers at, in particular the modifiers-on-Tooltip path. The existing test in popoverNextMigrationUtils.test.ts asserts the warning fires once but not its text, so it still passes unchanged. No new test was added since this is a message-only correction.

Screenshot

Not applicable, dev-console message only.

The dev-only warning in popoverPropsToNextProps told users to migrate
modifiersCustom to the middleware prop, but components that wrap Popover
internally (Tooltip, Select, and others) do not expose a middleware prop,
so the warning pointed at a target that does not exist for those users.

Update the message to describe the migration paths that actually exist:
the middleware prop on PopoverNext, or the modifiers prop on a wrapping
component such as Tooltip (which Blueprint converts to middleware). Also
clarify that wrapping components have no public middleware prop.
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Jun 6, 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] Fix inaccurate modifiersCustom migration warning (#8131)

Check the box to generate changelog(s)

  • Generate changelog entry

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.

1 participant