Skip to content

[Breaking] fix: Drop Fluent V1 styles - #14769

Closed
MartinZikmund wants to merge 5 commits into
masterfrom
dev/mazi/drop-fluentv1-safe
Closed

MartinZikmund wants to merge 5 commits into
masterfrom
dev/mazi/drop-fluentv1-safe

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Dec 10, 2023 •

Copy link
Copy Markdown
Member

GitHub Issue (If applicable): part of #14765

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Fluent V1 is no longer supported and is buggy.

What is the new behavior?

Drop v1 styles in non-breaking manner.

PR Checklist

Please check if your PR fulfills the following requirements:

This change drops the Fluent V1 styles in a non-breaking manner by redirecting them to the V2 styles. Later we will be able to drop the versioned styles altogether
@github-actions github-actions Bot added the area/code-generation Categorizes an issue or PR as relevant to code generation label Dec 10, 2023
@MartinZikmund

MartinZikmund commented Dec 10, 2023 •

Copy link
Copy Markdown
Member Author

@jeromelaban @Youssef1313

If I didn't miss something, this should not be breaking (except for behavior breaking, but I doubt any app is still using the old styles anyway):

  • Adjusted V1 styles to link the generated themeresources_v2.xaml, meaning existing libraries which directly reference XamlControlsResourcesV1 in generated code for some reason will still work, just against the V2 styles instead
  • For apps that will be recompiled the logic switches to XamlControlsResourcesV2 for the generated code
  • Using ControlsResourcesVersion.Version1 will still switch to V2 styles

As part of breaking changes we can then safely drop the whole version separation and just keep Uno.UI.FluentTheme library, WinUI3 no longer has any "resources version" concept

@unodevops

Copy link
Copy Markdown
Contributor

#endif
break;
// As Fluent Styles V1 are no longer officially supported, prefer V2 styles.
requestedVersion = MaxSupportedResourcesVersion;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this variable used anymore?

@ajpinedam ajpinedam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Youssef1313 Youssef1313 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but let's wait for @jeromelaban's approval as well

@jeromelaban

Copy link
Copy Markdown
Member

This might still be breaking for UWP apps, particularly if resources don't match between versions. Building those styles are not impacting the build time that much, and we should not breaking in 5.x.

@MartinZikmund MartinZikmund changed the title fix: Drop Fluent V1 styles (non-breaking) [Breaking] fix: Drop Fluent V1 styles Mar 3, 2024
@MartinZikmund

Copy link
Copy Markdown
Member Author

Closing for now until breaking changes are addressed

# Conflicts:
#	src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/XamlFileGenerator.cs
#	src/Uno.UI.FluentTheme.v1/FluentMerge.targets
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/CalendarView_themeresources.xaml
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/CommandBarFlyout.xaml
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/MediaTransportControls_themeresources.xaml
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/NavigationBackButton_v1.xaml
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/NavigationView_v1.xaml
#	src/Uno.UI.FluentTheme.v1/Resources/Version1/PriorityDefault/TeachingTip_v1.xaml
#	src/Uno.UI.FluentTheme.v1/themeresources_v1.xaml
@MartinZikmund
MartinZikmund deleted the dev/mazi/drop-fluentv1-safe branch November 12, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/code-generation Categorizes an issue or PR as relevant to code generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants