Skip to content

Register SelectableTextViewManager in all ReactPackages#55636

Closed
NickGerleman wants to merge 3 commits intofacebook:mainfrom
NickGerleman:export-D93829403
Closed

Register SelectableTextViewManager in all ReactPackages#55636
NickGerleman wants to merge 3 commits intofacebook:mainfrom
NickGerleman:export-D93829403

Conversation

@NickGerleman
Copy link
Contributor

Summary:
Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Differential Revision: D93829403

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 20, 2026
@NickGerleman NickGerleman force-pushed the export-D93829403 branch 9 times, most recently from e904ab0 to 40b5eff Compare February 26, 2026 00:14
Copy link
Contributor

@cortinico cortinico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync
Copy link

meta-codesync bot commented Feb 26, 2026

@NickGerleman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93829403.

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
Summary:
Extract ParagraphComponentDescriptor logic into a template base class BaseParagraphComponentDescriptor<ShadowNodeT> so that other paragraph-like component descriptors can reuse the same TextLayoutManager wiring. Remove `final` from ParagraphShadowNode to allow subclassing. Move TextLayoutManagerKey from extern linkage in .cpp to constexpr in the new header.

This is a pure refactor with no behavioral change.

Changelog:
[Internal]

Differential Revision: D93829402
Summary:
Add the native components needed to route selectable text through ReactTextView instead of PreparedLayoutTextView when enablePreparedTextLayout is on.

C++ side: Add SelectableParagraphShadowNode (inherits ParagraphShadowNode) and SelectableParagraphComponentDescriptor (inherits BaseParagraphComponentDescriptor). Register in CoreComponentsRegistry and componentNameByReactViewName.

Android side: Make ReactTextViewManager open so it can be subclassed. Add getReactTextUpdateFromPreparedLayout to handle ReferenceStateWrapper holding PreparedLayout. Create SelectableTextViewManager (extends ReactTextViewManager, registered as RCTSelectableText). Add FabricNameComponentMapping entry for SelectableParagraph -> RCTSelectableText.

No JS code references RCTSelectableText yet, so the new components are inert.

Changelog:
[Internal]

Differential Revision: D93829400
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Feb 26, 2026
Summary:

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
Summary:
Pull Request resolved: facebook#55636

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403
@meta-codesync meta-codesync bot closed this in da3b883 Feb 26, 2026
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 26, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 26, 2026

This pull request has been merged in da3b883.

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: facebook#55636

Register the new SelectableTextViewManager in every app's ReactPackage so it is available to the Fabric mounting layer. Since no JS code references RCTSelectableText yet, registering the ViewManager is a no-op at runtime. OptIn(UnstableReactNativeAPI::class) annotations are required because SelectableTextViewManager uses that annotation.

Changelog:
[Internal]

Reviewed By: mdvacca, cortinico

Differential Revision: D93829403

fbshipit-source-id: 36d51aa066344b5ebfb682413b05f366c6c3c603
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants