Commit Graph

7119 Commits

Author SHA1 Message Date
David Vacca 93c6d2a8e5 update documentation for enableCppRenderSystem feature flag
Summary:
This diff updates the documentation for enableCppRenderSystem feature flag

This is a follow up of D38725771 (https://github.com/facebook/react-native/commit/399907fe4ad843ac6aa0aa2f553ba3aee3c83006)

changelog: [internal] internal

Reviewed By: cortinico, makovkastar

Differential Revision: D39558834

fbshipit-source-id: e079ee688a912dfa2670c66e5adf347a902a45e1
2022-09-16 12:33:15 -07:00
Luna Wei c9966e417d Alert
Summary: Changelog: [Internal] Add flow declaration for Alert. Couldn't figure out how to do type statics on interfaces in Flow.

Reviewed By: yungsters

Differential Revision: D39186533

fbshipit-source-id: 928ee76080490a133c9773d2330473a688e0612d
2022-09-16 11:46:00 -07:00
Luna Wei 1cdeb20d54 TextInput
Summary: Changelog: [Internal] Add a flow type for TextInput

Reviewed By: yungsters

Differential Revision: D38883693

fbshipit-source-id: 798c1cfac55479420e683bd79d685a46c866c5d1
2022-09-15 17:06:17 -07:00
Rujin Cao b2ac528156 @emails -> @oncall (remaining ones)
Differential Revision: D39536169

fbshipit-source-id: 6c8d6787328eefecd23f3498b14a6d9ff750a670
2022-09-15 15:54:10 -07:00
Marshall Roch a8ece43a50 upgrade to flow 0.187.0
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D39542847

fbshipit-source-id: 2eeb8740dd0a142b7e411fbee4765a8f38685c76
2022-09-15 12:24:13 -07:00
David Vacca 399907fe4a Create Feature Flag to Enable/Disable C++ Render System in JS
Summary:
This diff creates a new Feature Flag to Enable/Disable C++ Render System in JS

Changelog: [Internal] Internal

Reviewed By: sammy-SC

Differential Revision: D38725771

fbshipit-source-id: 3a238781bec427274dbd8f7c045d360135d1803e
2022-09-15 09:48:25 -07:00
Riccardo Cipolleschi ea1ec29ba6 Revert part of D39268920
Summary:
This task has been created T131775291 that blames D39268920 (https://github.com/facebook/react-native/commit/f1c1f8116ba1cfa9d10c5b8c30b98b796047b9c2). I reverted part of the changes and added the support of capital letters for the font weight. It should make the test pass.

However, I am a bit puzzled: I tried to change the title of the `GemstoneTitleBar` and the test was not showing the changed value. I think I'm missing something.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D39478951

fbshipit-source-id: d3e28336fe52c5c58b49872c3f5b6e63e1e37ca5
2022-09-14 07:21:04 -07:00
Nick Gerleman a6bc77cd94 Remove dead code for restoring state to nested VirtualizedList
Summary:
When `getItemLayout` is not supplied, VirtualizedList doesn't know the measurements for its child items ahead of time. It caches most recent cell measurements so that an item which is virtualized away is associated with its correct height. VirtualizedList will not consume space for an item it has not yet rendered/knows measurements for.

This also means an initially created list will only take up the height of its `initialNumToRender()`. This can cause scroll jumping for the scenario of nested VirtualizedLists of the same orientation, since a virtualized away child list will shrink (compared to the spacer), then re-expand, once returned to.

There is logic in the VirtualizedList constructor to load cached frame metrics based on supplied listKey, to enable reloading most recent state. Though locally it seems to be reading the context too early in the lifecycle (compared to other successful checks during componentDidMount, render). It was moved from `componentDidMount` to `constructor` as part of the initial change (https://www.internalfb.com/diff/D6330846 (https://github.com/facebook/react-native/commit/2668dc8e1be7bf93e65ca2e11c87cbeef3310c3e)?dst_version_fbid=131968984136932&transaction_fbid=1578362385612542), and I think has likely been unreliable or dead since.

Restoring state was the only usage of a durable key for nested lists beyond their lifetime. So removing the dead code lets us remove the need for a `listKey`, which has been error-prone. This still leaves the problem present since inception, but there may be alternate solutions like scroll anchoring.

Changelog:
[Internal][Removed] - Remove dead code for restoring state to nested VirtualizedList

Reviewed By: ryancat

Differential Revision: D39466678

fbshipit-source-id: fc2f39802e5cdf9b920974333be64c74211b99a9
2022-09-14 07:05:08 -07:00
Gabriel Donadel Dall'Agnol 09d420707f feat: Add space-separated string support for fontVariant (#34641)
Summary:
This updates `fontVariant` to support space-separated string values, i.e., `'small-caps common-ligatures'`, thus aligning it with the [CSS Fonts Module Level 4](https://drafts.csswg.org/css-fonts/#font-variant-prop) specification as requested on https://github.com/facebook/react-native/issues/34425. This also adds unit tests to the `processFontVariant` function ensuring the style processing works as expected.

## Changelog

[General] [Added] - Add space-separated string support for fontVariant

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

Test Plan:
This can be tested either through `processFontVariant-tests` or by using the following code:

```js
 <Text
   style={{
     fontVariant: 'small-caps common-ligatures',
  }} />
```

Reviewed By: javache

Differential Revision: D39423317

Pulled By: cipolleschi

fbshipit-source-id: ad971addb423ed338e178528a11fe9d456c03e6e
2022-09-14 05:08:10 -07:00
Alex Smeshkov 71c0d2e369 Add accessibilityContext to CKOverlayLayoutComponent
Summary: Changelog: [Internal]

Reviewed By: Andrey-Mishanin

Differential Revision: D38906662

fbshipit-source-id: f0501f48df6a9debebd9211d388c6c89d29d149d
2022-09-13 07:08:01 -07:00
Danilo Bürger 6bdcb49966 Align android image style / source logic with ios (#34655)
Summary:
This aligns the logic of setting style (width / height) and source of Android with iOS.
iOS handles nullish uris with set width and heigth by passing them through. Android did not.

## Changelog

[Android] [Fixed] - Align android image style / source logic with ios

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

Test Plan:
```
<Image source={{width: 100, height: 100}} />
```

Before this Patch:
* iOS: Renders a blank image with 100x100
* Android: Renders a blank image with 0x0

After this Patch:
* iOS: Renders a blank image with 100x100
* Android: Renders a blank image with 100x100

Reviewed By: sammy-SC

Differential Revision: D39423391

Pulled By: cipolleschi

fbshipit-source-id: 997c06dea42e9b69fda12b678a1b82ad8319537f
2022-09-13 05:18:45 -07:00
Tianyu Yao bfb36c2163 Stop inspecting when an element is selected
Summary:
Changelog:
[General][Fixed] In RN devtools, call that method, and then set component state to not inspecting.

Reviewed By: lunaruan

Differential Revision: D38852009

fbshipit-source-id: d14bd4cc4461f0f7ec4ae9cd6098a58eef3e6ab9
2022-09-12 16:56:19 -07:00
Tianyu Yao 6163029d4a Fix selectNode in fabric
Summary:
Changelog:
[General][Fixed] - Currently selectNode doesn't work for Fabric. Passing the instance instead of a tag to `selectNode` works.

Reviewed By: lunaruan

Differential Revision: D38851141

fbshipit-source-id: 7640d0f31fb099346a4d8205981e262da6be4990
2022-09-12 16:56:19 -07:00
Samuel Susla 56c28f3740 React Native sync for revisions 4ea064e...c28f313
Summary:
This sync includes the following changes:
- **[c28f313e6](https://github.com/facebook/react/commit/c28f313e6 )**: experimental_use(promise) for SSR ([#25214](https://github.com/facebook/react/pull/25214)) //<Andrew Clark>//
- **[d6f9628a8](https://github.com/facebook/react/commit/d6f9628a8 )**: Remove some RSC subset entry points that were removed in the main entry point ([#25209](https://github.com/facebook/react/pull/25209)) //<Sebastian Markbåge>//
- **[a473d08fc](https://github.com/facebook/react/commit/a473d08fc )**: Update to Flow from 0.97 to 0.122 ([#25204](https://github.com/facebook/react/pull/25204)) //<Jan Kassens>//
- **[7028ce745](https://github.com/facebook/react/commit/7028ce745 )**: experimental_use(promise) for Server Components ([#25207](https://github.com/facebook/react/pull/25207)) //<Andrew Clark>//
- **[bfb65681e](https://github.com/facebook/react/commit/bfb65681e )**: experimental_use(context)([#25202](https://github.com/facebook/react/pull/25202)) //<mofeiZ>//
- **[f0efa1164](https://github.com/facebook/react/commit/f0efa1164 )**: [flow] remove custom suppress comment config ([#25170](https://github.com/facebook/react/pull/25170)) //<Jan Kassens>//
- **[2e7f422fe](https://github.com/facebook/react/commit/2e7f422fe )**: Refactor: its type is Container ([#25153](https://github.com/facebook/react/pull/25153)) //<bubucuo>//
- **[2c2d9a1df](https://github.com/facebook/react/commit/2c2d9a1df )**: [eslint-plugin-react-hooks] only allow capitalized component names ([#25162](https://github.com/facebook/react/pull/25162)) //<Jan Kassens>//
- **[36c908a6c](https://github.com/facebook/react/commit/36c908a6c )**: Don't use the Flight terminology in public error messages ([#25166](https://github.com/facebook/react/pull/25166)) //<Sebastian Markbåge>//
- **[8d1b057ec](https://github.com/facebook/react/commit/8d1b057ec )**: [Flight] Minor error handling fixes ([#25151](https://github.com/facebook/react/pull/25151)) //<Sebastian Markbåge>//
- **[9ff738f53](https://github.com/facebook/react/commit/9ff738f53 )**: [devtools][easy] Fix flow type ([#25147](https://github.com/facebook/react/pull/25147)) //<Tianyu Yao>//
- **[0de3ddf56](https://github.com/facebook/react/commit/0de3ddf56 )**: Remove Symbol Polyfill (again) ([#25144](https://github.com/facebook/react/pull/25144)) //<Ricky>//
- **[b36f72235](https://github.com/facebook/react/commit/b36f72235 )**: Remove ReactFiberFlags MountLayoutDev and MountPassiveDev ([#25091](https://github.com/facebook/react/pull/25091)) //<Samuel Susla>//
- **[b6978bc38](https://github.com/facebook/react/commit/b6978bc38 )**: experimental_use(promise) ([#25084](https://github.com/facebook/react/pull/25084)) //<Andrew Clark>//
- **[11ed7010c](https://github.com/facebook/react/commit/11ed7010c )**: [Transition Tracing] onMarkerIncomplete - Tracing Marker/Suspense Boundary Deletions ([#24885](https://github.com/facebook/react/pull/24885)) //<Luna Ruan>//
- **[b79894259](https://github.com/facebook/react/commit/b79894259 )**: [Flight] Add support for Webpack Async Modules ([#25138](https://github.com/facebook/react/pull/25138)) //<Sebastian Markbåge>//
- **[c8b778b7f](https://github.com/facebook/react/commit/c8b778b7f )**: Fix typo: supportsMicrotask -> supportsMicrotasks ([#25142](https://github.com/facebook/react/pull/25142)) //<kwzr>//
- **[d0f396651](https://github.com/facebook/react/commit/d0f396651 )**: Allow functions to be used as module references ([#25137](https://github.com/facebook/react/pull/25137)) //<Sebastian Markbåge>//
- **[38c5d8a03](https://github.com/facebook/react/commit/38c5d8a03 )**: Test the node-register hooks in unit tests ([#25132](https://github.com/facebook/react/pull/25132)) //<Sebastian Markbåge>//
- **[3f70e68ce](https://github.com/facebook/react/commit/3f70e68ce )**: Return closestInstance in `getInspectorDataForViewAtPoint` ([#25118](https://github.com/facebook/react/pull/25118)) //<Tianyu Yao>//
- **[3d443cad7](https://github.com/facebook/react/commit/3d443cad7 )**: Update fixtures/flight to webpack 5 ([#25115](https://github.com/facebook/react/pull/25115)) //<Tim Neutkens>//
- **[5d1ce6513](https://github.com/facebook/react/commit/5d1ce6513 )**: Align StrictMode behaviour with production ([#25049](https://github.com/facebook/react/pull/25049)) //<Samuel Susla>//
- **[9e67e7a31](https://github.com/facebook/react/commit/9e67e7a31 )**: Scaffolding for useMemoCache hook ([#25123](https://github.com/facebook/react/pull/25123)) //<Joseph Savona>//
- **[19e9a4c68](https://github.com/facebook/react/commit/19e9a4c68 )**: Add missing createServerContext for experimental shared subset ([#25114](https://github.com/facebook/react/pull/25114)) //<Jiachi Liu>//
- **[6ef466c68](https://github.com/facebook/react/commit/6ef466c68 )**: make preamble and postamble types explicit and fix typo ([#25102](https://github.com/facebook/react/pull/25102)) //<Josh Story>//
- **[796d31809](https://github.com/facebook/react/commit/796d31809 )**: Implement basic stylesheet Resources for react-dom ([#25060](https://github.com/facebook/react/pull/25060)) //<Josh Story>//
- **[32baab38f](https://github.com/facebook/react/commit/32baab38f )**: [Transition Tracing] Add Tag Field to Marker Instance ([#25085](https://github.com/facebook/react/pull/25085)) //<Luna Ruan>//
- **[8ef3a7c08](https://github.com/facebook/react/commit/8ef3a7c08 )**: Resume immediately pinged fiber without unwinding ([#25074](https://github.com/facebook/react/pull/25074)) //<Andrew Clark>//
- **[7bcc68772](https://github.com/facebook/react/commit/7bcc68772 )**: Remove argument committedLanes from reappearLayoutEffects and recursivelyTraverseReappearLayoutEffects ([#25080](https://github.com/facebook/react/pull/25080)) //<Samuel Susla>//
- **[ca990e9a7](https://github.com/facebook/react/commit/ca990e9a7 )**: Add API to force Scheduler to yield for macrotask ([#25044](https://github.com/facebook/react/pull/25044)) //<Andrew Clark>//
- **[b4204ede6](https://github.com/facebook/react/commit/b4204ede6 )**: Clean up unused Deletion flag ([#24992](https://github.com/facebook/react/pull/24992)) //<Andrew Clark>//
- **[e193be87e](https://github.com/facebook/react/commit/e193be87e )**: [Transition Tracing] Add Offscreen Test ([#25035](https://github.com/facebook/react/pull/25035)) //<Luna Ruan>//
- **[9fcaf88d5](https://github.com/facebook/react/commit/9fcaf88d5 )**: Remove rootContainerInstance from unnecessary places ([#25024](https://github.com/facebook/react/pull/25024)) //<Sebastian Markbåge>//
- **[80f3d8819](https://github.com/facebook/react/commit/80f3d8819 )**: Mount/unmount passive effects when Offscreen visibility changes ([#24977](https://github.com/facebook/react/pull/24977)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 4ea064e...c28f313

Reviewed By: rickhanlonii

Differential Revision: D39384898

fbshipit-source-id: 20b080a53851d6dd9d522c8468dd02aab9ba76db
2022-09-12 06:54:35 -07:00
Rob Hogan 09a910f80b Prepare for Jest 27+ by making legacy fake timer use explicit
Summary:
Jest 27 [flips defaults](https://jestjs.io/blog/2021/05/25/jest-27#flipping-defaults), making "modern" fake timers (ie, `sinonjs/fake-timers`) the default, over "legacy", which we currently use.

We're not quite ready for modern timers yet, partly due to Promise polyfills (https://github.com/facebook/react-native/pull/34659), and also some internal issues with specific tests.

This makes our use of legacy timers explicit in preparation for an update to Jest. A switch to modern timers may follow later.

Changelog:
[Internal][Changed] - Prepare for Jest 27+ by making legacy fake timer use explicit

Reviewed By: jacdebug

Differential Revision: D39383719

fbshipit-source-id: 6a3dc6f8547cc76f7702a5a39c9b30a184303f17
2022-09-12 04:59:18 -07:00
Daksh Bhardwaj 095f19a681 feat: added aria-modal as alias for accessibilityViewIsModal(iOS) (#34506)
Summary:
This adds the `aria-modal` prop to the components where it's used as requested on https://github.com/facebook/react-native/issues/34424, mapping web [aria-modal](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal) to equivalent [accessibilityViewIsModal](iOS)

## Changelog
[General] [Added] - Add aria-modal  prop to basic component

## TestPlan
Checked manually we are receiving the values by props.

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

Reviewed By: jacdebug

Differential Revision: D39060396

Pulled By: cipolleschi

fbshipit-source-id: 80da100ff412b17ba29ddc6d811afb4b0207ac9f
2022-09-12 04:41:13 -07:00
Rob Hogan feead8f299 Allow LogBoxLog-test to work with native promises
Summary:
This test currently uses `jest.runAllTicks()` to execute cached, immediately-resolving promises, under Jest "legacy" timers (the RN default) - this works only because [we polyfill Promise](https://github.com/facebook/react-native/blob/main/jest/setup.js#L24) using a userland JavaScript implementation that internally uses mocked-out timer functions.

Here we change to a more universal approach by adding a new microtask/promise to the end of the queue and awaiting it.

This allows us to remove our Promise polyfill from Jest setup (to follow).

Changelog:
[Internal][Fixed] - Prepare `LogBoxLog-test.js` for native promises

Reviewed By: huntie

Differential Revision: D39418413

fbshipit-source-id: 1384ef385b1e10261754513369af8997d296ffea
2022-09-12 03:57:45 -07:00
Rob Hogan 8e0168fe9d Fix LogBoxSymbolication-test.js
Summary:
This test was causing uncaught promise rejections, because the mocked `symbolicateStackTrace` in this test returns a different type from the real one, causing `LogBoxSymbolication`'s unawaited, cached promises to reject.

This wasn't picked up as a test failure because our `promise` polyfill silently swallows uncaught rejections, but it does cause a failure if we use native promises in tests.

Changelog:
[Internal][Fixed] - Fix LogBoxSymbolication-test.js

Reviewed By: huntie

Differential Revision: D39418412

fbshipit-source-id: 0be8f1551c4a58dc47faf1597caf47271af40af2
2022-09-12 03:57:45 -07:00
ankit-tailor f1c1f8116b Feat/fontweight number value (#34598)
Summary:
This PR adds support for number values for `fontWeight` as requested in https://github.com/facebook/react-native/issues/34425.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Added] - Added support for number values in fontWeight.

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

Test Plan:
```js
<Text style={{ fontWeight: 900, color: 'red' }}>
  Hello World
</Text>
```

Reviewed By: jacdebug

Differential Revision: D39268920

Pulled By: cipolleschi

fbshipit-source-id: 9bb711677bf173f9904b74f382659042856efd83
2022-09-12 02:12:23 -07:00
Gabriel Donadel Dall'Agnol 3e97d5fe58 feat: Add id prop to Text, TouchableWithoutFeedback and View components (#34522)
Summary:
This adds the `id` prop to `Text`, `TouchableWithoutFeedback` and `View` components as requested on https://github.com/facebook/react-native/issues/34424 mapping the existing `nativeID` prop to `id`. As this components are inherited by others this also adds the `id` prop support to `Image`, `TouchableBounce`, `TouchableHighlight`, `TouchableOpacity` and `TextInput`.
This PR also adds android tests ensuring that the `id` property is passed to the native view via the `nativeID` prop, these tests were based on the existing `nativeID` tests ([NativeIdTestCase.java](https://github.com/facebook/react-native/blob/main/ReactAndroid/src/androidTest/java/com/facebook/react/tests/NativeIdTestCase.java)).

## Changelog

[General] [Added] - Add id prop to Text, TouchableWithoutFeedback and View components

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

Test Plan: Ensure that the new `id` prop android tests pass on CircleCI

Reviewed By: lunaleaps

Differential Revision: D39089639

Pulled By: cipolleschi

fbshipit-source-id: 884fb2461720835ca5048004fa79096dac89c51c
2022-09-09 11:16:28 -07:00
Viraj-10 720cdbc658 feat: adding aria-label alias for accessibilityLabel (#34502)
Summary:
- Adding [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) alias for [accessibilityLabel](https://reactnative.dev/docs/accessibility#accessibilitylabel)

https://github.com/facebook/react-native/issues/34424

## Changelog

[General] [Added] - Add `aria-label` prop to `Button`, `View`, `Pressable` component

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

Test Plan:
```
<Button
     onPress={() => onButtonPress('cancelled')}
     testID="cancel_button"
     color={theme.SystemRedColor}
     title="Cancel Application"
     aria-lable="Press to cancel your application!"
/>
```

Reviewed By: NickGerleman

Differential Revision: D39055178

Pulled By: cipolleschi

fbshipit-source-id: 7513a4518dedd0834e99fa8e72b07e0dc0132b41
2022-09-09 11:16:28 -07:00
Rubén Norte 0f980419f2 Add option to disable inspector in AppContainer to avoid showing it in nested AppContainer views
Summary: Changelog: [internal]

Reviewed By: jacdebug

Differential Revision: D39383213

fbshipit-source-id: 1e3cb7e2d72df1ddbc254c789bd10b12229fe1ae
2022-09-09 09:16:24 -07:00
Rubén Norte 460153fc33 Restore fix for ScrollView error on iOS
Summary:
Changelog: [internal]

This brings back a fix for ScrollView on iOS that we removed because we thought it was no longer necessary, but it actually is.

Reviewed By: jacdebug

Differential Revision: D39382967

fbshipit-source-id: f052b4fb899f4e60e8c530990caf07344a907c43
2022-09-09 09:16:24 -07:00
Daksh Bhardwaj e8739e962d feat: added accessibility value aliases (#34535)
Summary:
This adds aliasing for accessibility Value, it's used as requested on https://github.com/facebook/react-native/issues/34424.

- [aria-valuemax](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuemax) to equivalent [accessibilityValue.max](https://reactnative.dev/docs/accessibility#accessibilityvalue)
- [aria-valuemin](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuemin) to equivalent [accessibilityValue.min](https://reactnative.dev/docs/accessibility#accessibilityvalue)
- [aria-valuenow](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuenow) to equivalent [accessibilityValue.now](https://reactnative.dev/docs/accessibility#accessibilityvalue)
- [aria-valuetext](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuetext) to equivalent [accessibilityValue.text](https://reactnative.dev/docs/accessibility#accessibilityvalue)

## Changelog

[General] [Added] - Add `aria-valuemax`, `aria-valuemin`, `aria-valuenow`, `aria-valuetext` as alias prop to `TouchableOpacity`, `View`, `Pressable` `TouchableHighlight` `TouchableBounce` `TouchableWithoutFeedback` `TouchableOpacity` components

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

Test Plan:
- Enable `talkback`.
 - Open the RNTester app and navigate to the Api's tab
 - Go to the `fake Slider Example for Accessibility Value `modes section

<Image src="https://user-images.githubusercontent.com/22423684/187472543-05200d8d-2742-4096-a56c-41f81b440a97.png" height="600" width="300" />

Reviewed By: cipolleschi

Differential Revision: D39206362

Pulled By: jacdebug

fbshipit-source-id: e7ed263badac789d529dd21e961cda5302b031e3
2022-09-09 04:48:41 -07:00
Nick Gerleman 5e1c4d4203 Add VirtualizedList tests for handling non-zero initialScrollIndex before scroll metrics
Summary:
This adds a a couple of tests to run existing behavior where VirtualizedList avoids batched renders until it has seen scroll metrics when the list is not initialized to the zero position.

Changelog:
[Internal][Added] - Add VirtualizedList tests for handling non-zero initialScrollIndex before scroll metrics

Reviewed By: yungsters

Differential Revision: D39247250

fbshipit-source-id: 530f58f9c7421949c388048c376fc5b0ab7835d9
2022-09-08 22:27:19 -07:00
Agastya Darma Laksana b2452ab216 feat: Adding support for objectFit a partial equivalent to the resizeMode style and prop of <Image>. (#34576)
Summary:
This PR aims to add support for objectFit a partial equivalent to the resizeMode style and prop of Image.

## Changelog

[General] [Added] - Add support for objectFit style of Image.

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

Test Plan:
1. Open the RNTester app and navigate to the Image page
2. See the Object Fit section.

![Screenshot_1662112702](https://user-images.githubusercontent.com/8868908/188115315-5d5aa971-93ba-4437-a54b-c5ea69b00c08.png)

Reviewed By: rickhanlonii

Differential Revision: D39261176

Pulled By: jacdebug

fbshipit-source-id: 1eefd76b6c11ed5fc52b2c524ad78c91051077f6
2022-09-08 11:52:10 -07:00
Rubén Norte 4d04b1d4c8 Remove last direct references to utilities in Paper from react-native
Summary:
Changelog: [internal]

This replaces all direct references to the `ReactNative` module (which is the Paper renderer) to `RendererProxy` which would select between Paper and Fabric correctly.

The implementation of these functions is exactly the same right now.

As per the removal of the fix for T55744311 in `ScrollView`, I verified this doesn't cause any issues in the screen where it failed before.

Reviewed By: javache

Differential Revision: D39270691

fbshipit-source-id: 03882748fe4b754b9a2c5e9d4c4f003b94ed49ef
2022-09-08 11:12:06 -07:00
Rubén Norte 699dabb2e3 Use findNodeHandle from RendererProxy instead of Paper in usages within the react-native package
Summary:
This replaces all direct references to `ReactNative` within the `react-native` package to use `findNodeHandle` with a reference obtained from `RendererProxy`, which will allow us to select the correct renderer.

Changelog: [internal]

Reviewed By: javache

Differential Revision: D39270689

fbshipit-source-id: a39875281ba7b7b1b00128564124b6adcacebc4d
2022-09-08 11:12:06 -07:00
Rubén Norte b06cae3681 Extract use of renderer to its own module
Summary:
This diff creates a proxy module to interact with the React Native renderer. The goal of this proxy is to decouple usages of several functions (e.g.: `findNodeHandle`, etc.) from the actual renderer used in an app. This way, we can easily switch between renderers without having to change code depending on it.

This will be useful to remove a specific renderer from an app bundle when it's no longer used (e.g.: Paper on the Facebook App).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D39205975

fbshipit-source-id: 05289c0c3c8cd26d81aa1d2163097c73ec40c6ad
2022-09-08 11:12:06 -07:00
Rubén Norte 5efb4f09fd Remove (bad) implementation of the User Timing API from Systrace
Summary:
The `Systrace` module implements a polyfill for the User Timing API that's:
1. Incompatible with the Web standard. This polyfill expects `performance.mark` and `performance.measure` to be used exactly like `Systrace.beginEvent` and `Systrace.endEvent` respectively. If not used like those functions, they throw an error at runtime, which is really bad.
2. Never actually used. See below.

This polyfill is only installed if we're actually profiling on startup:
https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpSystrace.js?lines=17-21

While the only code that we have that uses this API is actually not installed if we're profiling:

https://www.internalfb.com/code/fbsource/[4d888a933920]/xplat/js/react-native-github/Libraries/Core/setUpDeveloperTools.js?lines=20-21

This should be safe to remove then.

We have plans to add proper support for this API in the short term, so this also gets out of the way of doing that.

Additionally, installing this polyfill was the only reason why we had `setupSystrace`, so we can get rid of that too :)

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D39210813

fbshipit-source-id: a90b6237c311d2157069b41975d10b33f1f464ef
2022-09-08 11:12:06 -07:00
Rubén Norte 9e3156f4c2 Remove unused code from Systrace
Summary: Changelog: [internal]

Reviewed By: javache

Differential Revision: D39210814

fbshipit-source-id: 7129e36d114de3717cfda75b3cc6ac597f06bc4b
2022-09-08 11:12:06 -07:00
Gabriel Donadel Dall'Agnol 73abcba40f feat: Unify TextInput autoComplete and textContentType props (#34523)
Summary:
This unifies the Android only  `autoComplete` and the iOS only `textContentType` TextInput props with the web `autoComplete` values as requested on https://github.com/facebook/react-native/issues/34424. I left the `textContentType` prop and the current supported `autoComplete` values untouched in order to avoid having a breaking change. This also updates RNTester to include test cases using the new `autoComplete` values

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Changed] - Unify TextInput autoComplete and textContentType props

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

Test Plan:
1. Open the RNTester app and navigate to the TextInput page
2. Test the `TextInput` component through the `Text Auto Complete` section

https://user-images.githubusercontent.com/11707729/187118267-3b509631-7b84-47b7-a580-567a7f5b483f.mov

Reviewed By: NickGerleman

Differential Revision: D39104545

Pulled By: cipolleschi

fbshipit-source-id: a0d4b1b9ab336854a741a9efe4a62c3da0b5c0f4
2022-09-08 10:36:23 -07:00
Mayank Sunil Pagar 7ea54a4087 feat: added aria-live as a alias for accessibility-live-region (#34555)
Summary:
This adds `aria-live` alias for `accessibilityLiveRegion`, it unifies aria-live and accessibilityLiveRegion and also maps `aria-live='off'` to `accessibilityLiveRegion='none'` as requested on https://github.com/facebook/react-native/issues/34424

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General][Added] - Added aria-live alias for accessibilityLiveRegion.

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

Test Plan:
```js
<View aria-live="polite">
  <Text>Clicked {this.state.count} times</Text>
</View>

<View aria-live="off">
  <Text>Clicked {this.state.count} times</Text>
</View>
```

Reviewed By: cipolleschi

Differential Revision: D39206291

Pulled By: jacdebug

fbshipit-source-id: fd2019e7047ff7ff6133fed39f1a70b5a9396f89
2022-09-08 10:03:46 -07:00
Nick Gerleman 052617611d Fix FillRateHelper Accessing -1 Frame
Summary:
FillRateHelper accesses frame metrics based on passed state/cellsAroundViewport on scroll. cellsAroundViewport may be [0, -1] for no items. Usually this is captured by the check that item count is zero, but it is possible to have items without yet expanding state to render the items. This adds a check to bail early if we are not yet rendering any viewport-related cells.

Also renamed "state" to "cellsAroundViewport" for more consistent naming with the new list, where it is no longer the only state.

Reviewed By: javache

Differential Revision: D39345705

fbshipit-source-id: 198ab46ff2c8e8fe64076c9150edd4914dd745d7
2022-09-08 05:46:44 -07:00
Samuel Susla 7b79dfccce React Native sync for revisions c1f5884...4ea064e
Summary:
This sync includes the following changes:
- **[4ea064eb0](https://github.com/facebook/react/commit/4ea064eb0 )**: Don't fire passive effects during initial mount of a hidden Offscreen tree ([#24967](https://github.com/facebook/react/pull/24967)) //<Andrew Clark>//
- **[2c7dea736](https://github.com/facebook/react/commit/2c7dea736 )**: Implement Offscreen in Fizz ([#24988](https://github.com/facebook/react/pull/24988)) //<Andrew Clark>//
- **[49f8254d6](https://github.com/facebook/react/commit/49f8254d6 )**: Bug fix for <App /> vs. <Counter /> ([#24972](https://github.com/facebook/react/pull/24972)) //<davidrenne>//
- **[6b28bc9c5](https://github.com/facebook/react/commit/6b28bc9c5 )**: test: Throw custom error instead of relying on runtime error ([#24946](https://github.com/facebook/react/pull/24946)) //<Sebastian Silbermann>//
- **[9bd0dd4c1](https://github.com/facebook/react/commit/9bd0dd4c1 )**: test(react-debug-tools): Improve coverage of currentDispatcher.current setter ([#24945](https://github.com/facebook/react/pull/24945)) //<Sebastian Silbermann>//
- **[59bc52a16](https://github.com/facebook/react/commit/59bc52a16 )**: Add 4.5.0 release to eslint rules CHANGELOG ([#24853](https://github.com/facebook/react/pull/24853)) //<Sebastian Silbermann>//
- **[cfb6cfa25](https://github.com/facebook/react/commit/cfb6cfa25 )**: Reused components commit with timing as new ones //<Andrew Clark>//
- **[679eea328](https://github.com/facebook/react/commit/679eea328 )**: Extract layout effects to separate functions //<Andrew Clark>//
- **[41287d447](https://github.com/facebook/react/commit/41287d447 )**: Use recursion to traverse during "reappear layout" phase //<Andrew Clark>//
- **[697702bf3](https://github.com/facebook/react/commit/697702bf3 )**: Use recursion to traverse during "disappear layout" phase //<Andrew Clark>//
- **[02206099a](https://github.com/facebook/react/commit/02206099a )**: Use recursion to traverse during passive unmount phase ([#24918](https://github.com/facebook/react/pull/24918)) //<Andrew Clark>//
- **[f62949519](https://github.com/facebook/react/commit/f62949519 )**: [Transition Tracing] Rename transitionCallbacks to unstable_transitionCallbacks  ([#24920](https://github.com/facebook/react/pull/24920)) //<Luna Ruan>//
- **[7a4336c40](https://github.com/facebook/react/commit/7a4336c40 )**: Use recursion to traverse during passive mount phase //<Andrew Clark>//
- **[bb1357b38](https://github.com/facebook/react/commit/bb1357b38 )**: Wrap try-catch directly around each user function //<Andrew Clark>//
- **[de3c06984](https://github.com/facebook/react/commit/de3c06984 )**: Move flag check into each switch case //<Andrew Clark>//
- **[f5916d15b](https://github.com/facebook/react/commit/f5916d15b )**: [Transition Tracing][Code Cleanup] Delete Marker Name Change Tests ([#24908](https://github.com/facebook/react/pull/24908)) //<Luna Ruan>//
- **[fa20b319f](https://github.com/facebook/react/commit/fa20b319f )**: [Transition Tracing] Code Cleanup ([#24880](https://github.com/facebook/react/pull/24880)) //<Luna Ruan>//
- **[5e8c1961c](https://github.com/facebook/react/commit/5e8c1961c )**: [Transition Tracing] onMarkerProgress ([#24861](https://github.com/facebook/react/pull/24861)) //<Luna Ruan>//
- **[b641d0209](https://github.com/facebook/react/commit/b641d0209 )**: Use recursion to traverse during layout phase //<Andrew Clark>//
- **[a1b1e391e](https://github.com/facebook/react/commit/a1b1e391e )**: Wrap try-catch directly around each user function //<Andrew Clark>//
- **[3df7e8f5d](https://github.com/facebook/react/commit/3df7e8f5d )**: Move flag check into each switch case //<Andrew Clark>//
- **[b8c96b136](https://github.com/facebook/react/commit/b8c96b136 )**: Move ref commit effects inside switch statement //<Andrew Clark>//
- **[e225fa43a](https://github.com/facebook/react/commit/e225fa43a )**: [Transition Tracing] Don't call transition callbacks if no transition name specified ([#24887](https://github.com/facebook/react/pull/24887)) //<Luna Ruan>//
- **[dd2d65227](https://github.com/facebook/react/commit/dd2d65227 )**: [Transition Tracing] Tracing Marker Name Change in Update Warning ([#24873](https://github.com/facebook/react/pull/24873)) //<Luna Ruan>//
- **[80208e769](https://github.com/facebook/react/commit/80208e769 )**: [Transition Tracing] Add onTransitionProgress Callback ([#24833](https://github.com/facebook/react/pull/24833)) //<Luna Ruan>//
- **[30eb267ab](https://github.com/facebook/react/commit/30eb267ab )**: Land forked reconciler changes ([#24878](https://github.com/facebook/react/pull/24878)) //<Andrew Clark>//
- **[5e4e2dae0](https://github.com/facebook/react/commit/5e4e2dae0 )**: Defer setState callbacks until component is visible ([#24872](https://github.com/facebook/react/pull/24872)) //<Andrew Clark>//
- **[8e35b5060](https://github.com/facebook/react/commit/8e35b5060 )**: [Transition Tracing] Refactor Code to Remove OffscreeInstance TODOs ([#24855](https://github.com/facebook/react/pull/24855)) //<Luna Ruan>//
- **[deab1263a](https://github.com/facebook/react/commit/deab1263a )**: [Transition Tracing] Change Transition Type Passed Pending Transitions ([#24856](https://github.com/facebook/react/pull/24856)) //<Luna Ruan>//
- **[82e9e9909](https://github.com/facebook/react/commit/82e9e9909 )**: Suspending inside a hidden tree should not cause fallbacks to appear ([#24699](https://github.com/facebook/react/pull/24699)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions c1f5884...4ea064e

jest_e2e[run_all_tests]

Reviewed By: philIip, NickGerleman

Differential Revision: D39305648

fbshipit-source-id: 627ead5035c77fbc902b306e17897e425ad7fb99
2022-09-08 04:26:07 -07:00
ankit-tailor 98d84e571d Feat/accessibility state alias (#34524)
Summary:
This adds aliasing for accessibility state, it's used as requested on https://github.com/facebook/react-native/issues/34424.

- [aria-disabled](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled) to equivalent [accessibilityState.disabled](https://reactnative.dev/docs/accessibility#accessibilitystate)
- [aria-busy](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-busy) to equivalent [accessibilityState.busy](https://reactnative.dev/docs/accessibility#accessibilitystate)
- [aria-checked](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked) to equivalent [accessibilityState.checked](https://reactnative.dev/docs/accessibility#accessibilitystate)
- [aria-expanded](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded) to equivalent [accessibilityState.expanded](https://reactnative.dev/docs/accessibility#accessibilitystate)
- [aria-selected](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected) to equivalent [accessibilityState.selected](https://reactnative.dev/docs/accessibility#accessibilitystate)

## Changelog

[General] [Added] - Add aria-disabled, aria-busy, aria-checked, aria-expanded and aria-selected prop to core components

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

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

Test Plan:
```js
<View
  aria-disabled={true}
  aria-selected={false}
  aria-checked={true}
  aria-expanded={true}
  aria-busy={true}
  style={{backgroundColor: '#527FE4', padding: 5}}>
  <Text style={{fontSize: 11}}>Blue background</Text>
</View>
```

Reviewed By: cipolleschi

Differential Revision: D39137790

Pulled By: jacdebug

fbshipit-source-id: 27b5c56e91731ba36bb4754d9862286a7a8191bc
2022-09-08 03:38:39 -07:00
Daksh Bhardwaj fc42d5bbb9 feat: add userSelect style equivalent to selectable (#34575)
Summary:
This adds support for the `userSelect` style attribute, mapping the already existing selectable attribute as requested on https://github.com/facebook/react-native/issues/34425. This PR also updates the TextExample.android and TestExample.ios on the RNTester in order to facilitate the manual QA of this.

## Changelog
[General] [Added] - Add support for `userSelect` style

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

Test Plan:
-  open the RNTester app and navigate to the Text page
 - Check the `Selectable Text` through the Selectable text section
<Image src="https://user-images.githubusercontent.com/22423684/188112863-65acd145-76b0-47ba-8bc6-f72298077096.png" height="600" width="300" />

Reviewed By: yungsters

Differential Revision: D39252798

Pulled By: jacdebug

fbshipit-source-id: f7fabf20ee68778d75461f511c56f94d0d756d9c
2022-09-08 03:09:11 -07:00
Anne Pham 62f83a9fad Add a check for scrollEnabled to VirtualizedList error (#34560)
Summary:
Nested `VirtualizedList` is now an [error](https://github.com/facebook/react-native/commit/646605b90e666c4b0d1c1200a137eacf62b46f87), instead of a warning. Issues [here](https://github.com/facebook/react-native/issues/31697) and [here](https://github.com/facebook/react-native/issues/33024) outline the concern.

## Changelog

[General] [Added] - Added a check to if `scrollEnabled` is not false, if so then fire the `VirtualizedList` error

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

Test Plan: Passes all provided automatic tests. In a personal app, there is a situation of nested ScrollViews that had triggered the error. After defining `scrollEnabled={false}` and adding the check, the error no longer appears.

Reviewed By: yungsters

Differential Revision: D39283866

Pulled By: NickGerleman

fbshipit-source-id: 16ae6bbe6bb8b01a54ae18f9e6abf75d11c21c29
2022-09-07 19:10:01 -07:00
Nick Gerleman 0ef770587f Attempt fix #2 for cellsAroundViewport reaching out of bounds
Summary: VirtualizedList would more gracefully handle out of range cells than VirtualizedList_EXPERIMENTAL, which treats it as an invariant violation. D39244112 (https://github.com/facebook/react-native/commit/7aa203beda3cd358703c2fa535ed045771761612) attempted to fix an issue where recalculation of cells around viewport can include out of range cells, but it is still showing up later. This change adds a bounds check to the remaining branch we control, and an assertion that `computeWindowedRenderLimits` is not returing something out of range to discover if that is the cause.

Reviewed By: yungsters

Differential Revision: D39267445

fbshipit-source-id: 64c99da28b5b01ef61784079b586e355f73764a1
2022-09-07 17:00:28 -07:00
Nick Gerleman f44dfef923 Add proper support for fractional scrollIndex in VirtualizedList
Summary:
Non-integer `initialScrollIndex` or values to `scrollToIndex` would produce a reasonable result, with the caveat that it always falls back to layout estimation (will only be correct when all items are the same size), and breaks if getItemLayout() is supplied. It has usage though, so this diff adds proper support for non-integer scrollIndex, to offset a given amount into the length of the specific cell.

This overlaps a bit with the optional `viewOffset` and `viewPosition` arguments in `scrollToIndex`, but there isn't really the equivalent API for `initialScrollIndex`.

Changelog:
[General][Added]- Add proper support for fractional scrollIndex in VirtualizedList

Reviewed By: yungsters

Differential Revision: D39271100

fbshipit-source-id: 4d93887eed4497e9f6abcd1a6117ac7fdaebf2b1
2022-09-07 16:52:01 -07:00
dhruvtailor7 47a05bc26a feat: added crossOrigin, referrerPolicy, srcSet, width, height and src props to the Image Component. (#34481)
Summary:
This PR is for adding the support for `crossOrigin`, `referrerPolicy`, `width`, `height` and `srcSet` props to Image Component and mapping the `src` prop to `source.uri` of Image Component for the issue https://github.com/facebook/react-native/issues/34424. An example is also added in the RNTester ImageExample.

## Changelog

[General] [Changed] - Map the `src` prop to `source.uri` prop in Image Component.
[General] [Added] - added `crossOrigin`, `referrerPolicy`, `width`, `height` and `srcSet` props to Image Component.

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

Test Plan:
1. Navigate to Image Component Example in the RNTester app.
2. Contains an example of the Image component using the `src` and `srcSet` prop.
3. For headers, inspect the Image request using Flipper.

<img src="https://user-images.githubusercontent.com/32268377/186153246-d7b72ce3-e082-46d9-87d1-aefacd3af34f.png" height="500" />

Reviewed By: christophpurrer

Differential Revision: D38982041

Pulled By: cipolleschi

fbshipit-source-id: dd6594e39b8f3b36cfcdafa35695254034f1fb7f
2022-09-07 13:13:08 -07:00
Rubén Norte 34e7d48472 Remove unused JSDevSupport module
Summary:
The `JSDevSupport` module is incompatible with Fabric. Given it's not used internally and it's undocumented in OSS, we decided to remove it altogether.

Changelog: [Internal]

Reviewed By: javache, nlutsenko

Differential Revision: D39305892

fbshipit-source-id: 82455701a0b9ba83e6f971fc774280dceb2b22e0
2022-09-07 12:20:58 -07:00
Gabriel Donadel Dall'Agnol ebdb23c6e0 feat: Add aria-hidden prop to Pressable, View and Touchables components (#34552)
Summary:
This adds the ` aria-hidden` prop to `Pressable`, `TouchableBounce`, `TouchableHighlight`, `TouchableNativeFeedback`, `TouchableOpacity`, `TouchableWithoutFeedback` and `View` components as requested on https://github.com/facebook/react-native/issues/34424, being an alias `importantforAccessibility='no-hide-descendants'` on Android and an alias for `accessibilityElementsHidden` on iOS. This PR also updates RNTester AccessibilityExample in order to facilitate the manual QA.

## Changelog

[General] [Added] -  Add aria-hidden prop to Pressable, View and Touchables components

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

Test Plan:
1. Open the RNTester app and navigate to the Accessibility page
2. Test the `aria-hidden` prop through the `View with hidden children from accessibility tree` section, this can be tested either by enabling Voice Over if you're using a real device or through the Accessibility Inspector if you're using a simulator

https://user-images.githubusercontent.com/11707729/187814455-6937e33e-7edd-434e-b7d3-ee6c03f635ca.mov

Reviewed By: NickGerleman

Differential Revision: D39206245

Pulled By: jacdebug

fbshipit-source-id: 551dc671fbcedc824f253e22b8d7753c466838c7
2022-09-07 08:38:25 -07:00
Samuel Susla 37d0a25cb2 React Native sync for revisions 229c86a...c1f5884
Summary:
This sync includes the following changes:
- **[c1f5884ff](https://github.com/facebook/react/commit/c1f5884ff )**: Add missing null checks to OffscreenInstance code ([#24846](https://github.com/facebook/react/pull/24846)) //<Andrew Clark>//
- **[4cd788aef](https://github.com/facebook/react/commit/4cd788aef )**: Revert "Revert [Transition Tracing] Refactor Transition Tracing Root Code" ([#24830](https://github.com/facebook/react/pull/24830)) //<Luna Ruan>//
- **[e61fd91f5](https://github.com/facebook/react/commit/e61fd91f5 )**: Revert "[Transition Tracing] Refactor Transition Tracing Root Code ([#24766](https://github.com/facebook/react/pull/24766))" ([#24829](https://github.com/facebook/react/pull/24829)) //<Andrew Clark>//
- **[401296310](https://github.com/facebook/react/commit/401296310 )**: [Transition Tracing] Refactor Transition Tracing Root Code ([#24766](https://github.com/facebook/react/pull/24766)) //<Luna Ruan>//
- **[185932902](https://github.com/facebook/react/commit/185932902 )**: Track nearest Suspense handler on stack ([#24585](https://github.com/facebook/react/pull/24585)) //<Andrew Clark>//
- **[a7b192e0f](https://github.com/facebook/react/commit/a7b192e0f )**: Add test gate alias for Offscreen ([#24749](https://github.com/facebook/react/pull/24749)) //<Andrew Clark>//
- **[6b6cf8311](https://github.com/facebook/react/commit/6b6cf8311 )**: Land forked reconciler changes ([#24817](https://github.com/facebook/react/pull/24817)) //<Andrew Clark>//
- **[d1432ba93](https://github.com/facebook/react/commit/d1432ba93 )**: [Transition Tracing] Fix excess calls to the transition start callback ([#24806](https://github.com/facebook/react/pull/24806)) //<Luna Ruan>//
- **[88574c1b8](https://github.com/facebook/react/commit/88574c1b8 )**: Fix enableTransitionTracing flag ([#24801](https://github.com/facebook/react/pull/24801)) //<Luna Ruan>//
- **[a4bed4696](https://github.com/facebook/react/commit/a4bed4696 )**: [Transition Tracing] Add Tracing Markers ([#24686](https://github.com/facebook/react/pull/24686)) //<Luna Ruan>//
- **[167853026](https://github.com/facebook/react/commit/167853026 )**: fix hydration warning suppression in text comparisons ([#24784](https://github.com/facebook/react/pull/24784)) //<Josh Story>//
- **[9abe745aa](https://github.com/facebook/react/commit/9abe745aa )**: [DevTools][Timeline Profiler] Component Stacks Backend ([#24776](https://github.com/facebook/react/pull/24776)) //<Luna Ruan>//
- **[cf665c4b7](https://github.com/facebook/react/commit/cf665c4b7 )**: [DevTools] Refactor incompleteTransitions field from Root Fiber memoized state to FiberRoot ([#24765](https://github.com/facebook/react/pull/24765)) //<Luna Ruan>//
- **[56389e81f](https://github.com/facebook/react/commit/56389e81f )**: Abort Flight ([#24754](https://github.com/facebook/react/pull/24754)) //<Sebastian Markbåge>//
- **[0f216ae31](https://github.com/facebook/react/commit/0f216ae31 )**: Add entry points for "static" server rendering passes ([#24752](https://github.com/facebook/react/pull/24752)) //<Sebastian Markbåge>//
- **[f796fa13a](https://github.com/facebook/react/commit/f796fa13a )**: Rename Segment to Task in Flight ([#24753](https://github.com/facebook/react/pull/24753)) //<Sebastian Markbåge>//
- **[0f0aca3ab](https://github.com/facebook/react/commit/0f0aca3ab )**: Aborting early should not infinitely suspend ([#24751](https://github.com/facebook/react/pull/24751)) //<Sebastian Markbåge>//
- **[12a738f1a](https://github.com/facebook/react/commit/12a738f1a )**: [Transition Tracing] Add Support for Multiple Transitions on Root ([#24732](https://github.com/facebook/react/pull/24732)) //<Luna Ruan>//
- **[72ebc703a](https://github.com/facebook/react/commit/72ebc703a )**: [DevTools] fix useDeferredValue to match reconciler change ([#24742](https://github.com/facebook/react/pull/24742)) //<Mengdi Chen>//
- **[7cf9f5e03](https://github.com/facebook/react/commit/7cf9f5e03 )**: Extra space ([#24612](https://github.com/facebook/react/pull/24612)) //<Kerim Büyükakyüz>//

Changelog:
[General][Changed] - React Native sync for revisions 229c86a...c1f5884

Reviewed By: mdvacca, GijsWeterings

Differential Revision: D38904311

fbshipit-source-id: 1e30bc420c30ec7a0c0073fc92a706afef4b3340
2022-09-06 10:52:22 -07:00
cyrus25 a789ead545 Make style pointerEvents take priority over pointerEvents prop (#34597)
Summary:
Make style pointerEvents take priority over pointerEvents prop. Fixes requested changes in https://github.com/facebook/react-native/issues/34586

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - Make style pointerEvents take priority over pointerEvents prop. FIxes requested changes in https://github.com/facebook/react-native/issues/34586

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

Test Plan: Will rely on green cli

Reviewed By: NickGerleman

Differential Revision: D39269306

Pulled By: cipolleschi

fbshipit-source-id: 0927bf6ad7e3ac63e82dbd1a873532152f29001d
2022-09-06 04:47:32 -07:00
Nick Gerleman 7aa203beda Attempt fix for cellsAroundViewport reaching out of bounds
Summary: VirtualizedList would more gracefully handle out of range cells than VirtualizedList_EXPERIMENTAL, which treats it as an invariant violation. This attempts to fix an issue where recalculation of cells around viewport can include out of range cells.

Reviewed By: rshest

Differential Revision: D39244112

fbshipit-source-id: 20fe6ea552035061d9d00720fcab77b29a785771
2022-09-05 11:45:12 -07:00
madhav23bansal a50e6fb341 Feat/role to accessibility role mapping (#34538)
Summary:
This adds role alias for accessibilityRole, it unifies role and accessibilityRole as requested on https://github.com/facebook/react-native/issues/34424

## Changelog

[General][Added] - Added role alias for accessibilityRole.

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

Test Plan:
```js
 <View
  role="slider"
  style={[
    {
      marginTop: 5,
      borderWidth: 1,
      borderRadius: 5,
      padding: 5,
    },
    this.state.showBorder
      ? {
          borderStyle: 'dotted',
        }
      : null,
  ]}>
  <Text style={{fontSize: 11}}>Dotted border style</Text>
</View>
```

Reviewed By: cipolleschi

Differential Revision: D39169722

Pulled By: jacdebug

fbshipit-source-id: cbcbda5ff900c18509b9f3c88e145a3f8700c78d
2022-09-05 10:01:24 -07:00
cyrus25 5c109b37a4 feat: Added pointerEvents style equivalent to pointerEvents prop (#34586)
Summary:
This adds `pointerEvents` style which is equivalent to `pointerEvents` prop as requested in https://github.com/facebook/react-native/issues/34425

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Added] - Added pointerEvents style equivalent to pointerEvents prop

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

Test Plan:
```
<View
   style={{
     pointerEvents: 'none'
   }}
 >
</View>
```

Reviewed By: cipolleschi

Differential Revision: D39252830

Pulled By: jacdebug

fbshipit-source-id: 94f265a6b6940a4371e7985d5de3b8143693e069
2022-09-05 05:37:35 -07:00
Pavel Matyukov 5c211f2bce fix: image cache did not take into account request cache policy (#34556)
Summary:
Image Component cache = 'reload' prop not worked correct because inner Image cache did not take into account request cache (cache property convert in RCTConvert into request.cachePolicy).

Fixes https://github.com/facebook/react-native/issues/9195

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [Fixed] - Image Component will not update correctly when passing in new url

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

Test Plan: Reproduce code: https://snack.expo.dev/rundbom/image-should-update

Reviewed By: cipolleschi

Differential Revision: D39206324

Pulled By: jacdebug

fbshipit-source-id: 2293382279e92f3b2bfcd36b54af47d1813c5cdf
2022-09-05 05:21:41 -07:00
Tianyu Yao c52df02f84 Enable inspection from devtools
Summary:
Changelog:
[General][Added] - Added an overlay similar to Inspector.js that allows directly selecting elements on RN from React DevTools

This diff updates DevToolsHighlighter into DevToolsOverlay. It now also allows DevTools user to select an element to inspect directly from DevTools.

Depends on https://github.com/facebook/react/pull/25111 to work.

TODOs:
- Currently once an element selected on RN, the inspector toggle isn't turned off automatically.
- Fabric support depends on https://github.com/facebook/react/pull/25118

Reviewed By: lunaruan

Differential Revision: D38815494

fbshipit-source-id: 7e1e3a78f6594960b5dfaec142bafd3ca4b146af
2022-09-01 12:39:03 -07:00