Skip to content

fix(ios): add log advice back when using shadow w/o a background#57618

Closed
hannojg wants to merge 1 commit into
react:mainfrom
discord:dev/add-rct-advice-back-for-shadow
Closed

fix(ios): add log advice back when using shadow w/o a background#57618
hannojg wants to merge 1 commit into
react:mainfrom
discord:dev/add-rct-advice-back-for-shadow

Conversation

@hannojg

@hannojg hannojg commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary:

Back on old arch in RCTView.m we printed that warning:

// Can't accurately calculate box shadow, so fall back to pixel-based shadow
view.layer.shadowPath = nil;
RCTLogAdvice(
@"View #%@ of type %@ has a shadow set but cannot calculate "
"shadow efficiently. Consider setting a solid background color to "
"fix this, or apply the shadow to a more specific component.",
view.reactTag,
[view class]);

This was missing on new arch and due to it we were missing some unoptimized views in our app which tanked performance.

Changelog:

[IOS] [ADDED] - Print warning advice when using shadow* styles without providing a solid background color

Test Plan:

In rn-tester go to APIs > Box Shadow example to see the warnings printed!

Back on old arch in RCTView.m we printed that warning.
Due to this we were missing some unoptimized views in our app which tanked performance.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 20, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jul 20, 2026
@meta-codesync

meta-codesync Bot commented Jul 21, 2026

Copy link
Copy Markdown

@fabriziocucci has imported this pull request. If you are a Meta employee, you can view this in D113008257.

@meta-codesync meta-codesync Bot closed this in eb4d389 Jul 21, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 21, 2026
@meta-codesync

meta-codesync Bot commented Jul 21, 2026

Copy link
Copy Markdown

@fabriziocucci merged this pull request in eb4d389.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant