Commit Graph
8 Commits
Author SHA1 Message Date
Sam ZhouandFacebook GitHub Bot 23c8787fe2 Add annotations to fix future errors after fix for unsound array types (#52691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52691

Unannotated array literals are unsound in Flow right now. This diff adds in annotations and makes a few things readonly, to reduce future errors.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D78519638

fbshipit-source-id: d98a7668ecf97bcc87dcb3fad25ade736d885d9a
2025-07-17 17:30:43 -07:00
Tim YungandFacebook GitHub Bot 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
Tim YungandFacebook GitHub Bot 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
Sam ZhouandFacebook GitHub Bot 4c1dd906b0 Replace React$Node with React.Node
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D67529040

fbshipit-source-id: 09221c6f866628bbf9174293124e650b7fffa967
2024-12-20 13:00:12 -08:00
Mateo GuzmánandFacebook GitHub Bot 998ab262ea fix(rn-tester): pixel ratio example inputs not fully visible in dark mode (#47526)
Summary:
Found this small dark mode issue when navigating into the `PixelRatioExamples`

## Changelog:

[INTERNAL] [FIXED] - Fixing dark mode inputs for `PixelRatio` examples

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

Test Plan:
| Before  | After |
  | ---------- | ---------- |
  | ![Screenshot_1731090926](https://github.com/user-attachments/assets/9e20c44e-0152-4760-a436-3272b452a6a2) | ![Screenshot_1731090971](https://github.com/user-attachments/assets/17d038a8-b383-4c96-a30d-c7d213cc6f97) |

Reviewed By: lunaleaps

Differential Revision: D65735837

Pulled By: Abbondanzo

fbshipit-source-id: 5b0dc6d0ae45778723a92581cef00ce7ec4c56f1
2024-11-11 10:58:56 -08:00
Tim YungandFacebook GitHub Bot c9ea05552f RN: Fix lint/sort-imports Errors (#47109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47109

Fixes the `lint/sort-imports` errors that are now surfaced after fixing the lint configuration.

For a couple files, I added lint suppressions instead because the unsorted import ordering is important due to interleaved calls with side effects.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D64569485

fbshipit-source-id: 26415d792e2b9efe08c05d1436f723faae549882
2024-10-18 04:07:02 -07:00
Peter AbbondanzoandFacebook GitHub Bot 09682b5109 Fix dark mode text (#46898)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46898

Replaces *many* `Text` component usages with `RNTesterText`: a thin wrapper around `Text` that applies color based on the color scheme chosen by the user. It makes text legible for dark mode across 41 different example files. This changes intentionally do not touch a few larger component sites that expand beyond RNTester, like `Animated` and `NewAppScreen`

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D64053464

fbshipit-source-id: 9516fef2afe1b364eb38e85e3a2dbb5c434e44db
2024-10-10 11:02:18 -07:00
Biki-dasandFacebook GitHub Bot b1576e5b1a feat: Added PixelRatio API example (#44000)
Summary:
Added the [PixelRatio](https://reactnative.dev/docs/pixelratio) API to the RN tester app on the API list examples.

## Changelog:

[General] [Added] - Add examples for the Pixel Ratio API, with all the available methods.

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

Test Plan:
**iOS**

https://github.com/facebook/react-native/assets/72331432/dd481916-a8df-4a62-8f63-61936d886d33

**android**

https://github.com/facebook/react-native/assets/72331432/4d8d67dc-ddeb-4ca7-b61c-07522951f9ee

Reviewed By: NickGerleman

Differential Revision: D56135685

Pulled By: hoxyq

fbshipit-source-id: f2f4eb9e31159a4a2c660d1a864b649e537916af
2024-04-16 07:17:36 -07:00