Skip to content

feat(CSS): route shadowColor transitions to the Android platform path - #10547

Merged
MatiPl01 merged 4 commits into
mainfrom
@matipl01/android-css-platform-shadow-color
Sep 16, 2026
Merged

MatiPl01 merged 4 commits into
mainfrom
@matipl01/android-css-platform-shadow-color

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Note

This pull request was authored by AI on behalf of @MatiPl01.

Summary

Add shadowColor to the properties the Android platform animation path drives. React Native applies it as a plain view property (setOutlineAmbientShadowColor and setOutlineSpotShadowColor, Android 9+), so it goes through the same ColorBlendWriter as backgroundColor; both shadow channels are written because RN's setter writes both. Below API 28 the writer declines and the property stays on the C++ loop.

The path is chosen at build time. ANDROID_CSS_PLATFORM_TRANSITIONS is a static feature flag compiled into the native code (off by default, on in fabric-example); with it on, a shadowColor transition runs on the platform path as long as the view has no onCSSTransition* callbacks, which keep every property on the loop. Nothing switches at runtime and no re-render is involved.

Recording

All three boxes together, then each one alone:

shadow_demo_v3_small.mp4

Solo modes

Only the selected row animates, the others stay red:

shadow_demo_v3_modes

Changelog

Entry added under New features in packages/react-native-reanimated/CHANGELOG.md.

@MatiPl01 MatiPl01 self-assigned this Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 075e9f3f-43bb-46cb-9c69-f15549dd18d3

📥 Commits

Reviewing files that changed from the base of the PR and between fb4f236 and 52e5d32.

📒 Files selected for processing (2)
  • packages/react-native-reanimated/CHANGELOG.md
  • packages/react-native-reanimated/Common/cpp/reanimated/CSS/utils/platform.h
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react-native-reanimated/CHANGELOG.md

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

Adds shadowColor to Android platform-property routing. On Android API 28 and newer, CSSPropertyWriter creates a color blend writer that reads the ambient shadow color and writes both ambient and spot shadow colors. Older Android versions keep the property on the C++ path. The changelog records the new behavior.

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 52e5d

The Android shadowColor platform path preserves older-version fallback and matches existing cross-platform routing behavior, so the change is mergeable.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: routing shadowColor CSS transitions through the Android platform path.
Description check ✅ Passed The description directly explains the shadowColor platform-path changes, API 28 behavior, feature flag, callback condition, testing evidence, and changelog update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MatiPl01
MatiPl01 merged commit fc2ae27 into main Sep 16, 2026
26 of 27 checks passed
@MatiPl01
MatiPl01 deleted the @matipl01/android-css-platform-shadow-color branch September 16, 2026 10:28
MatiPl01 added a commit that referenced this pull request Sep 16, 2026
…d to the platform (#10549)

> [!NOTE]
> This pull request was authored by AI on behalf of @MatiPl01.

## Summary

The "Properties routed to the platform" table in the feature flags guide
was stale: it still showed `backgroundColor`, `borderColor` and
`borderRadius` as not routed on Android after #10310, and gave no idea
of which release routes what. Each cell now names the version since
which the property is routed (iOS: `opacity` 4.4.0, the rest 4.5.0;
Android: `opacity` 4.6.0,
`backgroundColor`/`borderColor`/`borderRadius`/`shadowColor` 4.7.0), and
the note below the table spells out the same per platform.

The `shadowColor` row for Android assumes #10547 lands in 4.7.0.

## Test plan

Docs-only. `remark` leaves the file unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants