Commit Graph

17 Commits

Author SHA1 Message Date
Tim Yung 2f77e0d7fd RN: Prefer Destructured Import for useContext (#51412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51412

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74895839

fbshipit-source-id: 9ab9fc8bdee6d1764ad86fa2165da32cb266174e
2025-05-16 16:33:18 -07:00
Nick Gerleman 675b51f562 Remove chonky header for single modules (#50672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50672

We have precious little screen real estate, esp in E2E tests where we get 320x192 dips. Let's clean this up.

Changelog: [Internal]

Reviewed By: cortinico, GijsWeterings

Differential Revision: D72683491

fbshipit-source-id: 222a77f937dfb9dcceb627d8f084c58df7c07b56
2025-04-11 17:13:19 -07:00
Peter Abbondanzo 6e120b3b46 Add e2e test for Image resize method (#46982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46982

E2E test setup for each of the `resizeMethod` methods for Image on Android

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D64136839

fbshipit-source-id: 876939a50243836030401c6456410f119abe01b5
2024-10-14 08:54:28 -07:00
Shawn Dempsey 17d0345fdf Migrate FlatList/SectionList E2E testss from Catalyst to RNTester (#46274)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46274

changelog: [General][Add] - Add E2E test cases for Flat/SectionList to RNTester

Reviewed By: philIip

Differential Revision: D62002065

fbshipit-source-id: 038907cd7afd33505b7599e390cb9f366b7b32f6
2024-09-06 15:13:33 -07:00
Kacper Rozniata 371af3f1c2 fix: dark mode in SnapshotExample in RNTester (#41222)
Summary:
This PR fixes issue in `RNTester` causing labels and image background to not be visible in dark mode in `SnapshotExample`

It also fixes issue with description in `Header` not being visible in other components examples when using dark mode

Before & After
<img width="505" alt="image" src="https://github.com/facebook/react-native/assets/56474758/ce87df69-4b79-48a0-b9be-4a7335329b78">

## Changelog:

[INTERNAL] [FIXED] - Fix dark mode in SnapshotExample in RNTester

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

Test Plan:
1. Launch `RNTester` with dark mode enabled
2. Open `Snapshot / Screenshot` example
3. All labels should be visible, image background should have white color

Reviewed By: cortinico

Differential Revision: D52685754

Pulled By: NickGerleman

fbshipit-source-id: 72f79be45d9c65e307553832592563461a64ff1d
2024-01-11 11:42:19 -08:00
Kevin Gozali a47d7c54e8 Improved RNTester deeplink support to go straight to a specific example (#41981)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41981

Improved RNTester URL deeplink support to cover:
*  `rntester://example/<moduleKey>`
*  `rntester://example/<moduleKey>/<exampleKey>`

Extra details:
* For example modules that do not specify `showIndividualExamples: true`, allow deeplink URL with the specific exampleKey to only render the specific example, instead of all of them.
* Added flexibility for moduleKey: search for optional suffixes ("Index", "Example").
* Adjusted Back button action to properly go back to the root after a deeplink.
* Added `example-container` generic testID on the example wrapper component.

Changelog: [Internal]

Reviewed By: yungsters, NickGerleman

Differential Revision: D52227013

fbshipit-source-id: 4ba050592f39d6895f5124fa25c77f2d0199aa3f
2023-12-20 18:33:13 -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
Nick Gerleman a999f0d2f3 Cleanup RNTesterExampleFilter/RNTesterPage/RNTesterBlock Spacers
Summary:
Right now RNTestePage either adds a large spacer to the end of content, unless `noSpacer` is added. But with `noSpacer`, scrolling content may not be reachable because we are putting padding on the wrong container.

This fixes that and removes a few cases where we had multi hundred px empty space in favor of uniformly taking up the parent, and a 10px padding. This also moves the constant margin at the top of RNTesterBlock to the container, so that in the E2E container we can save the 30px.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D44197303

fbshipit-source-id: 8dc67f3588bc28316e2fee8d25a0bc59995f1728
2023-03-20 11:14:16 -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
Evan Yeung 037e346197 Add LTI annotations to xplat/js
Summary:
This diff runs the codemod to add type annotations to function parameters in preparation for Flow's local type inference (LTI) project. I ran the codemod over xplat/js and reverted any files that had flow errors in them. See the list of commands run to see the regeneration of various files.

Changelog:
[Internal][Changed] - Added type annotations

Reviewed By: yungsters

Differential Revision: D32075270

fbshipit-source-id: 6a9cd85aab120b4d9e690bac142a415525dbf298
2021-11-10 15:40:15 -08:00
Luna Wei ebe5417c7a Fix up dark mode for main lists
Summary: Changelog: [Internal] Fix up basic styling of dark mode for examples. Individual examples still may be broken and will be fixed up individually

Reviewed By: yungsters

Differential Revision: D31710790

fbshipit-source-id: 6ca4fb8a6238f38ff484ec91518057b243ba1d7b
2021-10-22 16:07:41 -07:00
Luna Wei 04b1ef5155 Add flow, flowfixmes to RNTesterModuleContainer and Animation examples
Summary: Changelog: [Internal] - RNTester: Add flow to RNTesterModuleContainer, render example as component, remove flowfixmes from Animation examples

Reviewed By: yungsters

Differential Revision: D29783772

fbshipit-source-id: 64ec6f247822b25c8cc6f64b192d17081be9c1f9
2021-07-22 17:24:02 -07:00
Luna Wei 08ba8663f8 Show test/expect information about an example or description
Summary: Changelog: [Internal] - Allow for examples to define test steps and expectation

Reviewed By: charlesbdudley

Differential Revision: D29674189

fbshipit-source-id: ac62a634d0139d179408104479f88009237503e3
2021-07-15 23:26:28 -07:00
Luna Wei e48e63709c Use example or module description
Summary: Changelog: [Internal] RNTester to only show the module description. Example descriptions to follow

Reviewed By: yungsters

Differential Revision: D29571326

fbshipit-source-id: 973e0031fedee805e75c010fbf59833205801640
2021-07-15 23:26:28 -07:00
Luna Wei 28e8c6a716 Styling updates and typo fixes
Summary:
Changelog: [Internal] Fix things in RNTester
* Make SectionList-contentInset example iOS only and update styling
* Fix a typo in SectionList-onEndReached example
* Fix module example styling and pressed state styling for Android

Reviewed By: kacieb

Differential Revision: D29571327

fbshipit-source-id: 5cbb68781536e21ca73ca22b01343379306babd4
2021-07-07 13:58:28 -07:00
Luna Wei c06d8d01ca Support 3 levels of navigation
Summary: Changelog: [Internal] RNTester to support 3 levels of navigation

Reviewed By: kacieb

Differential Revision: D29481463

fbshipit-source-id: e48281cce7fccd7096446c5f0f5583f2588b5028
2021-07-01 14:35:30 -07: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