Commit Graph

11 Commits

Author SHA1 Message Date
Tim Yung 1977dd6596 RN: Sort Pragmas in Headers (#51554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51554

Sorts pragma directives file headers in React Native.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75264593

fbshipit-source-id: 9e4b253dd0fc94dc2fc469d7114b93a8aae305f4
2025-05-22 21:18:53 -07:00
Sam Zhou d86412dcc6 prepare for primitive literal changes (#47943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47943

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D66461724

fbshipit-source-id: b526ed1617667b70337472f4dad4e19f152a266b
2024-11-26 00:07:32 -08:00
Elżbieta Berger aa2a0c1115 New RNtester e2e tests (#39117)
Summary:
The motivation was to create more e2e tests that test other components in the RNTester app.
The list of components that have been tested is below:

| Component|Test is added|Platform|
| :---        |    :----:   |---: |
|DrawerLayoutAndroid|NO|Android|
|ActivityIndicator|YES|iOS & Android|
|Button|YES|iOS & Android|
|FlatList|YES|iOS & Android|
|Image|NO|iOS & Android|
|JSResponderHandler|YES|iOS & Android|
|InputAccessoryView|NO|iOS|
|KeyboardAvoidingView|YES|iOS & Android|
|Modal|YES|iOS & Android|
|New App Screen|YES|iOS & Android|
|Pressable|YES|iOS & Android|
|RefreshControl|YES|iOS & Android|
|ScrollView|NO|iOS & Android|
|ScrollViewSimpleExample|YES|iOS & Android|
|SafeAreaView|NO|iOS|
|ScrollViewAnimated|NO|iOS & Android|
|ScrollViewIndicatorInsets|NO|iOS|
|SectionList|NO|iOS & Android|
|StatusBar|NO|iOS & Android|
|SwipeableCard|NO|iOS & Android|
|Switch|NO|iOS & Android|
|Text|NO|iOS & Android|
|TextInput|NO|iOS & Android|
|Touchable* and onPress|NO|iOS & Android|
|TextInputs with key prop|NO|Android|
|TransparentHitTestExample|NO|iOS|
|View|NO|iOS & Android|
|New Architecture Examples|NO|iOS & Android|
|Performance Comparison Examples|NO|iOS & Android|

## Changelog:

[General] [Added] - Added next component tests for RNTester

Pull Request resolved: https://github.com/facebook/react-native/pull/39117

Test Plan:
Follow Readme file.

## Test Result:

For iOS platform:<br>
![Screenshot 2023-08-22 at 18 08 28](https://github.com/facebook/react-native/assets/19895261/c9d0ef78-ae31-487f-aa53-4c299fefef6a)

For Android platform:<br>
![Screenshot 2023-08-22 at 18 13 47](https://github.com/facebook/react-native/assets/19895261/db661c95-1cf9-4e1a-b02f-4a6141313719)

Reviewed By: yungsters

Differential Revision: D48828525

Pulled By: cipolleschi

fbshipit-source-id: dfe7cc9871666a6b5c0704a207ca1eeb65f50114
2023-09-01 03:24:30 -07:00
Eric Rozell 042179a742 Replace 'React' with 'react' in rntester examples (#37185)
Summary:
React Native macOS:
Please note, I do not plan to

Pull Request resolved: https://github.com/facebook/react-native/pull/37185

Updates a few imports in RNTester to 'react' as we had previously done in:
https://github.com/facebook/react-native/commit/0ee5f689

Changelog: [Internal]

Reviewed By: jacdebug

Differential Revision: D45445211

fbshipit-source-id: 7d345a874bd8b99ddb11ebb5385c2a07330a6531
2023-05-02 08:21:34 -07:00
Mike Vitousek 8c2a4d0d26 Annotate React hooks in xplat, defaulting to any
Summary:
Add explicit annotations to React hook callbacks as required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predictable.

This diff adds `any` or `$FlowFixMe` in cases where more precise types could not be determined.

Details:
- Codemod script: `.facebook/flowd codemod annotate-react-hooks ../../xplat/js --default-any --write`
- Local Type Inference announcement: [post](https://fb.workplace.com/groups/flowlang/posts/788206301785035)
- Support group: [Flow Support](https://fb.workplace.com/groups/flow)

drop-conflicts
bypass-lint

Reviewed By: SamChou19815

Differential Revision: D41231214

fbshipit-source-id: d5f5ce8d61020baa1138292c9e9f1c69dffd324c
2022-11-11 17:04:38 -08:00
Mike Vitousek 91d58cf5b5 Codemod cycle annotations for xplat/js
Summary:
Add annotations using flow codemod annotate-cycles --write

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D40896688

fbshipit-source-id: 0c32932d17542be070360db29b7797f8e6e5978b
2022-11-01 17:13:27 -07:00
Marco Fiorito c868d5b26c refactor(rn tester app): change activity indicator to hooks (#35071)
Summary:
This pull request migrates the activity indicator example to using React Hooks.

## Changelog
[General] [Changed] - RNTester: Migrate ActivityIndicator to hooks

Pull Request resolved: https://github.com/facebook/react-native/pull/35071

Test Plan: The animation works exactly as it did as when it was a class component

Reviewed By: jacdebug

Differential Revision: D40698379

Pulled By: NickGerleman

fbshipit-source-id: 08b275fcc4e3a10b5872e0031fa2ecce5360a7b9
2022-10-26 03:21:04 -07:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Micha Reiser 93377ff508 Remove "use strict" directive from ES Modules
Summary:
ES Modules implicitly enable strict mode. Adding the "use strict" directive is, therefore, not required.

This diff removes all "use strict" directives from ES modules.

Changelog:

[Internal]

Reviewed By: motiz88

Differential Revision: D26172715

fbshipit-source-id: 57957bcbb672c4c3e62b1db633cf425c1c9d6430
2021-02-02 11:12:56 -08:00
Ankit Tiwari 1270873ed6 RNTester UI Redesign (#29685)
Summary:
This Pull request adds the UI changes to the RNTester app as discussed in the MLH Fellowship.

This list is not exhaustive.

- The initial App screen is redesigned.
  - A bottom Navbar has been added.
   - Filter pills are added.
   - The list card UI is updated.

- The example page UI is updated.

- Recently Viewed Sections are added. It shows the last 5 recently viewed components/APIs.

- Bookmarking functionality is added.

- The documentation URL is added to the example page.

- RNTester doesn't lose its state on a hard refresh (even on iOS).

<img width="373" src="https://user-images.githubusercontent.com/22813027/90530113-20346180-e192-11ea-8ef6-789fa25b402b.png" />
<img width="373" src="https://user-images.githubusercontent.com/22813027/90530112-20346180-e192-11ea-9539-706b540fcc5f.png" />
<img width="373" src="https://user-images.githubusercontent.com/22813027/90530100-1d397100-e192-11ea-8836-b88070643233.png" />
<img width="373" src="https://user-images.githubusercontent.com/22813027/90530110-1f9bcb00-e192-11ea-936b-64ee75fa4289.png" />

Pull Request resolved: https://github.com/facebook/react-native/pull/29685

Test Plan:
Imported from GitHub, without a `Test Plan:` line.

{F302717939}

Note: this failed **before** this diff too:

{F302745716}

Reviewed By: mdvacca, cpojer

Differential Revision: D23240434

fbshipit-source-id: 65e2766a6a097eca0e0d0fda8dadf6871e9276c2

Co-authored-by: agarwalmanya <manya18ag@gmail.com>
Co-authored-by: chirag-singhal <csinghal208@gmail.com>
Co-authored-by: Ansh Godha <ag759@cornell.edu>
Co-authored-by: Yash Kumar Verma <yk.verma2000@gmail.com>
Co-authored-by: Sanskar Jethi <sansyrox@gmail.com>
Co-authored-by: Aniketh Saha <anik220798@gmail.com>
Co-authored-by: Xtremilicious <nilarjundas@outlook.com>
Co-authored-by: Jani Evakallio <jani.evakallio@gmail.com>
2020-08-26 08:45:57 -07:00
stealthanthrax 63992c0b96 Migrating RNTester to Packages Directory (#29567)
Summary:
## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
This PR aims to migrate the RNTester App to `packages` directory. But is currently, open to inspect the CI issues and resolve the merge conflicts.

Currently done
 - Working on iOS
 - Working on Android
 - Detox Tests working on iOS

Need to work on
 - Errors generated by the CI builds

[General] [Changed] - Migrated the RNTester App to the packages directory.

Pull Request resolved: https://github.com/facebook/react-native/pull/29567

Test Plan: It runs on both ios and android for now and the detox iOS builds are working.

Reviewed By: cpojer

Differential Revision: D23034761

Pulled By: rickhanlonii

fbshipit-source-id: e04bb06e1c7ef15d340206090d1575a871b9e6f5
2020-08-19 17:57:08 -07:00