Skip to content

Enable SwiftUI based filters by default - #60499

Draft
intergalacticspacehighway wants to merge 1 commit into
mainfrom
enable-swiftui-filters
Draft

intergalacticspacehighway wants to merge 1 commit into
mainfrom
enable-swiftui-filters

Conversation

@intergalacticspacehighway

Copy link
Copy Markdown
Collaborator

Summary:

Enable enableSwiftUIBasedFilters by default and move it to the stable OSS release stage. It has been in canary since #56721.

Changelog:

[IOS] [CHANGED] - Use SwiftUI for filter effects such as blur by default

Test Plan:

  • yarn featureflags regenerated the flag files.

Signed-off-by: nishan (o^▽^o) <nishanbende@gmail.com>

@chrfalch chrfalch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The flag change matches how earlier flags were promoted, for example #59936: the default flips to true, the stage moves from canary to stable, the canary overrides are dropped, and the generated files agree with the config. With this default, iOS 16.4 and later render blur, grayscale, drop-shadow, saturate, contrast and hue-rotate. Below iOS 16.4 they are still ignored without a warning, and React Native supports iOS 15.1, so the same app renders differently by OS version. Please add a test plan and a changelog entry: this changes rendering for every iOS app that sets these filters.

},
enableSwiftUIBasedFilters: {
defaultValue: false,
defaultValue: true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

With this default, the SwiftUI path no longer follows the order of the filter list. SwiftUIContainerView always applies the modifiers in one fixed order: blur, grayscale, shadow, saturation, contrast, then hue rotation. Each update* call also replaces the previous value. Example: filter: [{dropShadow: '0 4px 8px red'}, {grayscale: 1}] should give a gray shadow, as CSS and Android do, but iOS keeps the red shadow because grayscale runs before the shadow is added. Example: filter: [{blur: 2}, {blur: 2}] applies only one blur. Should this be fixed before the default flips, or at least listed as a known limitation in the changelog?

This branch has not been deployed

No deployments
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.

2 participants