Deprecate autolink functionality to copy useWinUI3 flags from react-native.config.js into ExperimentalFeatures.props #14761
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.
Summary
This PR removes the deprecated functionality in
ensureXAMLDialect()
that alloweduseWinUI3
values fromreact-native.config.js
to override values inExperimentalFeatures.props
. This feature was confusing, unnecessary, and causing test failures.Background
The
ensureXAMLDialect()
function previously had logic that:useWinUI3
fromreact-native.config.js
ExperimentalFeatures.props
This behavior was problematic because:
Changes Made
Core Logic Changes
ensureXAMLDialect()
function inautolinkWindows.ts
:useWinUI3FromConfig
variable and related logicExperimentalFeatures.props
ExperimentalFeatures.props
Test Updates
Removed failing tests in
autolink.test.ts
:ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props
ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props
Removed broken test in
projectConfig.test.ts
:Preserved Functionality
useWinUI3
setting inreact-native.config.js
remains available for other uses (e.g., project generation)ExperimentalFeatures.props
values directlyImpact
useWinUI3
usageTesting
The remaining tests verify that:
useWinUI3
is not specified in config, the function usesExperimentalFeatures.props
values directlyUseWinUI3=true
andUseWinUI3=false
in project filesFixes #14601.