Commit Graph

12 Commits

Author SHA1 Message Date
Sam Zhou 0530ea3349 Migrate to suppression with error code in xplat: 1/n (#53439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53439

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D80809220

fbshipit-source-id: 6f432d8302934b9fee9780ac1d6ba6c87c0b3899
2025-08-22 10:35:39 -07:00
Panos Vekris 50ca7e5730 manual annotations in preparation of natural inference rollout in react-native, tools, etc.
Summary:
The Flow team is improving the way Flow infers type for primitive literals. This diff prepares the codebase for the new behavior by adding type annotations, or annotations of the form `'abc' as const`.

Changelog: [internal]

Reviewed By: marcoww6

Differential Revision: D75188179

fbshipit-source-id: be50990f23f79cf2d8dae7576af5190218adcafe
2025-05-21 20:06:46 -07:00
Tim Yung 84de8a075e RN: Delete @oncall Annotations (#51416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51416

Deletes `oncall` annotations from the `facebook/react-native` repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D74902524

fbshipit-source-id: 32a6a5b2ff27281792d572f151e2b094d9a79029
2025-05-17 16:18:05 -07:00
Tim Yung 00108a1ac3 RN: Prefer Destructured Import for useState (#51403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403

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

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74891875

fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
2025-05-16 16:33:18 -07:00
Dawid Małecki 4d0f2b2ca7 Align ImageStyle overflow prop type and compose function type (#51285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51285

The `composeStyles` function should correctly determine the type of the input styles (`ViewStyle`, `ImageStyle`, `TextStyle`) base on the output type:

```ts
const combinedStyle8: StyleProp<ImageStyle> = StyleSheet.compose(
  // ts-expect-error
  composeTextStyle,
  composeTextStyle,
);
```

This diff adds generic type checking for `compose` function and fixes `ImageStyle` overflow prop type which accepted `scroll` property (which wasn't previously accepted in manual types) and which enables type system to distinguish `ImageStyle` from `ViewStyle` and `TextStyle`:

previous:
```ts
overflow?: 'visible' | 'hidden' | 'scroll'
```

current:
```t
overflow?: 'visible' | 'hidden'
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D74574293

fbshipit-source-id: 751a44f2d3cd43055d93031343995f16ef87b185
2025-05-14 07:44:05 -07:00
Jorge Cabiedes Acosta d2c48f3b1a Remove experimental_ and cleanup mixBlendMode experiment (#46650)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46650

tsia

Changelog: [General] [Added] - Removed `experimental` prefix and fully released `mixBlendMode` prop

Reviewed By: joevilches

Differential Revision: D63407473

fbshipit-source-id: 892ababcfe19b82d3f4c73d3cbc13fb46b7425b6
2024-09-29 22:59:28 -07:00
Jorge Cabiedes Acosta 6b369a40d9 Remove experimental_ prefix from filter (#46406)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46406

As title

Second attempt at landing the new name. There were 2 issues previously which led us to revert.

1. **Error on workrooms tests.** This ended up not being caused by us but rather by D61896776. After renaming the error changed which might've caused the renaming to be blamed for the issue. It has since been resolved

2. **FB crash** FB was crashing when using drop-shadow after renaming. For some reason after renaming `filter` an invalid stylex property was making FB crash. We don't know why renaming uncovered the issue but the the code was using unsupported features on RN (`calc` & `stylex`) which then led to passing a raw unsupported value for `filter` and crashing on the `processFilter` function.

FB was fixed here D62407454 to prevent crashing after landing this diff

Changelog: [General] [Changed] - Add official `filter` CSSProperty.

Reviewed By: NickGerleman

Differential Revision: D62401985

fbshipit-source-id: 14422603c40b7ddf8300029165a85655354075c3
2024-09-12 11:46:43 -07:00
Jorge Cabiedes Acosta acbde249b7 Revert D61726506 (#46266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46266

This diff reverts D61726506
T200279372

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D61986793

fbshipit-source-id: bbf462b79192b67801a6cf56727f8f43ade8fd56
2024-08-29 20:34:19 -07:00
Jorge Cabiedes Acosta 6fa54f9b5d Remove experimental_ prefix from boxShadow and filter (#46245)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46245

As title

Changelog: [General] [Changed] - Add official `boxShadow` and `filter` CSS properties

Reviewed By: cipolleschi

Differential Revision: D61726506

fbshipit-source-id: 8ee7a95d95a66f1f890a5ebb6791da73219b2c52
2024-08-28 23:03:41 -07:00
Jorge Cabiedes Acosta 0f3ed90455 Add mix-blend-mode examples to rn-tester (#46006)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46006

Adding some extra examples for mix-blend-mode

And added E2E tests for each mix-blend-mode example

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D60605636

fbshipit-source-id: 553f3a2c3b971c918530bdee5a73108c22bd936e
2024-08-19 11:07:46 -07:00
Blake Friedman 188a09ef69 fix linting noise (#45465)
Summary:
## Summary:
Fix linting warnings

Changelog: [Internal]

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

Test Plan:
```
$ eslint .
Done in 46.11s.
$ arc f
ok No lint issues.
```

Reviewed By: cipolleschi

Differential Revision: D59805820

Pulled By: blakef

fbshipit-source-id: f33d99a6a06607c3c3762881cc7c182804b981e1
2024-07-17 10:07:00 -07:00
Jorge Cabiedes Acosta 261f82e897 RN tester example for mix-blend-mode (#45052)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45052

tsia

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D58760458

fbshipit-source-id: 1aadfb000d94b827ed779170254438ed4c469a52
2024-07-03 20:55:27 -07:00