Skip to content

Commit 0435e88

Browse files
authored
chore: Remove other mentions of legacy Example app (#3642)
## Description This PR removes some leftover mentions of legacy Example app. ## Changes Removed text instance of Example/ScreensExample. Removed NEW_ARCH_ENABLED env from podfile (it's default now, and was put for consistency with now removed Example) ## Before & after - visual documentation no visual changes ## Checklist - [ ] Ensured that CI passes
1 parent 469314f commit 0435e88

8 files changed

Lines changed: 12 additions & 22 deletions

File tree

FabricExample/e2e/examplesTests/events.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const pressBack = async () => {
1212

1313
const awaitClassicalEventBehavior = async () => {
1414
if (device.getPlatform() === 'ios') {
15-
// The order of events in this test differs from the Paper version of the same test.
15+
// The order of events in this test differs from Paper.
1616
// Please see https://github.com/software-mansion/react-native-screens/pull/2785 for details.
1717
await expect(
1818
element(by.text('9. Chats | transitionStart | closing')),

FabricExample/ios/Podfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ require_relative '../../scripts/ios/rns_set_swift_compilation_flags'
1111
platform :ios, min_ios_version_supported
1212
prepare_react_native_project!
1313

14-
# From 0.76 new arch is enabled by default, we just want to have it explicitly set and for consistency with Example app
15-
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
16-
1714
# Disable precompiled binaries for RN core
1815
ENV['RCT_USE_PREBUILT_RNCORE'] = '0'
1916

guides/CONTRIBUTING.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ We inform you that unrespectful issues will be closed.
4141
- `common` – C++ code related to components - shadow nodes and state
4242
- `cpp` – C++ code for turbo modules
4343
- `apps` – apps implementations shared by wrappers
44-
- `Example` – paper version of React Native mobile example app from apps
4544
- `FabricExample` – fabric version of React Native mobile example app from apps
4645
- `gesture-handler` – interop between react-native-screens and react-native-gesture-handler
4746
- `guides` – guides for developers
@@ -72,13 +71,11 @@ Submitting Pull Requests that resolve issues is a great way to contribute to Scr
7271
> [!tip]
7372
> For commits and pull request names we follow a [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
7473
75-
We have two types of sources: pure examples (apps/Example for source code) and examples, dedicated for tests from issues / pull requests (apps/src/tests for source code). The first work as a showcase of the library, the latter contains specific test cases that corresponds to GitHub issues. For example, `Test1864.tsx` corresponds to issue [#1864](https://github.com/software-mansion/react-native-screens/issues/1864). Our developer flow usually consists of creating new `Test*.tsx` file with code example that we try to fix or add. For new features we try to prepare showcases in Example app. The `apps/App` file is where you set the source code for the application to use by either leaving `<Example>` as is or replacing it with `<Test.Test*>`.
76-
There are two separate applications: Example and FabricExample in root which are used as wrappers for running the examples depending on the architecture needed.
74+
We have two types of sources: pure examples (apps/Example for source code) and examples, dedicated for tests from issues / pull requests (apps/src/tests for source code). The former work as a showcase of the library, the latter contain isolated props' behavior, selected interactions between props, and specific test cases that corresponds to GitHub issues. For example, `Test1864.tsx` corresponds to issue [#1864](https://github.com/software-mansion/react-native-screens/issues/1864). Our developer flow usually consists of creating new `Test*.tsx` file with code example that we try to fix or add. For new features we try to prepare dedicated showcases. The `apps/App` file is where you set the source code for the application to use by either leaving `<Example>` as is or replacing it with `<Test.Test*>`.
7775

7876
- `apps/Example` &ndash; source code with showcase app
7977
- `apps/src/tests` &ndash; source code with test examples app
8078
- `apps/App` &ndash; source code management
81-
- `Example/src` &ndash; wrapper with paper architecture for showcase and test examples app
8279
- `FabricExample/src` &ndash; wrapper with fabric architecture for showcase and test examples app
8380
- `TVOSExample/src` &ndash; source code with example app for TVOS
8481
- `src` &ndash; contains JS core code of the library
@@ -91,11 +88,11 @@ To begin with, let install all dependencies:
9188

9289
1. `yarn`
9390
2. `yarn submodules`
94-
4. `cd Example` or `cd FabricExample` (depending on architecture you want to work on)
91+
4. `cd FabricExample`
9592
5. `yarn`
9693
6. `yarn start` &ndash; make sure to start metro bundler before building the app in Android Studio
9794

98-
and open `react-native-screens/Example/android` with Android Studio.
95+
and open `react-native-screens/FabricExample/android` with Android Studio.
9996

10097
![Android Studio](android_studio.png)
10198

@@ -107,17 +104,17 @@ To begin with, let install all dependencies:
107104

108105
1. `yarn`
109106
2. `yarn submodules`
110-
3. `cd Example` or `cd FabricExample`
107+
3. `cd FabricExample`
111108
4. `yarn`
112109
5. `rbenv exec bundle install`
113110
6. `(cd ios && rbenv exec bundle exec pod install && cd ../)`
114111
7. `yarn start` &ndash; make sure to start metro bundler before building the app in XCode.
115112

116-
and open `react-native-screens/Example/ios/ScreensExample.xcworkspace` with XCode.
113+
and open `react-native-screens/FabricExample/ios/FabricExample.xcworkspace` with XCode.
117114

118115
![XCode](xcode.png)
119116

120-
To find the native source code of `react-native-screens` navigate to `Pods > Development Pods > RNScreens > ScreensExample > node_modules > react-native-screens > ios` or `Pods > Development Pods > RNScreens > .. > ScreensExample > node_modules > react-native-screens > ios`. Making sure metro builder is run, you can now build React Native app or debug native code.
117+
To find the native source code of `react-native-screens` navigate to `Pods > Development Pods > RNScreens > FabricExample > node_modules > react-native-screens > ios` or `Pods > Development Pods > RNScreens > .. > FabricExample > node_modules > react-native-screens > ios`. Making sure metro builder is run, you can now build React Native app or debug native code.
121118

122119
### Fabric
123120

guides/GUIDE_FOR_LIBRARY_AUTHORS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -854,16 +854,12 @@ In order for your native view on iOS to be notified when its parent navigation c
854854
}
855855
```
856856

857-
You can check our example app for a fully functional demo see [RNSSampleLifecycleAwareView.m](https://github.com/software-mansion/react-native-screens/blob/main/Example/ios/ScreensExample/RNSSampleLifecycleAwareView.m) for more details.
858-
859857
## Navigation lifecycle on Android
860858

861859
On Android, you can use [LifecycleObserver](https://developer.android.com/reference/android/arch/lifecycle/LifecycleObserver) interface which is a part of Android compat library to make your view handle lifecycle events.
862-
Check [LifecycleAwareView.java](https://github.com/software-mansion/react-native-screens/blob/main/Example/android/app/src/main/java/com/swmansion/rnscreens/example/LifecycleAwareView.java) from our example app for more details on that.
863860

864861
In addition to that, you will need to register for receiving these updates. This can be done using [`LifecycleHelper.register`](https://github.com/software-mansion/react-native-screens/blob/main/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.java#L50).
865862
Remember to call [`LifecycleHelper.unregister`](https://github.com/software-mansion/react-native-screens/blob/main/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.java#L59) before the view is dropped.
866-
Please refer to [SampleLifecycleAwareViewManager.java](https://github.com/software-mansion/react-native-screens/blob/main/Example/android/app/src/main/java/com/swmansion/rnscreens/example/SampleLifecycleAwareViewManager.java) from our example app to see what are the best ways of using the above methods.
867863

868864
## Android hardware back button
869865

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
preset: 'react-native',
3-
modulePathIgnorePatterns: [],
3+
modulePathIgnorePatterns: ['FabricExample'],
44
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"check-types": "tsc --noEmit",
88
"start": "react-native start",
99
"test:unit": "jest --passWithNoTests",
10-
"format-js": "prettier --write --list-different './src/**/*.{js,ts,tsx}'",
10+
"format-js": "prettier --write --list-different './{src,FabricExample}/**/*.{js,ts,tsx}'",
1111
"format-android": "node ./scripts/format-android.js",
1212
"format-ios-swift": "sh scripts/swift-format-helper.sh format",
1313
"format-ios-cpp": "find ios/ -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.cpp\" -o -iname \"*.mm\" | xargs clang-format -i",
@@ -124,7 +124,7 @@
124124
"typescript": "^5.8.3"
125125
},
126126
"lint-staged": {
127-
"src/**/*.{js,ts,tsx}": "yarn format-js",
127+
"{src,FabricExample}/**/*.{js,ts,tsx}": "yarn format-js",
128128
"FabricExample/ios/**/*.swift": "yarn format-ios-swift",
129129
"src/**/*.{js,ts,tsx}": "yarn lint-js",
130130
"common/**/*.{h,cpp}": "yarn format-common",

scripts/e2e/detox-utils.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const testButlerApkPath = isRunningCI
4848
* Example: `RNS_IOS_VERSION="iOS 18.6" RNS_APPLE_SIM_NAME="iPhone 17 Pro" yarn test-e2e-ios` will fail
4949
* as iPhone 17 Pro was released with iOS 26
5050
*
51-
* @param {string} applicationName name (FabricExample / ScreensExample)
51+
* @param {string} applicationName name (FabricExample)
5252
* @returns {Detox.DetoxConfig}
5353
*/
5454
function commonDetoxConfigFactory(applicationName) {

tsconfig.build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"extends": "./tsconfig",
3-
"exclude": ["TVOSExample"]
3+
"exclude": ["FabricExample", "TVOSExample"]
44
}

0 commit comments

Comments
 (0)