Summary:
changelog: [internal]
Original commit changeset: 290ae428a720
Original Phabricator Diff: D37881453 (e98a835bfc)
in the original diff I made a mistake. The default value for RN is never, we override it in one of our subclasses.
Reviewed By: cortinico
Differential Revision: D37884715
fbshipit-source-id: 3c5b5ef5550120034e33ae9047292f38159dea3e
Summary:
This diff is reverting D37801394 (51f49ca998)
D37801394 (51f49ca998) has been identified to be causing the following test or build failures:
Tests affected:
- https://www.internalfb.com/intern/test/844424989736255/
Here's the Multisect link:
https://www.internalfb.com/intern/testinfra/multisect/1062919
Here are the tasks that are relevant to this breakage:
T116036972: 105 tests started failing for oncall bridgeless_jest_e2e_tests in the last 2 weeks
We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.
**To Address Land blocker from previous version (see pic):**
{F752642767}
```
Changelog:
[General][Change] - Revert breaking change in MPay order creation screen (user input in duplicated, and then not deletable. See T126127801 for more details)
```
Reviewed By: philIip
Differential Revision: D37863306
fbshipit-source-id: 24f2448d7bc9761ec31edd6f6b97c668171027d3
Summary:
Now that [exact_empty_objects has been enabled](https://fb.workplace.com/groups/flowlang/posts/1092665251339137), we can codemod `{...null}` to `{}` - they are now equivalent.
1) Run my one-off jscodeshift codemod
2) `scripts/flow/tool update-suppressions .` (as some suppressions move around due to the change)
drop-conflicts
Reviewed By: bradzacher
Differential Revision: D37834078
fbshipit-source-id: 6bf4913910e5597e5dd9d5161cd35deece6a7581
Summary:
Changelog: [RNTester][Internal] - Fix incorrect pointer event name in move test
We recently removed the '2' suffix from certain pointer event names and I forgot to update this test.
Reviewed By: lunaleaps
Differential Revision: D37857862
fbshipit-source-id: 6f37dce139772cd16d663961dbcbbf68dde83101
Summary:
Changelog: [iOS][Internal] - Implement offsetX/offsetY properties on the PointerEvent interface
Simple diff implementing the offsetX/offsetY properties on PointerEvent — thankfully the touch events already kept track of these so it was mostly a matter of forwarding that data to the pointer events.
Reviewed By: lunaleaps
Differential Revision: D37830139
fbshipit-source-id: 77f33a99393350d32cbe449e6a009bdeb2a12d08
Summary:
Automatically create a GitHub Release draft when a new React Native release is created.
The GitHub Release will be created by the same Circle CI job that publishes the package to npm.
This job will also upload the built Hermes binaries to the GitHub release.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D36646696
fbshipit-source-id: 0a863dc4e3215fc95f7852f8dc43858cdd852aaa
Summary:
This cleans up a bit our dependency list inside `ReactAndroid`. I've re-sorted the lists, and exported everything I could in the `gradle.properties`.
I wish we could move to the Gradle Version Catalog for Android, but that's not possible at the moment (it will make impossible for users to build from source).
## Changelog
[Internal] - Cleanup some of the dependencies inside ReactAndroid
Pull Request resolved: https://github.com/facebook/react-native/pull/34191
Test Plan: Will rely on a Green CircleCI
Reviewed By: huntie
Differential Revision: D37828614
Pulled By: cortinico
fbshipit-source-id: f433d08d691db4145e0c72ca4dab2f0350e4101f
Summary:
Changelog:
[general][change] - Use RuntimeConfig instead of VM Experiment Flag to set up the micro task queue.
Reviewed By: neildhar
Differential Revision: D37353947
fbshipit-source-id: 5c8f35c0a79d70cb0d234e881e55058cffb44ac8
Summary:
Changelog: [iOS][Internal] - Implement screenX/screenY properties on the PointerEvent interface
This diff implements the screenX/screenY properties which report the position of a pointer in the device's physical screen coordinates.
Reviewed By: lunaleaps
Differential Revision: D37794415
fbshipit-source-id: 6c39c3651812f99e66b93647579a2935598ef6f2
Summary:
The empty object literal `{}` now has the type `{}` - i.e. an exact empty object - rather than being unsealed.
Enable the option in the github flowconfigs
Changelog: [Internal]
Reviewed By: pieterv
Differential Revision: D37836634
fbshipit-source-id: 8ef0cfaf1d0420ae71723e04163f00c43c550e07
Summary:
A layout-impacting style change will trigger a layout effect hook within `TextInput`. This hook fires a ViewManager command to set the text input based on the known JS value: d82cd3cbce/Libraries/Components/TextInput/TextInput.js (L1009)
The JS value is determined using `value` if set, falling back to `defaultValue`. If a component uses `TextInput` as an uncontrolled component, and does not set this value, the command wipes text input back to the default value. This does not happen on re-render of the JS side, despite setting text prop, since the underlying native property never changes/triggers a rerender.
This change alters the logic to prefer `lastNativeText` instead of `defaultValue` when available, to retain the updated `TextInput` content on relayout.
Reviewed By: javache
Differential Revision: D37801394
fbshipit-source-id: d56c719d56bebac64553c731ce9fca8efc7feae9
Summary:
Turbo module codegen supports arrays in both Flow and TypeScript, but it only recognize `Array<T>` and `ReadonlyArray<T>` in TypeScript.
In this change, `T[]` and `readonly T[]` are made recognizable in codegen.
## Changelog
[General] [Added] - Support TypeScript array types for turbo module (module only)
Pull Request resolved: https://github.com/facebook/react-native/pull/34183
Test Plan: `yarn jest` passed in `packages/react-native-codegen`
Reviewed By: lunaleaps
Differential Revision: D37812638
Pulled By: cipolleschi
fbshipit-source-id: d63b0585497a43c274d50e1877baab5d1cc3f8fa
Summary: Changelog: [Internal] - Add an example of pointermove using AnimatedEvent
Reviewed By: vincentriemer
Differential Revision: D37769263
fbshipit-source-id: 25de0ae88b55148d23fa388768707ea859e9ae4d
Summary:
The RN Hermes Inspector keeps a mapping of pageId to
Connection. This mapping is created in the call to
enableDebugging. Later, when disableDebugging is invoked,
the inspector will iterate over the pageId to Connection map
to find which page to is being disabled.
The DecoratedRuntime enables debugging on construction, and
disables on destruction. When disabling debugging, the
DecoratedRuntime then passes the "naked" hermesRuntime,
which in turn gets checked against all connections' runtimes.
It turns our that ```HermesExecutorRuntimeAdapter::getRuntime```
returns the runtime **wrapped** by the DecoratedRuntime, and
not hermesRuntime itself.
This means that no connections match the request for
disabling debugging. Which means the Connection never
gets deleted, which in turns keep its underlying adapter (in
this case, the ```HermesRuntimeExecutorAdapter```) alive,
which has a shared_ptr to the runtime wrapped by the DecoratedRuntime.
Other than effectively leaking this connection (and thus the runtime),
this also causes an issue when the app tries to re-load the page -- at
which point the inspector will remove the old entry from the page to
connection mapping, thus initiating the destruction of the (leaked)
Runtime in a thread other than the thread that created the runtime.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D37809467
fbshipit-source-id: e73caa357a300a0d48e69aa3a1a8b00a97519f24
Summary:
Similarly to D37653146 (13a0556aaa), standardize on one type to refer to this.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D37658743
fbshipit-source-id: 9834cfc4bbe4ca1a19f10c2c8718e3f74b88d9b6
Summary:
The new props parsing path (introduced in https://www.internalfb.com/diff/D37051020 (af1eae9ea3)) resulted in opacity and backgroundColor being applied twice.
Specifically, the new prop setter path basically results in the ParagraphProps' textAttributes (via ConcreteComponentDescriptor.cloneProps, via ParagraphProps.setProp) to include opacity and backgroundColor, which is not desired as they are both applied again on view.
Similar issue faced in the past: https://www.internalfb.com/diff/D19764144 (8fe6883fea)
Changelog:
[Internal] - Prevent double application of opacity and backgroundColor on text
Reviewed By: ryancat
Differential Revision: D37801663
fbshipit-source-id: 4b5ebe5ff20b80833edb2141df883f33c69ab5d6
Summary:
Changelog: [iOS][Internal] - add x/y & pageX/Y implementations to PointerEvent interface
This diff adds the x/y properties, which are defined as aliases of clientX/clientY respectively. In addition this diff adds pageX/pageY which, while not definted as aliases of clientX/clientY, are effectively aliases in React Native since the root view is not scrollable (client and page points only differ on the web when a user has scrolled the document element).
Reviewed By: lunaleaps
Differential Revision: D37766818
fbshipit-source-id: c7ad3750460b1913889c6d1a55b4c1edc6918f5b
Summary:
Changelog: [RNTester][Internal] - Fix layout measurement in hoverable pointer attributes test
This diff addresses an issue I've found with the hoverable pointer attributes test where before it was measuring the view seemingly on mount and it appears that for *some reason* that would be incorrect on the first mount of the view. This diff ensures that doesn't happen by measuring the view JIT when an event is recieved instead.
Reviewed By: lunaleaps
Differential Revision: D37765614
fbshipit-source-id: 8594677d98be8d3d4e75dbf5394c92ca49355d6d
Summary:
Changelog: [iOS][internal] - Add twist property to PointerEvent interface
This adds the twist property to the PointerEvent implementation on iOS which similarly to tangentialPressure doesn't really apply so we default to a hard-coded value of 0.
Reviewed By: lunaleaps
Differential Revision: D37760511
fbshipit-source-id: f1fccfd6b5d07024cea83d86925a9bfc2e6cc8cf
Summary:
Changelog: [iOS][internal] - Add tangentialPressure property to PointerEvent interface
This diff adds the tangentialPressure property to the PointerEvent implementation on iOS. This one is pretty simple considering iOS doesn't have the concept of tangential pressure so we just hard code it to 0 as defined by the spec.
Reviewed By: lunaleaps
Differential Revision: D37759634
fbshipit-source-id: 7ca0e47267f5fde76ace2b96d05ea2e154cb4b8f
Summary:
This change replaces the text in `ColorStylesExample` with two different spans of nested text, which requires special attention with the native driver.
Changelog:
[Internal][Added] - Add Nested Text Animated Color RNTester Example
Reviewed By: genkikondo
Differential Revision: D37762708
fbshipit-source-id: 755e6dd922432781645cd84749a77f29ec57665d
Summary:
Before this change, during the "Start Packager" Xcode build step that runs the packager, `packager.sh` was using my system node version and not the one from `nvm` that is meant to be used with the project.
## Changelog
[iOS] [Fixed] - Use `NODE_BINARY` from `.xcode.env` when running packager from Xcode
Pull Request resolved: https://github.com/facebook/react-native/pull/34121
Test Plan: Perform a build using Xcode and confirm that the packager is using the correct version of node.
Reviewed By: cortinico
Differential Revision: D37746951
Pulled By: cipolleschi
fbshipit-source-id: de697c27fe86ce65e8e3646cb30309ecc7f6c247
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34161
This is a follow up to D37648363 (64fe67695b) which breaks up `TestBundle.js` into two modules. This enables `TestApps.js` (which defines and exports the set of integration test apps) to be required in the Meta-specific dependency graph without violating our internal naming pattern for JS entry points.
`force_include_bundles` is removed from the `js_glob` macro signature.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D37686883
fbshipit-source-id: 492c13dfcdd76ea8347d4d11c85818e31777c663
Summary:
Fix todo and inconsistency across codebase. It's better to have just one way to refer to these types.
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D37653146
fbshipit-source-id: e82f09caa6cd6eec5512b78f413708d9c04a7a83
Summary:
Ahead of enabling the `exact_empty_objects` option, suppress errors so that actually enabling the option is easier. We can do this without enabling the option by codemoding `{}` to `{...null}` in files that have errors.
Process:
1) Get list of files with errors when enabling the option
2) Codemod `{}` to `{...null}` in those files
3) Suppress resulting errors
4) Land diff with `drop-conflicts` flag
5) Announce and enable option (with many fewer files to edit)
6) Codemod all `{...null}` to `{}`
drop-conflicts
We are working on making the empty object literal `{}` have the type `{}` - i.e. exact empty object - rather than being unsealed.
More info in these posts: https://fb.workplace.com/groups/flowlang/posts/903386663600331, https://fb.workplace.com/groups/floweng/posts/8626146484100557
Reviewed By: pieterv
Differential Revision: D37731004
fbshipit-source-id: a9305859ba4e8adbdb8ae8feff3ec8a2f07ed236
Summary:
Subclassing a ViewManager means an additional PropsSetter class is generated (and other overheads). Instead we can use a Factory/Provider to construct ReactTextViewManager, since we don't actually need a subclass.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D36411098
fbshipit-source-id: 11c5ba5c9683a3ae4741cf61338f1983c69d9b69
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34171
Changelog:
[General][Added] - Added files for `avn`, `nodenv`, and other managers that set the node.js version in reactive native project including testing
Reviewed By: cortinico
Differential Revision: D37683291
fbshipit-source-id: ef0df0fb07f5cc0fa3591dde487f65e4b1b5f73f
Summary:
Changelog: [Internal][iOS] Minor: Rename RCTNotAllowedInAppWideFabric to RCTNotAllowedInFabricWithoutLegacy
`RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInBridgeless` is to track Bridge APIs that are okay in Fabric but not in Bridgeless.
`RCTNewArchitectureValidationPlaceholder(RCTNotAllowedInFabricWithoutLegacy` is to track legacy APIs that should not exist if the app was using Fabric **without any legacy architecture**. e.g. RCTBridgeModule, legacy interop view components.
Reviewed By: fkgozali
Differential Revision: D37659105
fbshipit-source-id: aee4e083820e83a8dac19eb3b5efc49b37d90039
Summary:
Changelog: [RNTester][Internal] - Create more mobile-friendly version of the platform test results UI
The original UI design for displaying the test results was done with only really tablets in mind so in order to better accomidate mobile screen sizes this diff adds a new expanding UI for the test results.
Reviewed By: lunaleaps
Differential Revision: D37701638
fbshipit-source-id: a1789abb15db7ab162fe90afc32d23c435f1bdb5
Summary:
Changelog: [RNTester][Internal] - Add README for RNTesterPlatformTest framework
This diff adds some initial documentation for `RNTesterPlatformTest` to give other pointers on how to contribute their own platform tests (both internally and externally).
Reviewed By: lunaleaps
Differential Revision: D37566632
fbshipit-source-id: c203045f79c3c5488fd0dcbb8077e9041bd62b0f
Summary:
Changelog: [iOS][Internal] - Add `buttons` implementation to the PointerEvent interface
This diff adds an implementation of the `buttons` property by leveraging `UIEvent`'s `buttonMask` property.
Reviewed By: lunaleaps
Differential Revision: D37430270
fbshipit-source-id: 69fd3aebcb403e665349a24283a04c0eb82ff3e2
Summary: Changelog: [Internal] - If any relevant view events (pointer, touch events, gesture responder, etc.) are declared on view, then the view must form stacking context. We need this change for pointer events specifically to determine whether we've entered/exited a view
Reviewed By: vincentriemer
Differential Revision: D37678352
fbshipit-source-id: 02641549ef608b1c9468ac693c7da629143212cb