Commit Graph

11 Commits

Author SHA1 Message Date
George Zahariev 608029aed2 Convert unannotated variable declaration with cast init to annotated variable declaration in xplat/js (#42880)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42880

Convert `const x = (a: T)` into `const x: T = a`. These are equivalent in Flow, and helps reduce the amount of colon-casts.

```
js1 flow-runner codemod flow/castToAnnotatedVariable --target colon xplat/js
```

Changelog: [Internal]

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D53392999

fbshipit-source-id: 3b4602618d6990e8642b423edaeb4e89b01a199a
2024-02-05 23:07:17 -08:00
Moti Zilberman d6e0bc714a Enable lint/sort-imports everywhere (#41334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41334

TSIA.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51025812

fbshipit-source-id: e10d437be775a6b80946483aa96460f34927f870
2023-11-06 12:59:38 -08: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
Luna Wei fa3243ad33 Rename things in RNTester
Summary:
Changelog:
[Internal] - Rename some types and components in RNTester to support work for tertiary levels of navigation.

module = component | api
moduleExample = an example of a certain feature a module

Reviewed By: kacieb

Differential Revision: D29381875

fbshipit-source-id: c348bcbb73aaf95e85928bb14080a097e685cc78
2021-07-01 14:35:30 -07:00
Luna Wei b22a6d6e9d Remove Picker from Modal example
Summary: Changelog: [Internal] - Remove picker from Modal example in RNTester in prep for deprecating Picker from RN

Reviewed By: kacieb

Differential Revision: D29082452

fbshipit-source-id: 01ee5ae2d0978721f7229d824f23cfbccfaf2813
2021-06-14 21:54:16 -07:00
Nadiia D 23ae702d97 Add e2e test for a Modal component
Summary:
Changelog:
[General][Added] - [RNTester] Added a modal component example with onShow/onDismiss callbacks

Reviewed By: lunaleaps

Differential Revision: D27926745

fbshipit-source-id: c2f2b8a15154a090bb747bb02cdf428e90861824
2021-04-23 10:12:59 -07:00
Nadiia D a782b6f5a1 Remove unsafe lifecycles usage
Summary:
Changelog:
[General][Changed] - [Modal] removed UNSAFE_componentWillReceiveProps lifecycle usage

Reviewed By: lunaleaps

Differential Revision: D27523213

fbshipit-source-id: 288b91bc6c479c62313ba17047069893cd19588c
2021-04-02 13:07:35 -07:00
Su Min Kim 8dddaa85f0 Add modal example (#30406)
Summary:
Add examples for Modal component in RNTester for:
- onDismiss (iOS)
  - Note: there may be an issue with onDismiss (https://github.com/facebook/react-native/issues/29455 )
- onShow
- hardwareAccelerated (Android)
- statusBarTranslucent (Android)

## 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
-->

[General] [Add] - Added examples for Modal component in RNTester

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

Test Plan: ![Example GIF](http://g.recordit.co/mu3KFo3FMt.gif)

Reviewed By: PeteTheHeat

Differential Revision: D25399097

Pulled By: rickhanlonii

fbshipit-source-id: e688d35b0fc04cecf01d3fbc3253abae40c62b67
2020-12-09 22:53:46 -08:00
Peter Argany b05d90e8bb Remove type union in Picker.js
Summary:
Flow type unions don't play well with Fabric components. This diff removes a union in `Picker.js` and fixes all the flow errors.

Before this diff, all these surfaces would crash with the new Fabric Picker impl, because the impl asserts that this field is a string.

Reviewed By: sammy-SC

Differential Revision: D24236317

fbshipit-source-id: 6e646c84fcd16658aaabe5e93507f5f33b346a65
2020-10-13 11:19:29 -07: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