Skip to content

chore: remove Paper and unsupported RN versions leftovers#4110

Open
sgaczol wants to merge 7 commits into
mainfrom
@sgaczol/paper-leftovers
Open

chore: remove Paper and unsupported RN versions leftovers#4110
sgaczol wants to merge 7 commits into
mainfrom
@sgaczol/paper-leftovers

Conversation

@sgaczol
Copy link
Copy Markdown
Collaborator

@sgaczol sgaczol commented May 29, 2026

Description

This PR removes leftovers of Paper or not supported anymore React Native versions - related code.

For android/build.gradle this means:

  • libreact_render*.so, libreactnativejni.so and libreact_performance_timeline.so were dropped from packagingOptions.excludes — these libraries were merged into libreactnative.so in RN 0.76.
  • the lifecycle-viewmodel-ktx:2.5.1 constraints block was removed — it fixed a duplicate-class conflict (androidx.lifecycle.ViewModelLazy) on older RN versions

Changes

  • SearchBar.tsx: removed the Paper-only parseUndefinedPropsToSystemDefault which made autoCapitalize 'systemDefault' if undefined
  • android/build.gradle: modified accordingly to the description above
  • #import <cxxreact/ReactNativeVersion.h> removed from several files
  • ScreenStackItem.tsx, TabsHost.ios.tsx: removed conditions related to RN < 0.82
  • TabsHost.ios.types.ts: updated a comment

Before & after - visual documentation

N/A

Test plan

Build example apps.

Checklist

  • Included code example that can be used to test this change.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

@sgaczol sgaczol marked this pull request as draft May 29, 2026 13:28
@sgaczol sgaczol marked this pull request as ready for review May 29, 2026 14:44
@sgaczol sgaczol requested a review from Copilot May 29, 2026 14:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes leftover code paths for the legacy Paper architecture and for unsupported older React Native versions (now targeting RN >= 0.82), simplifying platform/version conditionals across JS/TS, iOS native, and Android build configuration.

Changes:

  • Simplifies iOS Tabs bottom accessory rendering by removing RN-version branching and always using the dual-render approach when available.
  • Removes Paper-only SearchBar prop normalization and other RN-version-specific conditionals.
  • Cleans up native iOS includes and Android Gradle packaging/dependency workarounds that were only needed for older RN versions.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/tabs/host/TabsHost.ios.types.ts Updates docs to remove legacy/Paper and RN<0.82 behavioral notes for bottom accessory.
src/components/tabs/host/TabsHost.ios.tsx Removes RN-version branching and legacy environment-change state for bottom accessory rendering.
src/components/SearchBar.tsx Removes Paper-only prop parsing for autoCapitalize.
src/components/ScreenStackItem.tsx Drops RN minor version gating for a formSheet positioning path (now relying on feature flag only).
ios/tabs/bottom-accessory/RNSTabsBottomAccessoryHelper.mm Removes unused React Native version header include.
ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.h Removes unused React Native version header include (but leaves an empty preprocessor block).
ios/safe-area/RNSSafeAreaViewComponentView.mm Removes unused React Native version header include.
ios/RNSScreenStackHeaderSubview.mm Removes unused React Native version header include.
ios/RNSScreenStackHeaderConfig.mm Removes unused React Native version header include.
ios/RNSScreen.mm Removes unused React Native version header include.
ios/gamma/split/RNSSplitScreenShadowStateProxy.mm Removes unused React Native version header include.
ios/conversion/RNSConversions-Tabs.mm Removes unused React Native version header include.
android/build.gradle Updates packaging excludes and removes a dependency constraint that was only needed for older RN versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 7 to 9
#if defined(__cplusplus)

#import <cxxreact/ReactNativeVersion.h>

#endif // defined(__cplusplus)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed unnecessary C++ preprocessor directives.
Copy link
Copy Markdown
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

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.

3 participants