Skip to content

feat: Add support for compound registry keys in css#8969

Merged
MatiPl01 merged 12 commits into
mainfrom
@wisniewskij/compound-registry-keys
Feb 26, 2026
Merged

feat: Add support for compound registry keys in css#8969
MatiPl01 merged 12 commits into
mainfrom
@wisniewskij/compound-registry-keys

Conversation

@wisniewskij

@wisniewskij wisniewskij commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Currently props builders in CSS are selected based on componentName of the element, which is problematic since there are cases where two different props builders can be needed for two elements with identical reactViewName but different jsComponentName (e.g. RSVGPath (reactViewName) is used by different JS components, such as Polyline and Polygon (jsComponentName)). This PR fixes that by adding support for creation of compound keys (reactViewName + delimiter + jsComponentName). This works as a "specialization" mechanism for the registry keys -- if the jsComponentName isn't provided or there is no props builder for reactViewName + delimiter + jsComponentName key, then the behavior defaults to the old one (reactViewName used as a key).

This PR also makes necessary changes in the animation keyframes registry (both JS and C++) as the same keyframes object can give different results after normalization (getNormalizedKeyframesConfig call) for different reactViewName and jsComponentName - using just reactViewName is not enough as different variations of reactViewName + delimiter + jsComponentName may use different prop builders that give different results.

Test plan

Some new tests were added and existing ones were updated.

@wisniewskij

Copy link
Copy Markdown
Contributor Author

I believe more tests should be added but I don't really know where to put them. Suggestions are welcome :>

@wisniewskij
wisniewskij requested a review from MatiPl01 February 23, 2026 16:05
@wisniewskij
wisniewskij marked this pull request as ready for review February 23, 2026 16:06
@wisniewskij wisniewskij self-assigned this Feb 23, 2026

@tjzel tjzel 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.

Looks good overall but I'm a bit worried about redundancy and transparency:

  • I don't really find reactViewName and jsComponentName distinct enough, can we make their names more explicit?
  • We seem to pass both reactViewName and jsComponentName quite often, recreating the compound name from them in several places. Can't we always just use the compound name?

Comment thread packages/react-native-reanimated/src/common/style/registry.ts Outdated
Comment thread packages/react-native-reanimated/src/common/style/registry.ts
Comment thread packages/react-native-reanimated/src/css/native/managers/CSSManager.ts Outdated
Comment thread packages/react-native-reanimated/src/css/native/keyframes/CSSKeyframesRuleImpl.ts Outdated
Comment thread packages/react-native-reanimated/src/ReanimatedModule/NativeReanimated.ts Outdated
Comment thread packages/react-native-reanimated/Common/cpp/reanimated/CSS/configs/common.cpp Outdated
@wisniewskij
wisniewskij requested a review from tjzel February 26, 2026 08:45
Comment thread packages/react-native-reanimated/src/createAnimatedComponent/getViewInfo.ts Outdated
@MatiPl01
MatiPl01 added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit e105677 Feb 26, 2026
22 checks passed
@MatiPl01
MatiPl01 deleted the @wisniewskij/compound-registry-keys branch February 26, 2026 15:49
github-merge-queue Bot pushed a commit that referenced this pull request Feb 27, 2026
## Summary
PR adds SVG Polyline CSS Property which enables animation of SVG
Polyline.

## Test plan

You can play with prepared examples:
Run fabric-example -> CSS -> Animated Properties -> SVG Properties ->
Polyline

Requires
[#8969](#8969)

---------

Co-authored-by: Mateusz Łopaciński <lop.mateusz.2001@gmail.com>
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.

3 participants