Conversation
… are drawn Since React Native 0.87 ReactTextView paints underline and strikethrough in onDraw, but only while the TextView has a Layout. setText drops it and Fabric measures the view again only when its frame changed, so every UI-thread commit that changes just the text attributes leaves the next draw without decorations. After a successful commit on Android, ask the mounted Paragraph views without a Layout to measure themselves at their current size before the frame is drawn.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughAndroid commit handling now collects committed paragraph view tags and requests their relayout through a platform callback. The JNI bridge forwards these tags to Kotlin. Kotlin resolves Priority: ⬇️ Low Change: Bug fix Merge Risk: ⚪ Minimal · up to The Android relayout callback runs on the required UI thread, with no concrete unresolved issue identified in the changed flow. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
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. Comment |
Note
This pull request was authored by AI on behalf of @MatiPl01.
Summary
On Android with React Native 0.87+, a CSS animation or transition of
textDecorationLine,textDecorationColorortextDecorationStylenever shows the decoration. Since react/react-native#56768ReactTextView.onDrawpaints underline and strikethrough itself, but only while theTextViewhas aLayout.setTextdrops it and Fabric measures the view again only when its frame changed, so every UI-thread commit that changes just the text attributes leaves the next draw without decorations (iOS is unaffected). Found by @tshmieldev.This is a React Native bug, fixed upstream in react/react-native#58579. Until that ships, after a successful commit on Android Reanimated asks the mounted
Paragraphviews that lost theirLayoutto measure themselves at their current size, which happens after the mount and before the frame is drawn. It is a no-op for views whose frame changed (Fabric already measured them) and for text updated from React commits.Test plan
CSS Animations > Animated Properties > Base Properties > Text Decoration > Text Decoration Lineon an Android emulator or device.before-after-reanimated-fix-android-textDecorationLine.mp4
Changelog
Entry added under
Unpublishedinpackages/react-native-reanimated/CHANGELOG.md.