Skip to content

chore: Route CSS transitions in common with a single platform apply hook#9697

Closed
MatiPl01 wants to merge 1 commit into
@matipl01/css-platform-parsing-commonfrom
@matipl01/css-platform-single-apply-hook
Closed

chore: Route CSS transitions in common with a single platform apply hook#9697
MatiPl01 wants to merge 1 commit into
@matipl01/css-platform-parsing-commonfrom
@matipl01/css-platform-single-apply-hook

Conversation

@MatiPl01

Copy link
Copy Markdown
Member

Stacked on #9696 (review/merge that first). Base will retarget to main once #9696 lands.

Summary

Unifies the CSS-transition platform-routing boundary. Previously the platform exposed four hooks (canRoute, two value-blind apply paths, remove) and owned both the endpoint parsing and the reverse-shortening state. This moves all of that into the common CSSPlatformTransitionProxy:

  • the proxy calls canRouteCSSProperty and parsePlatformValue directly (no hooks),
  • it reverse-shortens interruptions and owns the per-view in-flight transition state,
  • the platform is left with a single parsing-free hook, cssApplyTransition (animate a resolved value over a window), plus cssRemoveTransition.

So the holder's four css hooks collapse to two, and the iOS layer (REACSSPlatformTransitions) only drives Core Animation now.

Purpose

Localizes parsing, routing, and reverse-shortening in shared code, leaving the platform with pure native-animation orchestration. This is the foundation the transform-on-Core-Animation work will plug into (a transform-aware sibling of the same apply hook).

Test plan

  • CSSPlatformTransitionProxy.cpp compiles on Android (real NDK flags, -Werror -Wpedantic) and iOS (host clang, iOS headers).
  • The routing and reverse-shortening logic is a verbatim port of the previous Apple implementation (same reversal detection, reverseShorten, and resolved duration/start handed to Core Animation), so behavior is unchanged.
  • Android holder construction is unaffected (the css fields stay trailing and value-init to null); iOS holder construction updated to the two-hook set.
  • clang-format clean (pinned 19.1.7).

…y hook

The platform layer previously exposed four hooks (canRoute, two value-blind
apply paths, remove) and owned both parsing and the reverse-shortening state.
Move all of that into CSSPlatformTransitionProxy: it now calls canRouteCSSProperty
and parsePlatformValue directly, reverse-shortens interruptions, and owns the
per-view in-flight transition state. The platform is left with a single
parsing-free apply hook (animate a resolved value over a window) plus remove, so
it only drives Core Animation.

Collapses the holder's four css hooks to two (cssApplyTransition,
cssRemoveTransition). Behavior is unchanged; the routing and reverse-shortening
logic moved across the boundary verbatim.
@MatiPl01 MatiPl01 self-assigned this Jun 18, 2026
@MatiPl01 MatiPl01 closed this Jun 18, 2026
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.

1 participant