mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
@simek/fix-cpp-docs-comments
38536 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3b8459d66b |
xplat RN: fix flow for useSyncExternalStore
Summary: They flow type for useSyncExternalStore is incorrect and in consistent with www. v1.0.0 of use-sync-external-store has the third parameter: https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/src/useSyncExternalStoreShimClient.js#L37 This revision is 1.0.0: https://github.com/facebook/react/blob/4997515b96eede5ab1ca622e0439a0707f8d4afd/packages/use-sync-external-store/package.json Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D44163470 fbshipit-source-id: 6582b20ba09f5840b444a1ca3d8fc12d6c783a00 |
||
|
|
714b502b0c |
| RN Monorepo | Migrate to package (#36434)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36434 Changelog: [Internal] This is a squashed stack of 18 commits, starting from D43202126 allow-large-files Reviewed By: cortinico Differential Revision: D43977381 fbshipit-source-id: 0da552ddb85f2f61a0be0ef071915b35f3f8555c |
||
|
|
1c1dfab5bc |
fix(eslint-plugin-specs): removes unnecessary ENOENT error check (#36448)
Summary:
```javascript
// workaround https://github.com/nodejs/node/issues/31481
// todo: remove the ENOENT error check when we drop node.js 13 support
case 'ENOENT':
case 'EACCES':
```
Well, there was a TODO comment asking to remove `ENOENT` error check when react native drop nodejs 13 support since nodejs 14 has fixed the bug that motivated this check. Now react native minimum nodejs version supported is nodejs 14, so this check is not needed anymore.
## Changelog
[Internal] [Fixed] - Removes `ENOENT` error check
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/36448
Reviewed By: NickGerleman
Differential Revision: D44025087
Pulled By: cortinico
fbshipit-source-id: f42cb7105a088e2eea207da12d4e63c6d26f3c77
|
||
|
|
379d9d4918 |
Refactor PointerEvent emitting into its own gesture recognizer
Summary: Changelog: [iOS][Internal] - Refactor PointerEvent emitting into its own gesture recognizer In doing some exploration of a full e2e implementation of the click event I found pretty early on the necessity of addressing the pointerCancel on scroll functionality which, to implement properly without degrading the existing touch gesture handler — involves extracting all the pointer event handling code written so far into its own gesture handler so it can "fail" (when a scroll view wants to take priority) without affecting the existing touch handlers. This diff is only a refactor and doesn't add/change any new functionality. allow-large-files Reviewed By: sammy-SC Differential Revision: D43372806 fbshipit-source-id: e16f75121fd121d3f82ab43cfc6fab0629654f26 |
||
|
|
b2fda3eca7 |
Add platform test for pointercancel events caused by touch scrolling
Summary: Changelog: [Internal] - Add platform test for pointercancel events caused by touch scrolling This diff adds a new ported Web Platform Test which [verifies that pointercancel events are properly emitted once a touch causes scrolling](https://github.com/web-platform-tests/wpt/blob/master/pointerevents/pointerevent_pointercancel_touch.html). Reviewed By: lunaleaps Differential Revision: D43855277 fbshipit-source-id: 94a106058ba2c5e5fe4c1980519ceceddb2bb389 |
||
|
|
93c1fbd2d8 |
Fix typos (RCTCustomRefreshControlProtocol) (#36363)
Summary: Fix typo `RCTCustomRefreshContolProtocol` > `RCTCustomRefreshControlProtocol` ## Changelog [INTERNAL] [FIXED] - Fixed typo RCTCustomRefreshControlProtocol Pull Request resolved: https://github.com/facebook/react-native/pull/36363 Test Plan: none Reviewed By: cortinico Differential Revision: D44024938 Pulled By: cipolleschi fbshipit-source-id: 1fbc4e75361334586e46e14ee746cbb94d230a92 |
||
|
|
c0a46c696b |
Merge defaultExports.forEach(statement => ... (Flow, TS) to findNativeComponentType fn in parser-commons.js (#36466)
Summary: >[Codegen 95] Extract the `defaultExports.forEach(statement =>` (Flow, TS) function in `parser-commons`, so that it accept a Parser parameter to unify the behaviors between flow and typescript. The Parser object needs to be enriched with all the methods to extract the required information from the Node, if they are not there yet. ### Changes - merged TS & Flow parsers' logic for `defaultExports.forEach(statement =>` of `/components/index.js:findComponentConfig()` into; - `findNativeComponentType` fn to `parsers-commons.js` - add `getTypeArgumentParamsFromDeclaration` & `getNativeComponentType` fn's - add **_tests_** for getTypeArgumentParamsFromDeclaration & `getNativeComponentType` fn's ## Changelog [INTERNAL] [CHANGED] - Merge `defaultExports.forEach(statement => ...` (Flow, TS) to `findNativeComponentType` fn in `parser-commons.js` Pull Request resolved: https://github.com/facebook/react-native/pull/36466 Test Plan: - `yarn lint && yarn run flow && yarn jest react-native` ⇒ � Reviewed By: rshest Differential Revision: D44088862 Pulled By: cipolleschi fbshipit-source-id: 91bf0edcd53b2e054160af34d7c128355c178b26 |
||
|
|
94f505ba2b |
Extract inner switch case 'TSTypereference' to function translateTypeReferenceAnnotation() (#36463)
Summary: > [Codegen 91] Extract the inner switch in typescript/modules/index.js at line to parse the case TSTypereference ([lines](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/modules/index.js#L194-L275))into a function translateTypeReferenceAnnotation() (the goal is to try and get a simpler switch statement and to spot structural similiarities between the flow and typescript index.js files) Part of Issue https://github.com/facebook/react-native/issues/34872 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [INTERNAL] [CHANGED] - Extract inner switch case 'TSTypereference' to function translateTypeReferenceAnnotation(). Pull Request resolved: https://github.com/facebook/react-native/pull/36463 Test Plan: - yarn lint - yarn run flow - yarn test react-native-codegen Reviewed By: cortinico Differential Revision: D44027755 Pulled By: cipolleschi fbshipit-source-id: b32d6adc56fcd0e1b42c255b16828b2306941d57 |
||
|
|
c0abff11b6 |
Precedent textContentType when set
Summary: Changelog: [iOS][Changed] - Give precedence to `textContentType` property for backwards compat as mentioned in https://github.com/facebook/react-native/issues/36229#issuecomment-1470468374 Reviewed By: necolas Differential Revision: D44106291 fbshipit-source-id: 5702d7f171735d1abe6cfbc9ca1ad8f21751d51e |
||
|
|
dc2cbed07c |
Improve error messages for invalid function types in react-native-codegen (#36498)
Summary: The supported `CodegenTypes` aren't provided in the docs, which leads to many issues for developers working to transition native components to support Fabric. However, explicit error messages are provided in many cases (e.g., to use specific numeric types instead of `number` attributes or to remove nested optionals in arrays). This isn't the case for the common use case of TypeScript functions, which are very commonly used for event handlers in native components (such as `onChange`), forcing devs to search their way through the `react-native` codebase until they find [this file](https://github.com/facebook/react-native/blob/681d7f8113d2b5e9d6966255ee6c72b50a7d488a/Libraries/Types/CodegenTypes.js#L18). By providing an explicit error message, we can significantly improve developer experience for those working to transition libraries/components, leading to higher Fabric adoption. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [ADDED] - Create explicit error message for TypeScript functions used as props in Codegen components, redirecting devs to the supported function types `BubblingEventHandler` and `DirectEventHandler`. Pull Request resolved: https://github.com/facebook/react-native/pull/36498 Test Plan: * `yarn run lint` shows no errors * no impact on `yarn && yarn jest react-native-codegen`, which failed 362 tests before and after my changes. Reviewed By: cipolleschi, sshic Differential Revision: D44132960 Pulled By: dmytrorykun fbshipit-source-id: d805ec8403613bf4e070cbd2904ff5a2648ec5fc |
||
|
|
4acef8e4a4 |
fix: EventEmitter ts definition file (#36462)
Summary:
There's an error in the `d.ts` file for EventEmitter which causes the following error:
```
This expression is not constructable.
Type 'typeof import(".../vendor/emitter/EventEmitter")' has no construct signatures.
const emitter = new EventEmitter();
~~~~~~~~~~~~
```
See https://github.com/facebook/react-native/blob/dce9d8d5de381fe53760ddda0d6cbbdfb5be00e4/Libraries/vendor/emitter/EventEmitter.js#L63
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [FIXED] -Fixes an issue with the EventEmitter type definition file
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/36462
Reviewed By: cipolleschi
Differential Revision: D44130846
Pulled By: javache
fbshipit-source-id: 64cecdf55e58b99b243392811226e5095d5dc006
|
||
|
|
681d7f8113 |
Hotfix for Jest preset changes in 0a3c555 (#36495)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36495 It looks like Jest is not running `babel/transform-modules-commonjs` on all files, and therefore when including `"import"` as a Package Exports condition in Jest, this misbehaved (https://github.com/facebook/react-native/commit/0a3c55562b5ba43b00c21ca4d7b2cba0c8eb6206). This is a hotfix to restore CI stability. Changelog: [Fix][Internal] Hotfix adjusting Jest changes added in https://github.com/facebook/react-native/commit/0a3c55562b5ba43b00c21ca4d7b2cba0c8eb6206 Reviewed By: cipolleschi, hoxyq Differential Revision: D44130442 fbshipit-source-id: 6407519d0d5459ef422afe21be26a2e3141bedf3 |
||
|
|
419b41f06d |
fix: fix animated components ref types (#36472)
Summary: I found Animated components like `View`, `Text`, `ScrollView`, `Image` ref type inferred as `any` when ref callback used.  this is happening because of `unknown` type is included as union type as below.  So I excluded `unknown` type inferring via fixing `TAugmentRef` utility type. Result below!  ## Changelog [GENERAL] [FIXED] - fix animated components ref type inferred `any` <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: https://github.com/facebook/react-native/pull/36472 Test Plan: Ran `yarn test-typescript` and `yarn test-typescript-offline` with no errors. Reviewed By: cipolleschi Differential Revision: D44055510 Pulled By: dmytrorykun fbshipit-source-id: 0d380a2c2198c84d586889e912dec5d2304c213a |
||
|
|
ac5aec3f5c |
Add minimum necessary .d.ts files to react-native-codegen (2) (#36397)
Summary: - Add .d.ts files for generators - export each generators because `react-native-windows` need its own selection of generators. ## Changelog [GENERAL] [CHANGED] - Add minimum necessary .d.ts files to react-native-codegen (2) Pull Request resolved: https://github.com/facebook/react-native/pull/36397 Test Plan: `npm run build` in `packages/react-native-codegen` and see all .d.ts files appear in `lib`. Checked .d.ts file in typescript playground. Reviewed By: rshest Differential Revision: D43941811 Pulled By: cipolleschi fbshipit-source-id: 28f5bd56f27531ecf25223620a580358018b779d |
||
|
|
0a3c55562b |
Update custom "exports" conditions in Jest environment
Summary: Updates the default set of `"exports"` condition names in our `ReactNativeEnv` for Jest, so that it aligns with the defaults in React Native CLI (https://github.com/react-native-community/cli/pull/1862). Also includes a subtle update to how this is accomplished. Instead of overriding `exportConditions()`, we assign to the underlying class property — this allows users (once https://github.com/facebook/jest/pull/13989 is merged) to override `customExportConditions` via [`testEnvironmentOptions`](https://jestjs.io/docs/configuration#testenvironmentoptions-object). ```js preset: 'react-native', testEnvironmentOptions: { customExportConditions: ['test', 'react-native'], }, ``` Changelog: [Internal] Reviewed By: jacdebug Differential Revision: D43879056 fbshipit-source-id: 86fffe2b5fdf9d8492d25b8b12a78be75b5fa3be |
||
|
|
b1b6673796 |
Refactor usages of TextLayoutManager.sTextPaintInstance
Summary: Refactor usages of TextLayoutManager.sTextPaintInstance changelog: [internal] internal Reviewed By: javache Differential Revision: D43888689 fbshipit-source-id: 64a198f3ca07e32666701204d94e6e75b3ab53ad |
||
|
|
8c3cb4e6db |
Refactor TextLayoutManager.isRTL() method
Summary: Quick refactor of refactor TextLayoutManager.isRTL() method to cleanup the method and remove lint warning changelog: [internal] internal Reviewed By: javache Differential Revision: D43888197 fbshipit-source-id: 779fb84527f95b3c04504eaa4302be55ab328634 |
||
|
|
9ee0e1c78e |
Use SocketRocket for web socket library (#36471)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36471 The previous native web socket API, `RCTSRWebSocket`, appears to be an older version of the one provided as part of [SocketRocket](https://github.com/facebookincubator/SocketRocket). The latter has several improvements, such as the ability to respect proxy settings, which has been requested by a user of a React Native app. Everything translates over pretty easily, and considering that SocketRocket is already a dependency of Flipper, there doesn't seem to be much additional cost to swapping out the libraries. If we wanted to make things even slimmer, it may even be possible to make the WebSocket library be optional for release builds. ## Changelog [IOS] [CHANGED] - Use SocketRocket for web socket library Pull Request resolved: https://github.com/facebook/react-native/pull/36347 Test Plan: Validated the following: * The WebSocket test page in RNTester * Live reloading Reviewed By: cortinico Differential Revision: D43768835 Pulled By: javache fbshipit-source-id: 11e1ac2700bc92991897c594622e6687339bfcbf |
||
|
|
7fee407564 |
Update React Native codegen to support Partial as alias of $Partial
Summary: `Partial` is the new name of `$Partial` Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D43993220 fbshipit-source-id: 38e8a6bcfa559857b2ab88efee6b904b387bdc0d |
||
|
|
06b97ca28e |
Back out "React Native sync for revisions fccf3a9...47cf4e5"
Summary: There's some problem in the last sync that changes the memoization behavior in some product code. We'll revert and investigate. Changelog: [internal] Reviewed By: bvanderhoof Differential Revision: D44100907 fbshipit-source-id: 233b478dd6f2f29121ac05323047ab6099b6b56c |
||
|
|
01e7ff5513 |
Fix incorrect hyphenation frequency in TextLayoutManagerMapBuffer
Summary: Changelog: [Android][Fixed] Fixed text measurement issue related to hyphenation frequency Reviewed By: makovkastar Differential Revision: D44093758 fbshipit-source-id: 71b7b6cd862586b673a49f5e6efaf9aeeb25c6e1 |
||
|
|
b07cf33279 |
Use RN Build Utils for Building Hermes Artifacts
Summary: We moved Hermes some build utils from [Hermes repo](https://github.com/facebook/hermes/tree/main/utils) to [React Navtie repo](https://github.com/facebook/react-native/tree/main/sdks/hermes-engine/utils) a while ago to have more control over them. However some paths on the CI were not updated. We continued to use old build scripts for Hermes prebuilds. Some unfortunate side effects are: - `HERMES_ENABLE_DEBUGGER` is [hardcoded to true](https://github.com/facebook/hermes/blob/main/utils/build-apple-framework.sh#L65). That makes Hermes much slower in Release configuration. - BUILD_TYPE is [set to Release](https://github.com/facebook/hermes/blob/main/utils/build-apple-framework.sh#L10) instead of `MinSizeRel` which inreases Hermes binary size. This diff copies these build utils from RN to Hermes source directory before we perform Hermes build. Changelog [Internal] Reviewed By: cipolleschi Differential Revision: D44066721 fbshipit-source-id: f45ad6a31fb01c10199f69cc7bbcbbc83b793d34 |
||
|
|
a8714075e8 |
Back out D43959013 - [hermes] Update the hermes packages to 0.10.0 in 'fbsource'
Summary: Changelog: [Internal] Reviewed By: jacdebug Differential Revision: D44085857 fbshipit-source-id: b5e0732016942595d9fa98f38524602f9e793811 |
||
|
|
08757962d2 |
Use getter instead of constant to provide access to FabricUIManager binding
Summary: The `FabricUIManager` module was providing access to the global binding defined by Fabric, adding proper typing for it. The problem about this module is that it only evaluated the global binding once (during module evaluation) and it cached the result. If this module happened to be loaded before the binding is defined, which can happen in apps using the legacy renderer and Fabric together, this modules caches an `undefined` value indefinitely. This refactors the module as a getter function to make sure this lazy behavior is handled correctly in the callsites. Changelog: [Internal] Reviewed By: javache Differential Revision: D44065186 fbshipit-source-id: 7c5cfe674605f03ecb8ca0dabc4c823e0013da6b |
||
|
|
913732b3a4 |
Create feature flag for DOM trees in Fabric
Summary: Changelog: [internal] Reviewed By: rshest Differential Revision: D44088652 fbshipit-source-id: a289b6abbc46141943bb99d9003972eec84ba2da |
||
|
|
6c208c24d5 |
React Native sync for revisions fccf3a9...47cf4e5
Summary: This sync includes the following changes: - **[47cf4e578](https://github.com/facebook/react/commit/47cf4e578 )**: Restore some guards in ReactFabricGlobalResponderHandler after refactor ([#26394](https://github.com/facebook/react/pull/26394)) //<Rubén Norte>// - **[cfc1274e3](https://github.com/facebook/react/commit/cfc1274e3 )**: Disable IE innerHTML workaround behind a flag ([#26390](https://github.com/facebook/react/pull/26390)) //<Sebastian Markbåge>// - **[a57f40d83](https://github.com/facebook/react/commit/a57f40d83 )**: Undo dependency injection of batching ([#26389](https://github.com/facebook/react/pull/26389)) //<Sebastian Markbåge>// - **[d310d654a](https://github.com/facebook/react/commit/d310d654a )**: Avoid meta programming to initialize functions in module scope ([#26388](https://github.com/facebook/react/pull/26388)) //<Sebastian Markbåge>// - **[21aee59e4](https://github.com/facebook/react/commit/21aee59e4 )**: Delete unused DOM files ([#26387](https://github.com/facebook/react/pull/26387)) //<Sebastian Markbåge>// - **[6bd53a5bd](https://github.com/facebook/react/commit/6bd53a5bd )**: Remove FeatureFlags fork for `react-dom/unstable_testing` ([#26383](https://github.com/facebook/react/pull/26383)) //<Sebastian Markbåge>// - **[2788d0d8d](https://github.com/facebook/react/commit/2788d0d8d )**: Allow empty string to be passed to formAction ([#26379](https://github.com/facebook/react/pull/26379)) //<Sebastian Markbåge>// - **[f828bad38](https://github.com/facebook/react/commit/f828bad38 )**: Extracted definition and access to public instances to a separate module in Fabric ([#26321](https://github.com/facebook/react/pull/26321)) //<Rubén Norte>// - **[131768166](https://github.com/facebook/react/commit/131768166 )**: Support Context as renderable node ([#25641](https://github.com/facebook/react/pull/25641)) //<Andrew Clark>// - **[d4f58c3b8](https://github.com/facebook/react/commit/d4f58c3b8 )**: Support Promise as a renderable node ([#25634](https://github.com/facebook/react/pull/25634)) //<Andrew Clark>// - **[633461486](https://github.com/facebook/react/commit/633461486 )**: Add disableLegacyContext test gates where needed ([#26371](https://github.com/facebook/react/pull/26371)) //<Andrew Clark>// - **[432ffc9d0](https://github.com/facebook/react/commit/432ffc9d0 )**: Convert more Scheduler.unstable_flushAll in tests to new test utils ([#26369](https://github.com/facebook/react/pull/26369)) //<Tianyu Yao>// - **[69fd78fe3](https://github.com/facebook/react/commit/69fd78fe3 )**: Update Float tests to check for specific errors ([#26367](https://github.com/facebook/react/pull/26367)) //<Andrew Clark>// - **[93c10dfa6](https://github.com/facebook/react/commit/93c10dfa6 )**: flushSync: Exhaust queue even if something throws ([#26366](https://github.com/facebook/react/pull/26366)) //<Andrew Clark>// - **[be353d251](https://github.com/facebook/react/commit/be353d251 )**: [Flight Reply] Add undefined and Iterable Support ([#26365](https://github.com/facebook/react/pull/26365)) //<Sebastian Markbåge>// - **[ef8bdbecb](https://github.com/facebook/react/commit/ef8bdbecb )**: [Flight Reply] Add Reply Encoding ([#26360](https://github.com/facebook/react/pull/26360)) //<Sebastian Markbåge>// - **[a8875eab7](https://github.com/facebook/react/commit/a8875eab7 )**: Update more tests to not rely on sync queuing ([#26358](https://github.com/facebook/react/pull/26358)) //<Andrew Clark>// - **[d1ad984db](https://github.com/facebook/react/commit/d1ad984db )**: [Flight] Add support for returning `undefined` from render ([#26349](https://github.com/facebook/react/pull/26349)) //<Sebastian Silbermann>// - **[39d4b9365](https://github.com/facebook/react/commit/39d4b9365 )**: [Internal tests] Close MessageChannel port to prevent leak ([#26357](https://github.com/facebook/react/pull/26357)) //<Andrew Clark>// - **[3706edb81](https://github.com/facebook/react/commit/3706edb81 )**: [Float][Fizz]: Don't preload nomodule scripts ([#26353](https://github.com/facebook/react/pull/26353)) //<Josh Story>// - **[2b003a5cc](https://github.com/facebook/react/commit/2b003a5cc )**: Split out ServerReferenceMetadata into Id and Bound Arguments ([#26351](https://github.com/facebook/react/pull/26351)) //<Sebastian Markbåge>// - **[62cd5af08](https://github.com/facebook/react/commit/62cd5af08 )**: Codemod redundant async act scopes ([#26350](https://github.com/facebook/react/pull/26350)) //<Andrew Clark>// - **[037378202](https://github.com/facebook/react/commit/037378202 )**: Internal `act`: Call scope function after an async gap ([#26347](https://github.com/facebook/react/pull/26347)) //<Andrew Clark>// - **[d8e49f2af](https://github.com/facebook/react/commit/d8e49f2af )**: Use setTimeout to schedule work on the server in Edge environments ([#26348](https://github.com/facebook/react/pull/26348)) //<Sebastian Markbåge>// - **[83643778b](https://github.com/facebook/react/commit/83643778b )**: Internal test helpers: Use Node's MessageChannel to queue task ([#26345](https://github.com/facebook/react/pull/26345)) //<Andrew Clark>// - **[44d380794](https://github.com/facebook/react/commit/44d380794 )**: Move internalAct to internal-test-utils package ([#26344](https://github.com/facebook/react/pull/26344)) //<Andrew Clark>// - **[d81447304](https://github.com/facebook/react/commit/d81447304 )**: [Internal API only] Delete non-awaited form of act ([#26339](https://github.com/facebook/react/pull/26339)) //<Andrew Clark>// - **[702fc984e](https://github.com/facebook/react/commit/702fc984e )**: Codemod act -> await act (4/?) ([#26338](https://github.com/facebook/react/pull/26338)) //<Andrew Clark>// - **[9fb2469a6](https://github.com/facebook/react/commit/9fb2469a6 )**: Restore definition of NativeMethods as an object for React Native ([#26341](https://github.com/facebook/react/pull/26341)) //<Rubén Norte>// - **[161f6ae42](https://github.com/facebook/react/commit/161f6ae42 )**: Codemod act -> await act (3/?) ([#26336](https://github.com/facebook/react/pull/26336)) //<Andrew Clark>// - **[58605f798](https://github.com/facebook/react/commit/58605f798 )**: Codemod act -> await act (2/?) ([#26335](https://github.com/facebook/react/pull/26335)) //<Andrew Clark>// - **[703c67560](https://github.com/facebook/react/commit/703c67560 )**: Codemod act -> await act (1/?) ([#26334](https://github.com/facebook/react/pull/26334)) //<Andrew Clark>// - **[b380c2485](https://github.com/facebook/react/commit/b380c2485 )**: Convert class equivlance tests to flushSync ([#26333](https://github.com/facebook/react/pull/26333)) //<Andrew Clark>// - **[8f812e75d](https://github.com/facebook/react/commit/8f812e75d )**: Refactor ReactFabricHostComponent ([#26323](https://github.com/facebook/react/pull/26323)) //<Rubén Norte>// - **[978fae4b4](https://github.com/facebook/react/commit/978fae4b4 )**: [Float][Fiber] implement a faster hydration match for hoistable elements ([#26154](https://github.com/facebook/react/pull/26154)) //<Josh Story>// - **[8a9f82ed5](https://github.com/facebook/react/commit/8a9f82ed5 )**: [Float][Fizz][Fiber] - Do not hoist elements with `itemProp` & hydrate more tolerantly in hoist contexts ([#26256](https://github.com/facebook/react/pull/26256)) //<Josh Story>// - **[3cad3a54e](https://github.com/facebook/react/commit/3cad3a54e )**: Use content hash for facebook-www builds ([#26331](https://github.com/facebook/react/pull/26331)) //<Jan Kassens>// - **[ba353a50a](https://github.com/facebook/react/commit/ba353a50a )**: Build: make version in build artifacts match ([#26329](https://github.com/facebook/react/pull/26329)) //<Jan Kassens>// - **[6e1756a5a](https://github.com/facebook/react/commit/6e1756a5a )**: Move suspended render logic to ensureRootIsScheduled ([#26328](https://github.com/facebook/react/pull/26328)) //<Andrew Clark>// - **[1528c5ccd](https://github.com/facebook/react/commit/1528c5ccd )**: SchedulerMock.unstable_yieldValue -> SchedulerMock.log ([#26312](https://github.com/facebook/react/pull/26312)) //<Andrew Clark>// - **[4bbac04cd](https://github.com/facebook/react/commit/4bbac04cd )**: Upgrade Flow to 0.201 ([#26326](https://github.com/facebook/react/pull/26326)) //<Jan Kassens>// - **[eb616a12f](https://github.com/facebook/react/commit/eb616a12f )**: Extract duplicated methods in Fabric and the legacy renderer to a shared module ([#26319](https://github.com/facebook/react/pull/26319)) //<Rubén Norte>// - **[49f741046](https://github.com/facebook/react/commit/49f741046 )**: Fix: Infinite act loop caused by wrong shouldYield ([#26317](https://github.com/facebook/react/pull/26317)) //<Andrew Clark>// - **[106ea1c58](https://github.com/facebook/react/commit/106ea1c58 )**: Support Iterables in Flight ([#26313](https://github.com/facebook/react/pull/26313)) //<Sebastian Markbåge>// - **[f905da227](https://github.com/facebook/react/commit/f905da227 )**: [Flight] Send server reference error chunks to the client ([#26293](https://github.com/facebook/react/pull/26293)) //<Hendrik Liebau>// - **[e0241b660](https://github.com/facebook/react/commit/e0241b660 )**: Simplify Webpack References by encoding file path + export name as single id ([#26300](https://github.com/facebook/react/pull/26300)) //<Sebastian Markbåge>// - **[25685d8a9](https://github.com/facebook/react/commit/25685d8a9 )**: Codemod tests to waitFor pattern (9/?) ([#26309](https://github.com/facebook/react/pull/26309)) //<Andrew Clark>// - **[64dde7082](https://github.com/facebook/react/commit/64dde7082 )**: Codemod tests to waitFor pattern (8/?) ([#26308](https://github.com/facebook/react/pull/26308)) //<Andrew Clark>// - **[3cb5afb82](https://github.com/facebook/react/commit/3cb5afb82 )**: Codemod tests to waitFor pattern (7/?) ([#26307](https://github.com/facebook/react/pull/26307)) //<Andrew Clark>// - **[e98695db9](https://github.com/facebook/react/commit/e98695db9 )**: Codemod tests to waitFor pattern (6/?) ([#26305](https://github.com/facebook/react/pull/26305)) //<Andrew Clark>// - **[9a52cc8bc](https://github.com/facebook/react/commit/9a52cc8bc )**: Convert ReactLazy-test to waitFor pattern ([#26304](https://github.com/facebook/react/pull/26304)) //<Andrew Clark>// - **[03462cfc7](https://github.com/facebook/react/commit/03462cfc7 )**: [Fizz] External runtime: fix bug in processing existing elements ([#26303](https://github.com/facebook/react/pull/26303)) //<mofeiZ>// - **[faacefb4d](https://github.com/facebook/react/commit/faacefb4d )**: Codemod tests to waitFor pattern (4/?) ([#26302](https://github.com/facebook/react/pull/26302)) //<Andrew Clark>// - **[06460b6fb](https://github.com/facebook/react/commit/06460b6fb )**: Remove unnecessary (and incorrect) code for compatibility with Paper in the Fabric version of GlobalResponderHandler ([#26290](https://github.com/facebook/react/pull/26290)) //<Rubén Norte>// - **[ce8a72fd4](https://github.com/facebook/react/commit/ce8a72fd4 )**: Codemod tests to waitFor pattern (2/?) ([#26296](https://github.com/facebook/react/pull/26296)) //<Andrew Clark>// - **[1f1f8eb55](https://github.com/facebook/react/commit/1f1f8eb55 )**: [Float][Fizz][Fiber]: Refactor <style> Resource implementation to group on flush ([#26280](https://github.com/facebook/react/pull/26280)) //<Josh Story>// - **[5c633a48f](https://github.com/facebook/react/commit/5c633a48f )**: Add back accidentally deleted test comments ([#26294](https://github.com/facebook/react/pull/26294)) //<Andrew Clark>// - **[b72ed698f](https://github.com/facebook/react/commit/b72ed698f )**: Fixed incorrect value returned as public instance from reconciler ([#26283](https://github.com/facebook/react/pull/26283)) //<Rubén Norte>// - **[25a8b9735](https://github.com/facebook/react/commit/25a8b9735 )**: Codemod tests to waitFor pattern (1/?) ([#26288](https://github.com/facebook/react/pull/26288)) //<Andrew Clark>// - **[e52446733](https://github.com/facebook/react/commit/e52446733 )**: New internal testing helpers: waitFor, waitForAll, waitForPaint ([#26285](https://github.com/facebook/react/pull/26285)) //<Andrew Clark>// - **[d49e0e0be](https://github.com/facebook/react/commit/d49e0e0be )**: Removed unused imperative events implementation from React Native renderer ([#26282](https://github.com/facebook/react/pull/26282)) //<Rubén Norte>// - **[41110021f](https://github.com/facebook/react/commit/41110021f )**: Fix: Selective hydration causing incorrect thenable type passed to DevTools ([#26275](https://github.com/facebook/react/pull/26275)) //<Andrew Clark>// - **[67a61d5bd](https://github.com/facebook/react/commit/67a61d5bd )**: [Flight Fixture] Show SSR Support with CSS ([#26263](https://github.com/facebook/react/pull/26263)) //<Sebastian Markbåge>// - **[40755c01a](https://github.com/facebook/react/commit/40755c01a )**: [Flight Fixture] Proxy requests through the global server instead of directly ([#26257](https://github.com/facebook/react/pull/26257)) //<Sebastian Markbåge>// - **[b2ae9ddb3](https://github.com/facebook/react/commit/b2ae9ddb3 )**: Cleanup enableSyncDefaultUpdate flag ([#26236](https://github.com/facebook/react/pull/26236)) //<Jan Kassens>// - **[6ff1733e6](https://github.com/facebook/react/commit/6ff1733e6 )**: [Float][Fizz][Fiber] support type for ReactDOM.preload() options ([#26239](https://github.com/facebook/react/pull/26239)) //<Josh Story>// - **[1173a17e6](https://github.com/facebook/react/commit/1173a17e6 )**: [Float][Fizz][Fiber] implement preconnect and prefetchDNS float methods ([#26237](https://github.com/facebook/react/pull/26237)) //<Josh Story>// - **[a8f971b7a](https://github.com/facebook/react/commit/a8f971b7a )**: Switch to mount dispatcher after use() when needed ([#26232](https://github.com/facebook/react/pull/26232)) //<Sophie Alpert>// - **[96cdeaf89](https://github.com/facebook/react/commit/96cdeaf89 )**: [Fizz Node] Fix null bytes written at text chunk boundaries ([#26228](https://github.com/facebook/react/pull/26228)) //<Sophie Alpert>// - **[c04b18070](https://github.com/facebook/react/commit/c04b18070 )**: Remove eventTime field from class Update type ([#26219](https://github.com/facebook/react/pull/26219)) //<Andrew Clark>// - **[60144a04d](https://github.com/facebook/react/commit/60144a04d )**: Split out Edge and Node implementations of the Flight Client ([#26187](https://github.com/facebook/react/pull/26187)) //<Sebastian Markbåge>// - **[70b0bbda7](https://github.com/facebook/react/commit/70b0bbda7 )**: [fizz][external-runtime] Fix: process mutation records before disconnecting ([#26169](https://github.com/facebook/react/pull/26169)) //<mofeiZ>// - **[c7967b194](https://github.com/facebook/react/commit/c7967b194 )**: Distribute bundles more evenly into CI shards ([#26208](https://github.com/facebook/react/pull/26208)) //<Sebastian Silbermann>// - **[bb1e3d0e1](https://github.com/facebook/react/commit/bb1e3d0e1 )**: Fail yarn build if any bundle fails to build ([#26207](https://github.com/facebook/react/pull/26207)) //<Sebastian Silbermann>// - **[62e6c4612](https://github.com/facebook/react/commit/62e6c4612 )**: Move Mutation/Persistence fork inline into the functions ([#26206](https://github.com/facebook/react/pull/26206)) //<Sebastian Markbåge>// - **[80cf4a099](https://github.com/facebook/react/commit/80cf4a099 )**: Update Closure Compiler ([#26205](https://github.com/facebook/react/pull/26205)) //<Sebastian Markbåge>// - **[6b6d0617e](https://github.com/facebook/react/commit/6b6d0617e )**: Update Rollup and related plugins to their most recent versions ([#24916](https://github.com/facebook/react/pull/24916)) //<Glenn 'devalias' Grant>// - **[bc38a3dfa](https://github.com/facebook/react/commit/bc38a3dfa )**: Update rollup config to use moduleSideEffects ([#26199](https://github.com/facebook/react/pull/26199)) //<Ming Ye>// - **[c9d9f524d](https://github.com/facebook/react/commit/c9d9f524d )**: Make enableCustomElementPropertySupport a dynamic flag in www build ([#26194](https://github.com/facebook/react/pull/26194)) //<Andrew Clark>// - **[189f70e17](https://github.com/facebook/react/commit/189f70e17 )**: Create a bunch of custom webpack vs unbundled node bundles ([#26172](https://github.com/facebook/react/pull/26172)) //<Sebastian Markbåge>// - **[fbf3bc315](https://github.com/facebook/react/commit/fbf3bc315 )**: Add `scale` as a unitless property ([#25601](https://github.com/facebook/react/pull/25601)) //<Jonny Burger>// Changelog: [General][Changed] - React Native sync for revisions fccf3a9...47cf4e5 jest_e2e[run_all_tests] Reviewed By: sammy-SC Differential Revision: D44090004 fbshipit-source-id: 6ac2d1d22a078d07ce011481063e78843bded28e |
||
|
|
26b22a6827 |
Remove hardcoded language from modules/index.js (#36435)
Summary: This PR aims to remove the hardcoded language constants to use common parser instead. It is a task of https://github.com/facebook/react-native/issues/34872: > [Codegen 89 - Assigned to MaeIg] Remove the const language variable from flow/modules/index.js and replace its usage with parser.language() > [Codegen 90 - Assigned to MaeIg] Remove the const language variable from typescript/modules/index.js and replace its usage with parser.language() ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Remove hardcoded language from modules/index.js to use common parser instead Pull Request resolved: https://github.com/facebook/react-native/pull/36435 Test Plan: yarn flow: <img width="145" alt="image" src="https://user-images.githubusercontent.com/40902940/224333480-600cefd0-9dc6-4142-8e88-db20785e49e6.png"> yarn lint: <img width="504" alt="image" src="https://user-images.githubusercontent.com/40902940/224333852-d510594f-053e-4866-8ceb-5e3e3d074bc2.png"> yarn test <img width="383" alt="image" src="https://user-images.githubusercontent.com/40902940/224333600-8c772829-2362-4943-895d-1949a0d88918.png"> Reviewed By: cortinico Differential Revision: D43979030 Pulled By: cipolleschi fbshipit-source-id: 39c5b99fc628620f1831ed8c4ee531eec0e866c4 |
||
|
|
d9f2cbe455 |
extract Visitor to parsers primitives (#36459)
Summary: Part of Codegen Issue https://github.com/facebook/react-native/issues/34872 > [Codegen 88] Move the Visitor.js file from parsers/flow/Visitor.js to parser-promitives.js. Copy the TSInterfaceDeclaration(node: $FlowFixMe) function and add it to the Visitor.js just copied. Remove the parsers/typescript/Visitor.js. Make sure we use the same Visitor in both parsers. (We will end up with a Visitor that is the union of the two, being able to handle both Flow and TS. In this specific case, this trade-off make sense as it allows us to remove one file, several duplicated lines for a small price.) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal][Changed] - Extract Visitor function to parsers primitives and remove both parsers visitor files Pull Request resolved: https://github.com/facebook/react-native/pull/36459 Test Plan: ``` yarn jest yarn flow yarn lint yarn format-check ``` Reviewed By: cortinico Differential Revision: D44021825 Pulled By: cipolleschi fbshipit-source-id: ea465404830402c44081143ee0539107dc75776c |
||
|
|
347d6f8d89 |
Extract throwIfMoreThanOneCodegenNativecommands error in error-utils (#36407)
Summary: Part of Codegen Umbrella Issue: https://github.com/facebook/react-native/issues/34872 > [Codegen 99] Extract the throwIfMoreThanOneCodegenNativecommands error in the error-utils.js file and extract the error code from [Flow](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/flow/components/index.js#L111-L133) and [TS](https://github.com/facebook/react-native/blob/main/packages/react-native-codegen/src/parsers/typescript/components/index.js#L112-L114) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Extract throwIfMoreThanOneCodegenNativecommands error in error-utils Pull Request resolved: https://github.com/facebook/react-native/pull/36407 Test Plan: `yarn jest react-native-codegen` Reviewed By: christophpurrer Differential Revision: D43912403 Pulled By: cipolleschi fbshipit-source-id: 1c51fc01465a1baa5f06ccea09c3342584bb82cc |
||
|
|
6a395cb2d7 |
Change PerformanceApiExample to use ModulePathing (#36478)
Summary: Recent integration from Windows brought in PerformanceApiExample that uses relative pathing to access react-native library. This causes us to have to override the file since our file structure is different. https://github.com/microsoft/react-native-windows/issues/11373 This PR changes the example to use module pathing instead. ## Changelog [GENERAL] [CHANGED] - Change PerformanceApiExample to use ModulePathing Pull Request resolved: https://github.com/facebook/react-native/pull/36478 Test Plan: Tested and passed Windows tests Reviewed By: rshest Differential Revision: D44089501 Pulled By: javache fbshipit-source-id: 99993a4f81556b4fef7c5d15af26b20df960ebf9 |
||
|
|
43986e8c72 |
chore: Add functionTypeAnnotation to codegen Parser class (#36468)
Summary: This PR adds a `functionTypeAnnotation` function to the codegen Parser class and implements it in the Flow and TypeScript parsers as requested on https://github.com/facebook/react-native/issues/34872, refactoring the `throwIfModuleTypeIsUnsupported` function to accept a `Parser` instead of a `ParserType` and use the newly created function instead of the `if (language)` logic. ## Changelog [Internal] [Added] - Add `functionTypeAnnotation` to codegen Parser class Pull Request resolved: https://github.com/facebook/react-native/pull/36468 Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green  Reviewed By: cipolleschi Differential Revision: D44056853 Pulled By: rshest fbshipit-source-id: f22b9efe53df16f7916eb1a9cea8b9531f1194f5 |
||
|
|
b89358263a |
Use by default new Performance API implementation if available
Summary: ## Changelog: [Internal] - Now that Performance API implementation is getting close to the final stage, it should be safe to replace the `global.performance` instance with the corresponding new implementation. This is done *only* if the actual native implementation is present, however (otherwise the behaviour will be exactly the same as before). Currently this is the case for all VR apps, Catalyst and very soon will be the case for fb4a/ios. Reviewed By: cipolleschi Differential Revision: D44057951 fbshipit-source-id: 7ccff4a4930175def69ef4d8a44335fbbd4a5df4 |
||
|
|
102e40a88d |
Disable Android platform for more failing tests
Reviewed By: jselbo Differential Revision: D44022065 fbshipit-source-id: 29568cdf2703eec8fb020b79ea93873ab7807050 |
||
|
|
57a2508ae6 |
Back out "React Native sync for revisions fccf3a9...f828bad"
Summary: Changelog: [Internal][Fixed] - Reverting the React sync because it's causing some JS errors. Original commit changeset: 8ac9754c5ffe Original Phabricator Diff: D44024996 Reviewed By: kassens Differential Revision: D44069453 fbshipit-source-id: f3985cc98fea17393df12673aa8b708c988b7e80 |
||
|
|
534a0499c7 |
Back out "Remove direct references to the global and untyped nativeFabricUIManager"
Summary: Changelog: [Internal][Fixed] - Reverting the React sync because it's causing some JS errors. Original commit changeset: d8300acb5dab Original Phabricator Diff: D44029301 Reviewed By: kassens Differential Revision: D44069428 fbshipit-source-id: cad6a936ebffaa2672a96460ab2c171b30db2def |
||
|
|
06f054c852 |
Back out "Create feature flag for DOM trees in Fabric"
Summary: Changelog: [Internal][Fixed] - Reverting the React sync because it's causing some JS errors. Original commit changeset: 77bb1ee4faaa Original Phabricator Diff: D43981608 Reviewed By: kassens Differential Revision: D44069455 fbshipit-source-id: d928185e1dd7f4baf5bca1d08a21988da6fd7edc |
||
|
|
cbdbb47467 |
Refactor: Move ModuleProvider param to the end in TurboModuleBinding::install()
Summary: For the TurboModule interop layer, we'll pass in a second ModuleProvider. We'll default that second parameter to null, when the interop layer is disabled. This change will make that easier. Changelog: [General][Changed] - Re-organize the parameters of TurboModuleBinding::install() Reviewed By: javache, cortinico Differential Revision: D43993199 fbshipit-source-id: 2d339cab1f9bfe481f4b72401caa203cd7536da1 |
||
|
|
aa28ea01d2 |
Refactor: Simplify signature of TurboModuleBinding::getModule
Summary: Previously, the signature of TurboModuleBinding::getModule was https://www.internalfb.com/code/fbsource/[839b8756fb58bf8cfa38a7d9f90b4b2b99889a37]/xplat/jsi/jsi/jsi.h?lines=111-112 **Problem:** TurboModuleBinding::getModule couldn't be called from [global.nativeModuleProxy](https://www.internalfb.com/code/fbsource/[cacaf79996c24c52fcedc90933b77dcf3411cf54]/xplat/ReactNative/venice/ReactInstance.cpp?lines=25-46) (i.e: jsi::HostObject::get), where only the prop name was available: https://www.internalfb.com/code/fbsource/[839b8756fb58bf8cfa38a7d9f90b4b2b99889a37]/xplat/jsi/jsi/jsi.h?lines=133 ## Changes This diff simplifies the signature of TurboModuleBinding::getModule to accept only what it needs: a jsi::Runtime, and moduleName This way, TurboModuleBinding::getModule can be called from: - jsi::HostFunction (for [global.__turboModuleProxy](https://www.internalfb.com/code/fbsource/[cc6106d532afd3f179b586d6acb4e99edb09bb96]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp?lines=34-48)) - **new:** jsi::HostObject::get (for [global.nativeModuleProxy](https://www.internalfb.com/code/fbsource/[cacaf79996c24c52fcedc90933b77dcf3411cf54]/xplat/ReactNative/venice/ReactInstance.cpp?lines=25-46)). Changelog: [Internal] Reviewed By: javache, cortinico Differential Revision: D43993198 fbshipit-source-id: e1207a129b1033f96d2753c88d372bb7eb4364f3 |
||
|
|
2d41e6642e |
Fix types + documentation for CellRendererComponent
Summary: CellRendererComponent can be given a more useful description, and more constrained type, to ensure it is used more correctly. Changelog: [General][Fixed] - Fix types + documentation for CellRendererComponent Reviewed By: yungsters Differential Revision: D43925572 fbshipit-source-id: 26aae6a2df989993c97709ffbf1544df7cbae036 |
||
|
|
ccbbcaab9c |
Fix layout width calculation in onTextLayout (#36222)
Summary: There is a rounding issue in layout calculation when using onTextLayout method in Text component on Android. As you can see in the example below onTextLayout returns 3 lines, but in fact text is rendered in 2 lines: <img width="775" alt="Screenshot 2023-02-19 at 23 48 53" src="https://user-images.githubusercontent.com/8476339/220177419-de183ccd-a250-4131-ad05-907fdb791c75.png"> This happens because `(int) width` casting works like `Math.floor`, but after changing it to `Math.round` we get correct result: <img width="775" alt="Screenshot 2023-02-19 at 23 51 11" src="https://user-images.githubusercontent.com/8476339/220177859-93474c43-ed87-4c1b-986c-2817b29b78be.png"> ## Changelog [ANDROID] [FIXED] - Fix layout width calculation in onTextLayout <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> Pull Request resolved: https://github.com/facebook/react-native/pull/36222 Test Plan: This issue can be tricky to reproduce as width calculation depends on device width. I'm attaching code that I used to reproduce it. You need to tap on the screen to run through different sentences and sooner or later you will get the one with this rounding issue. <details> <summary>Code to reproduce</summary> ```js import React, { useState, useEffect } from 'react' import { SafeAreaView, Text, View } from 'react-native' function App() { const [state, setState] = useState({ index: 0, lines: [], sentences: [], }) const onTextLayout = (event) => { const lines = event.nativeEvent.lines console.log(JSON.stringify(lines, null, 2)) setState(state => ({ ...state, lines })) } useEffect(() => { fetch('https://content.duoreading.io/20-the-adventures-of-tom-sawyer/translations/english.json') .then(response => response.text()) .then(response => { setState(state => ({ ...state, sentences: JSON.parse(response) })) }) }, []) return ( <SafeAreaView style={{ flex: 1, padding: 30 }}> <View style={{ flex: 1 }} onTouchStart={() => setState(state => ({ ...state, index: state.index + 1 }))}> <Text style={{ fontSize: 22 }} onTextLayout={onTextLayout}> {state.sentences[state.index]} </Text> {state.lines.map((line, index) => ( <View key={index} style={{ position: 'absolute', top: line.y, left: line.x, width: line.width, height: line.height, opacity: 0.3, backgroundColor: ['red', 'yellow', 'blue'][index % 3], }}> </View> ))} </View> </SafeAreaView> ) } export default App ``` </details> Reviewed By: christophpurrer Differential Revision: D43907184 Pulled By: javache fbshipit-source-id: faef757e77e759b5d9ea26da21c9e2b396dc9ff1 |
||
|
|
19cf5c9af7 |
Update the hermes packages to 0.10.0 in 'fbsource'
Reviewed By: yungsters Differential Revision: D43959013 fbshipit-source-id: f785209f5dfe3e76f96525cc96f6cc399f8e7f5f |
||
|
|
5b597b5ff9 |
FileReader#readAsArrayBuffer (#36332)
Summary: Fixes a number of issues with third party libraries that use `Blob#arrayBuffer` or `FileReader#readAsArrayBuffer`, including https://github.com/facebook/react-native/issues/30769 #34402 https://github.com/facebook/react-native/issues/20091 #21209 ## Changelog [INTERNAL] [FIXED] - Implemented FileReader#readAsArrayBuffer Pull Request resolved: https://github.com/facebook/react-native/pull/36332 Test Plan: Added a test which fails against current release but passes after code changes. Reviewed By: christophpurrer Differential Revision: D43907171 Pulled By: javache fbshipit-source-id: 73d622ec569a282b6394732b9a0dc687b447fb62 |
||
|
|
58d88ec91c |
Mitigate issues with Sandcastle simulators
Summary: This change updates the offline mirrors and remove the need for destinations in Sandcastle jobs, to mitigate the problem with the oss jobs we are facing. allow-large-files ## Changelog: [internal] - update offline mirror and don't run tests on simulators Reviewed By: robhogan, dmytrorykun Differential Revision: D44056468 fbshipit-source-id: c4db37a715eb1307a01a33b1917573f67ed0e2a7 |
||
|
|
d595fbcc5a |
Allow out-of-range initialScrollIndex after first scroll
Summary: The contract here is that `initialScrollIndex` only applies once, right after the components mount. There is other code still relying on live `initialScrollIndex`, which is allowed to become stale. E.g. after removing items. I looked at a larger change of only ever using `initialScrollIndex` in the start, so we have a consistent value. We also ideally should fix up the logic relying on it for the scroll to top optimization. That series of changes is more involved than I want to spend time on, so this just avoids the check once we have triggered a scroll, where the rest of the code is UT'd to be permissive if it drifts out of allowed. Changelog: [General][Fixed] - Allow out-of-range initialScrollIndex after first scroll Reviewed By: yungsters Differential Revision: D43926656 fbshipit-source-id: bd09bd9a9aa6b3b5f07209dac8652c9374a762c4 |
||
|
|
d8b4737ca6 |
Fix duplicate [RCTConvert UIUserInterfaceStyle:]
Summary: After https://github.com/facebook/react-native/pull/36122 we have two of these. This change consolidates the two category methods to be part of the base RCTConvert class instead. Changelog: [iOS][Fixed] - Fix duplicate [RCTConvert UIUserInterfaceStyle:] Reviewed By: cipolleschi Differential Revision: D44050929 fbshipit-source-id: dd216545e6194446c593cd693072f3959d653d7f |
||
|
|
01f2936de1 |
Create feature flag for DOM trees in Fabric
Summary: This adds a feature flag to enable all the new DOM traversal and layout APIs (in https://github.com/react-native-community/discussions-and-proposals/pull/607). Changelog: [Internal] Reviewed By: rshest Differential Revision: D43981608 fbshipit-source-id: 77bb1ee4faaaf30cfc8bb2e493763b168702f498 |
||
|
|
aee7d96fcd |
Remove direct references to the global and untyped nativeFabricUIManager
Summary: We shouldn't be accessing `nativeFabricUIManager` directly because it's untyped and makes it harder to mock the values. This migrates all existing usages to the `FabricUIManager` module. In the long term, we should refactor this global binding as a TurboModule. Changelog: [internal] Reviewed By: yungsters Differential Revision: D44029301 fbshipit-source-id: d8300acb5dabe4ba27c7f0242230e203c0e8c674 |
||
|
|
ea57c923b4 |
React Native sync for revisions fccf3a9...f828bad
Summary: This sync includes the following changes: - **[f828bad38](https://github.com/facebook/react/commit/f828bad38 )**: Extracted definition and access to public instances to a separate module in Fabric ([#26321](https://github.com/facebook/react/pull/26321)) //<Rubén Norte>// - **[131768166](https://github.com/facebook/react/commit/131768166 )**: Support Context as renderable node ([#25641](https://github.com/facebook/react/pull/25641)) //<Andrew Clark>// - **[d4f58c3b8](https://github.com/facebook/react/commit/d4f58c3b8 )**: Support Promise as a renderable node ([#25634](https://github.com/facebook/react/pull/25634)) //<Andrew Clark>// - **[633461486](https://github.com/facebook/react/commit/633461486 )**: Add disableLegacyContext test gates where needed ([#26371](https://github.com/facebook/react/pull/26371)) //<Andrew Clark>// - **[432ffc9d0](https://github.com/facebook/react/commit/432ffc9d0 )**: Convert more Scheduler.unstable_flushAll in tests to new test utils ([#26369](https://github.com/facebook/react/pull/26369)) //<Tianyu Yao>// - **[69fd78fe3](https://github.com/facebook/react/commit/69fd78fe3 )**: Update Float tests to check for specific errors ([#26367](https://github.com/facebook/react/pull/26367)) //<Andrew Clark>// - **[93c10dfa6](https://github.com/facebook/react/commit/93c10dfa6 )**: flushSync: Exhaust queue even if something throws ([#26366](https://github.com/facebook/react/pull/26366)) //<Andrew Clark>// - **[be353d251](https://github.com/facebook/react/commit/be353d251 )**: [Flight Reply] Add undefined and Iterable Support ([#26365](https://github.com/facebook/react/pull/26365)) //<Sebastian Markbåge>// - **[ef8bdbecb](https://github.com/facebook/react/commit/ef8bdbecb )**: [Flight Reply] Add Reply Encoding ([#26360](https://github.com/facebook/react/pull/26360)) //<Sebastian Markbåge>// - **[a8875eab7](https://github.com/facebook/react/commit/a8875eab7 )**: Update more tests to not rely on sync queuing ([#26358](https://github.com/facebook/react/pull/26358)) //<Andrew Clark>// - **[d1ad984db](https://github.com/facebook/react/commit/d1ad984db )**: [Flight] Add support for returning `undefined` from render ([#26349](https://github.com/facebook/react/pull/26349)) //<Sebastian Silbermann>// - **[39d4b9365](https://github.com/facebook/react/commit/39d4b9365 )**: [Internal tests] Close MessageChannel port to prevent leak ([#26357](https://github.com/facebook/react/pull/26357)) //<Andrew Clark>// - **[3706edb81](https://github.com/facebook/react/commit/3706edb81 )**: [Float][Fizz]: Don't preload nomodule scripts ([#26353](https://github.com/facebook/react/pull/26353)) //<Josh Story>// - **[2b003a5cc](https://github.com/facebook/react/commit/2b003a5cc )**: Split out ServerReferenceMetadata into Id and Bound Arguments ([#26351](https://github.com/facebook/react/pull/26351)) //<Sebastian Markbåge>// - **[62cd5af08](https://github.com/facebook/react/commit/62cd5af08 )**: Codemod redundant async act scopes ([#26350](https://github.com/facebook/react/pull/26350)) //<Andrew Clark>// - **[037378202](https://github.com/facebook/react/commit/037378202 )**: Internal `act`: Call scope function after an async gap ([#26347](https://github.com/facebook/react/pull/26347)) //<Andrew Clark>// - **[d8e49f2af](https://github.com/facebook/react/commit/d8e49f2af )**: Use setTimeout to schedule work on the server in Edge environments ([#26348](https://github.com/facebook/react/pull/26348)) //<Sebastian Markbåge>// - **[83643778b](https://github.com/facebook/react/commit/83643778b )**: Internal test helpers: Use Node's MessageChannel to queue task ([#26345](https://github.com/facebook/react/pull/26345)) //<Andrew Clark>// - **[44d380794](https://github.com/facebook/react/commit/44d380794 )**: Move internalAct to internal-test-utils package ([#26344](https://github.com/facebook/react/pull/26344)) //<Andrew Clark>// - **[d81447304](https://github.com/facebook/react/commit/d81447304 )**: [Internal API only] Delete non-awaited form of act ([#26339](https://github.com/facebook/react/pull/26339)) //<Andrew Clark>// - **[702fc984e](https://github.com/facebook/react/commit/702fc984e )**: Codemod act -> await act (4/?) ([#26338](https://github.com/facebook/react/pull/26338)) //<Andrew Clark>// - **[9fb2469a6](https://github.com/facebook/react/commit/9fb2469a6 )**: Restore definition of NativeMethods as an object for React Native ([#26341](https://github.com/facebook/react/pull/26341)) //<Rubén Norte>// - **[161f6ae42](https://github.com/facebook/react/commit/161f6ae42 )**: Codemod act -> await act (3/?) ([#26336](https://github.com/facebook/react/pull/26336)) //<Andrew Clark>// - **[58605f798](https://github.com/facebook/react/commit/58605f798 )**: Codemod act -> await act (2/?) ([#26335](https://github.com/facebook/react/pull/26335)) //<Andrew Clark>// - **[703c67560](https://github.com/facebook/react/commit/703c67560 )**: Codemod act -> await act (1/?) ([#26334](https://github.com/facebook/react/pull/26334)) //<Andrew Clark>// - **[b380c2485](https://github.com/facebook/react/commit/b380c2485 )**: Convert class equivlance tests to flushSync ([#26333](https://github.com/facebook/react/pull/26333)) //<Andrew Clark>// - **[8f812e75d](https://github.com/facebook/react/commit/8f812e75d )**: Refactor ReactFabricHostComponent ([#26323](https://github.com/facebook/react/pull/26323)) //<Rubén Norte>// - **[978fae4b4](https://github.com/facebook/react/commit/978fae4b4 )**: [Float][Fiber] implement a faster hydration match for hoistable elements ([#26154](https://github.com/facebook/react/pull/26154)) //<Josh Story>// - **[8a9f82ed5](https://github.com/facebook/react/commit/8a9f82ed5 )**: [Float][Fizz][Fiber] - Do not hoist elements with `itemProp` & hydrate more tolerantly in hoist contexts ([#26256](https://github.com/facebook/react/pull/26256)) //<Josh Story>// - **[3cad3a54e](https://github.com/facebook/react/commit/3cad3a54e )**: Use content hash for facebook-www builds ([#26331](https://github.com/facebook/react/pull/26331)) //<Jan Kassens>// - **[ba353a50a](https://github.com/facebook/react/commit/ba353a50a )**: Build: make version in build artifacts match ([#26329](https://github.com/facebook/react/pull/26329)) //<Jan Kassens>// - **[6e1756a5a](https://github.com/facebook/react/commit/6e1756a5a )**: Move suspended render logic to ensureRootIsScheduled ([#26328](https://github.com/facebook/react/pull/26328)) //<Andrew Clark>// - **[1528c5ccd](https://github.com/facebook/react/commit/1528c5ccd )**: SchedulerMock.unstable_yieldValue -> SchedulerMock.log ([#26312](https://github.com/facebook/react/pull/26312)) //<Andrew Clark>// - **[4bbac04cd](https://github.com/facebook/react/commit/4bbac04cd )**: Upgrade Flow to 0.201 ([#26326](https://github.com/facebook/react/pull/26326)) //<Jan Kassens>// - **[eb616a12f](https://github.com/facebook/react/commit/eb616a12f )**: Extract duplicated methods in Fabric and the legacy renderer to a shared module ([#26319](https://github.com/facebook/react/pull/26319)) //<Rubén Norte>// - **[49f741046](https://github.com/facebook/react/commit/49f741046 )**: Fix: Infinite act loop caused by wrong shouldYield ([#26317](https://github.com/facebook/react/pull/26317)) //<Andrew Clark>// - **[106ea1c58](https://github.com/facebook/react/commit/106ea1c58 )**: Support Iterables in Flight ([#26313](https://github.com/facebook/react/pull/26313)) //<Sebastian Markbåge>// - **[f905da227](https://github.com/facebook/react/commit/f905da227 )**: [Flight] Send server reference error chunks to the client ([#26293](https://github.com/facebook/react/pull/26293)) //<Hendrik Liebau>// - **[e0241b660](https://github.com/facebook/react/commit/e0241b660 )**: Simplify Webpack References by encoding file path + export name as single id ([#26300](https://github.com/facebook/react/pull/26300)) //<Sebastian Markbåge>// - **[25685d8a9](https://github.com/facebook/react/commit/25685d8a9 )**: Codemod tests to waitFor pattern (9/?) ([#26309](https://github.com/facebook/react/pull/26309)) //<Andrew Clark>// - **[64dde7082](https://github.com/facebook/react/commit/64dde7082 )**: Codemod tests to waitFor pattern (8/?) ([#26308](https://github.com/facebook/react/pull/26308)) //<Andrew Clark>// - **[3cb5afb82](https://github.com/facebook/react/commit/3cb5afb82 )**: Codemod tests to waitFor pattern (7/?) ([#26307](https://github.com/facebook/react/pull/26307)) //<Andrew Clark>// - **[e98695db9](https://github.com/facebook/react/commit/e98695db9 )**: Codemod tests to waitFor pattern (6/?) ([#26305](https://github.com/facebook/react/pull/26305)) //<Andrew Clark>// - **[9a52cc8bc](https://github.com/facebook/react/commit/9a52cc8bc )**: Convert ReactLazy-test to waitFor pattern ([#26304](https://github.com/facebook/react/pull/26304)) //<Andrew Clark>// - **[03462cfc7](https://github.com/facebook/react/commit/03462cfc7 )**: [Fizz] External runtime: fix bug in processing existing elements ([#26303](https://github.com/facebook/react/pull/26303)) //<mofeiZ>// - **[faacefb4d](https://github.com/facebook/react/commit/faacefb4d )**: Codemod tests to waitFor pattern (4/?) ([#26302](https://github.com/facebook/react/pull/26302)) //<Andrew Clark>// - **[06460b6fb](https://github.com/facebook/react/commit/06460b6fb )**: Remove unnecessary (and incorrect) code for compatibility with Paper in the Fabric version of GlobalResponderHandler ([#26290](https://github.com/facebook/react/pull/26290)) //<Rubén Norte>// - **[ce8a72fd4](https://github.com/facebook/react/commit/ce8a72fd4 )**: Codemod tests to waitFor pattern (2/?) ([#26296](https://github.com/facebook/react/pull/26296)) //<Andrew Clark>// - **[1f1f8eb55](https://github.com/facebook/react/commit/1f1f8eb55 )**: [Float][Fizz][Fiber]: Refactor <style> Resource implementation to group on flush ([#26280](https://github.com/facebook/react/pull/26280)) //<Josh Story>// - **[5c633a48f](https://github.com/facebook/react/commit/5c633a48f )**: Add back accidentally deleted test comments ([#26294](https://github.com/facebook/react/pull/26294)) //<Andrew Clark>// - **[b72ed698f](https://github.com/facebook/react/commit/b72ed698f )**: Fixed incorrect value returned as public instance from reconciler ([#26283](https://github.com/facebook/react/pull/26283)) //<Rubén Norte>// - **[25a8b9735](https://github.com/facebook/react/commit/25a8b9735 )**: Codemod tests to waitFor pattern (1/?) ([#26288](https://github.com/facebook/react/pull/26288)) //<Andrew Clark>// - **[e52446733](https://github.com/facebook/react/commit/e52446733 )**: New internal testing helpers: waitFor, waitForAll, waitForPaint ([#26285](https://github.com/facebook/react/pull/26285)) //<Andrew Clark>// - **[d49e0e0be](https://github.com/facebook/react/commit/d49e0e0be )**: Removed unused imperative events implementation from React Native renderer ([#26282](https://github.com/facebook/react/pull/26282)) //<Rubén Norte>// - **[41110021f](https://github.com/facebook/react/commit/41110021f )**: Fix: Selective hydration causing incorrect thenable type passed to DevTools ([#26275](https://github.com/facebook/react/pull/26275)) //<Andrew Clark>// - **[67a61d5bd](https://github.com/facebook/react/commit/67a61d5bd )**: [Flight Fixture] Show SSR Support with CSS ([#26263](https://github.com/facebook/react/pull/26263)) //<Sebastian Markbåge>// - **[40755c01a](https://github.com/facebook/react/commit/40755c01a )**: [Flight Fixture] Proxy requests through the global server instead of directly ([#26257](https://github.com/facebook/react/pull/26257)) //<Sebastian Markbåge>// - **[b2ae9ddb3](https://github.com/facebook/react/commit/b2ae9ddb3 )**: Cleanup enableSyncDefaultUpdate flag ([#26236](https://github.com/facebook/react/pull/26236)) //<Jan Kassens>// - **[6ff1733e6](https://github.com/facebook/react/commit/6ff1733e6 )**: [Float][Fizz][Fiber] support type for ReactDOM.preload() options ([#26239](https://github.com/facebook/react/pull/26239)) //<Josh Story>// - **[1173a17e6](https://github.com/facebook/react/commit/1173a17e6 )**: [Float][Fizz][Fiber] implement preconnect and prefetchDNS float methods ([#26237](https://github.com/facebook/react/pull/26237)) //<Josh Story>// - **[a8f971b7a](https://github.com/facebook/react/commit/a8f971b7a )**: Switch to mount dispatcher after use() when needed ([#26232](https://github.com/facebook/react/pull/26232)) //<Sophie Alpert>// - **[96cdeaf89](https://github.com/facebook/react/commit/96cdeaf89 )**: [Fizz Node] Fix null bytes written at text chunk boundaries ([#26228](https://github.com/facebook/react/pull/26228)) //<Sophie Alpert>// - **[c04b18070](https://github.com/facebook/react/commit/c04b18070 )**: Remove eventTime field from class Update type ([#26219](https://github.com/facebook/react/pull/26219)) //<Andrew Clark>// - **[60144a04d](https://github.com/facebook/react/commit/60144a04d )**: Split out Edge and Node implementations of the Flight Client ([#26187](https://github.com/facebook/react/pull/26187)) //<Sebastian Markbåge>// - **[70b0bbda7](https://github.com/facebook/react/commit/70b0bbda7 )**: [fizz][external-runtime] Fix: process mutation records before disconnecting ([#26169](https://github.com/facebook/react/pull/26169)) //<mofeiZ>// - **[c7967b194](https://github.com/facebook/react/commit/c7967b194 )**: Distribute bundles more evenly into CI shards ([#26208](https://github.com/facebook/react/pull/26208)) //<Sebastian Silbermann>// - **[bb1e3d0e1](https://github.com/facebook/react/commit/bb1e3d0e1 )**: Fail yarn build if any bundle fails to build ([#26207](https://github.com/facebook/react/pull/26207)) //<Sebastian Silbermann>// - **[62e6c4612](https://github.com/facebook/react/commit/62e6c4612 )**: Move Mutation/Persistence fork inline into the functions ([#26206](https://github.com/facebook/react/pull/26206)) //<Sebastian Markbåge>// - **[80cf4a099](https://github.com/facebook/react/commit/80cf4a099 )**: Update Closure Compiler ([#26205](https://github.com/facebook/react/pull/26205)) //<Sebastian Markbåge>// - **[6b6d0617e](https://github.com/facebook/react/commit/6b6d0617e )**: Update Rollup and related plugins to their most recent versions ([#24916](https://github.com/facebook/react/pull/24916)) //<Glenn 'devalias' Grant>// - **[bc38a3dfa](https://github.com/facebook/react/commit/bc38a3dfa )**: Update rollup config to use moduleSideEffects ([#26199](https://github.com/facebook/react/pull/26199)) //<Ming Ye>// - **[c9d9f524d](https://github.com/facebook/react/commit/c9d9f524d )**: Make enableCustomElementPropertySupport a dynamic flag in www build ([#26194](https://github.com/facebook/react/pull/26194)) //<Andrew Clark>// - **[189f70e17](https://github.com/facebook/react/commit/189f70e17 )**: Create a bunch of custom webpack vs unbundled node bundles ([#26172](https://github.com/facebook/react/pull/26172)) //<Sebastian Markbåge>// - **[fbf3bc315](https://github.com/facebook/react/commit/fbf3bc315 )**: Add `scale` as a unitless property ([#25601](https://github.com/facebook/react/pull/25601)) //<Jonny Burger>// Changelog: [General][Changed] - React Native sync for revisions fccf3a9...f828bad jest_e2e[run_all_tests] Reviewed By: robhogan, rshest Differential Revision: D44024996 fbshipit-source-id: 8ac9754c5ffe12bd5d9c3499515c0925bd411f70 |
||
|
|
ca0d565a3c |
Back out "1/2 TextInput accessibilityErrorMessage (Talkback, Android)"
Summary: This diff is reverting PR https://github.com/facebook/react-native/pull/33468 Due to an increase of java.lang.IllegalStateException caused by the PR Original commit changeset: cd80e9a1be8f Original Phabricator Diff: D38410635 Changelog: [Android][Fixed] - removed logic that calls the [AccessibilityNodeInfo#setError][10] and [#setContentInvalid][13] method to display the error message in the TextInput - Revert of PR https://github.com/facebook/react-native/pull/33468 Reviewed By: NickGerleman, makovkastar Differential Revision: D44032331 fbshipit-source-id: 732ed0cf23e4f30ae00c51dace851a3fdfe65c01 |
||
|
|
21d530208f |
Extracting Platform Specific TM code to break dependency cycle between ReactCommon and React-Core (#36461)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36461 This change breaks a dependency cycle between `ReactCommon` and `React-Core`. `React-Core` depends on `ReactCommon` to have access to the various `TurboModule` native files. `ReactCommon` depends on `React-Core` because the content of the `core/platform/ios` folder and the `samples` folder needs to access the `RCTBridge` and other files in Core. To break the circular dependency, we introduced two new `podspecs`: * `React-NativeModulesApple` for the content of `core/platform/ios`. * `ReactCommon-Samples` for the content of the `samples` folder. In this way, the new dependencies are linear as `React-NativeModulesApple` and `ReactCommon-Samples` depends on `React-Core` and `ReactCommon` and `React-Core` only depends on `ReactCommon`. While doing this, we also make sure that all the include path are aligned, to limit the amount of breaking changes. ## Changelog: [iOS][Breaking] - Split the `ReactCommon/react/nativemodule/core/platform/ios` and `ReactCommon/react/nativemodule/samples` in two separate pods to break circular dependencies. Reviewed By: mdvacca Differential Revision: D44023865 fbshipit-source-id: a97569506350db5735ac5534b1592471de196cbe |