Skip to content

Conversation

@kacperzolkiewski
Copy link
Collaborator

@kacperzolkiewski kacperzolkiewski commented Oct 17, 2025

Summary

Fixes: #2796
Fixes: #2083

Previously, in the new architecture, shadow nodes for elements such as Circle, Rect and other SVG components were initialized with zero dimensions.
This caused issues with press interactions during move action. Yoga was unable to locate the corresponding shadow node resulting in the press event being canceled.
This PR updates the implementation to propagate each element’s actual native layout metrics to its shadow node.
By ensuring the shadow nodes reflect accurate geometry, Yoga can now correctly resolve touch targets fixing the issue where press actions were being incorrectly canceled.

Test Plan

Compatibility

OS Implemented
iOS
MacOS
Android
Web

Checklist

  • I have tested this on a device and a simulator
  • I added documentation in README.md
  • I updated the typed files (typescript)
  • I added a test for the API in the __tests__ folder

@kacperzolkiewski kacperzolkiewski marked this pull request as ready for review October 21, 2025 10:08
@kacperzolkiewski kacperzolkiewski changed the title Propagate elements metrics to their shadow nodes Fix: propagate elements metrics to their shadow nodes Oct 21, 2025
kacperzolkiewski and others added 6 commits November 12, 2025 12:30
Co-authored-by: Jakub Grzywacz <jaqbgrzy@gmail.com>
…iptor.h

Co-authored-by: Jakub Grzywacz <jaqbgrzy@gmail.com>
Co-authored-by: Jakub Grzywacz <jaqbgrzy@gmail.com>
…owNode.cpp

Co-authored-by: Jakub Grzywacz <jaqbgrzy@gmail.com>
…iptor.h

Co-authored-by: Jakub Grzywacz <jaqbgrzy@gmail.com>
@kacperzolkiewski kacperzolkiewski merged commit 27eb9b0 into software-mansion:main Nov 12, 2025
9 checks passed
jakex7 added a commit that referenced this pull request Nov 25, 2025
jakex7 added a commit that referenced this pull request Nov 25, 2025
#2832)

This reverts commit 27eb9b0.

# Summary

Revert #2802 as it causes huge performance issues (#2831).

I'll create follow-up PRs re-introducing similar functionality.

## Test Plan

Use `PolygonBunny.tsx` example and see if JS thread dies.
jakex7 added a commit that referenced this pull request Nov 26, 2025
# Summary

It does the same thing as #2802 without affecting the performance. 

## Test Plan

I've added a few more examples that works the same as on web.
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.

Path onPress prop not triggered since upgrading to expo 54 Can't use width or height of 100% with View inside ForeignObject

2 participants