Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: correct measure with native header #2028

Merged
merged 13 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions FabricTestExample/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import Test1864 from './src/Test1864';
import TestScreenAnimation from './src/TestScreenAnimation';
import Test1981 from './src/Test1981';
import Test2008 from './src/Test2008';
import Test2028 from './src/Test2028';

enableFreeze(true);

Expand Down
99 changes: 99 additions & 0 deletions FabricTestExample/Gemfile.lock
tboba marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
activesupport (7.0.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
json (2.7.1)
minitest (5.22.1)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)

PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.5, < 7.1.0)
cocoapods (~> 1.15.2)

RUBY VERSION
ruby 3.2.1p31

BUNDLED WITH
2.4.6
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) {
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override fun getPackages(): List<ReactPackage> {
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return PackageList(this).packages
}
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}
tboba marked this conversation as resolved.
Show resolved Hide resolved

override fun getJSMainModuleName(): String = "index"

Expand Down
9 changes: 9 additions & 0 deletions FabricTestExample/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ rootProject.name = 'FabricTestExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

includeBuild('../node_modules/react-native') {
dependencySubstitution {
substitute(module("com.facebook.react:react-android")).using(project(":packages:react-native:ReactAndroid"))
substitute(module("com.facebook.react:react-native")).using(project(":packages:react-native:ReactAndroid"))
substitute(module("com.facebook.react:hermes-android")).using(project(":packages:react-native:ReactAndroid:hermes-engine"))
substitute(module("com.facebook.react:hermes-engine")).using(project(":packages:react-native:ReactAndroid:hermes-engine"))
}
}
8 changes: 4 additions & 4 deletions FabricTestExample/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
boost: 26fad476bfa736552bbfa698a06cc530475c1505
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 84f6edbe225f38aebd9deaf1540a4160b1f087d7
Expand Down Expand Up @@ -1569,10 +1569,10 @@ SPEC CHECKSUMS:
ReactCommon: 840a955d37b7f3358554d819446bffcf624b2522
RNGestureHandler: 38016feaff9bd5d8282c78ddce37a89b3a1d595b
RNReanimated: c70748905d6263c7591f7e20356635ce13c9e522
RNScreens: 42f2b81fffc251443d43275f495073ab965ba0d9
RNScreens: a4dd6b8eceba6d32312f3260f411a4a74452e632
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70
Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312

PODFILE CHECKSUM: f0682954c3112ba9068a9640979866030d94959c

COCOAPODS: 1.11.3
COCOAPODS: 1.15.2
8 changes: 4 additions & 4 deletions FabricTestExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "^0.73.18",
"@react-native/eslint-config": "^0.73.1",
"@react-native/metro-config": "^0.73.2",
"@react-native/typescript-config": "^0.73.1",
"@react-native/babel-preset": "0.73.21",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.5",
"@react-native/typescript-config": "0.73.1",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
Expand Down
7 changes: 0 additions & 7 deletions FabricTestExample/react-native.config.js

This file was deleted.

60 changes: 60 additions & 0 deletions FabricTestExample/src/Test2028.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
WoLewicki marked this conversation as resolved.
Show resolved Hide resolved
WoLewicki marked this conversation as resolved.
Show resolved Hide resolved

import React from 'react';
import { Button, SafeAreaView, View } from 'react-native';

import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NavigationContainer } from '@react-navigation/native';

const Stack = createNativeStackNavigator();

const TestScreen = ({ navigation }): React.JSX.Element => {
return (
<SafeAreaView>
<Button
title={
'Click me and drag around a bit and I should log something still'
}
onPress={() => {
console.log(Date.now());
}}
/>
<Button
title={'Navigate to modal'}
onPress={() => {
navigation.navigate('Test2');
}}
/>
</SafeAreaView>
);
};
function App(): React.JSX.Element {
return (
<>
<View style={{ width: 100, height: 200, backgroundColor: 'red' }} />
<NavigationContainer>
<Stack.Navigator
initialRouteName="Test"
screenOptions={{ presentation: 'modal' }}>
<Stack.Screen
name="Test"
component={TestScreen}
options={{ headerShown: true }}
/>
<Stack.Screen
name="Test2"
component={TestScreen}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
</>
);
}

export default App;
Loading
Loading