[core] Fix inaccurate modifiersCustom migration warning (#8131)#8151
Open
adityasingh2400 wants to merge 2 commits into
Open
[core] Fix inaccurate modifiersCustom migration warning (#8131)#8151adityasingh2400 wants to merge 2 commits into
adityasingh2400 wants to merge 2 commits into
Conversation
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.
Generate changelog in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the incorrect warning text from #8131
This does not fully resolve the feature request in #8131 (whether to expose a public
middlewareprop onTooltipis a maintainer API decision). It only corrects the dev-only warning so it points at a migration path that actually exists today.Checklist
Changes proposed in this pull request:
On 6.15.0,
Tooltipmigrated toPopoverNextinternally. When a consumer passesmodifiersCustom,popoverPropsToNextPropsdrops it and emits a dev-only warning telling the user to "Migrate to themiddlewareprop manually."The problem reported in #8131 is that components which wrap
Popoverinternally (Tooltip, and alsoSelect,Suggest,MultiSelect,Breadcrumbs,MenuItem,ContextMenuPopover, the datetime inputs) do not expose a publicmiddlewareprop. They forwardmiddlewaretoPopoverNextinternally, but aTooltipconsumer reading the warning has nomiddlewareprop 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:
PopoverNext, reimplement the behavior as a Floating UI middleware and pass it via themiddlewarepropTooltip, pass it via themodifiersprop, which Blueprint already converts tomiddlewareinternallymiddlewarepropNo API change and no behavioral change.
modifiersCustomis still dropped exactly as before, the warning still fires once, only the text is corrected.The corrected message reads:
Reviewers should focus on:
Whether the suggested migration paths are the ones you want to point consumers at, in particular the
modifiers-on-Tooltippath. The existing test inpopoverNextMigrationUtils.test.tsasserts 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.