Skip to content

fix(new-arch): metro warning for Flyout/Popup #14817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

frankcalise
Copy link
Contributor

@frankcalise frankcalise commented Jun 25, 2025

Description

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

While building an app in the New Architecture template, if you use either <Flyout /> or <Popup /> you'll be met with the unsupported Fabric view red box. This error is displayed from RN core.

Additionally, we can display a Metro warning to make the error more clear to the user - that they should be migrating to <Modal />

Resolves #14671

What

  1. Detects if we're running Fabric via global.nativeFabricUIManager
  2. Outputs a warning via console.warn in the contructors of Flyout and Popup

Screenshots

Collapsed Warning Expanded Warning
image image

Testing

Manually tested by editing node_modules\react-native-windows\Libraries\Components\Flyout\Flyout.js

Changelog

Should this change be included in the release notes: No

Microsoft Reviewers: Open in CodeFlow

@frankcalise frankcalise requested a review from a team as a code owner June 25, 2025 12:25
@acoates-ms
Copy link
Contributor

Please run yarn change to generate a change file for this change.
And I think we should probably use the warnOnce method to display the warning?

@frankcalise
Copy link
Contributor Author

@acoates-ms sure thing, should it bump the prelease version if it is just a warning in this case?

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.

Add metro warning for Flyout/Popup in NewArch
2 participants