Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53278
changelog: [internal]
C++ Animated should be in ReactCommon, it is code shared across all platforms.
Reviewed By: christophpurrer, zeyap
Differential Revision: D80261447
fbshipit-source-id: 8ad5d0bb65c9b499b1d9f60fc8babef8d4d90078
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53215
Changelog: [internal]
This adds a new environment variable to Fantom that allows debugging the JS code in tests.
Usage:
```
FANTOM_DEBUG_JS=1 yarn fantom <test>
```
**Does NOT work in OSS yet**. We need to include a third-party library to send HTTP and WebSocket requests and implement a wrapper on top of it.
Reviewed By: christophpurrer
Differential Revision: D79883372
fbshipit-source-id: d077c373a036033344e61d58274d5cd14028bda4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53112
## Changelog:
[Internal] [Changed] - Cache result when RenderOutput::render() is called
Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.
* make RenderOutput an instance owned by TestMountingManager that can cache render result
* why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
* here i also make sure that `RenderOutput::render()` will only re calculate the render result for a tree after StubViewTree::mutate is called
Reviewed By: andrewdacenko
Differential Revision: D79737991
fbshipit-source-id: ee2193b708e319c1519b06bc672054c4f7105da1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52827
Changelog: [internal]
This adds **support for creating Hermes/JS sampling profiler traces in Fantom**, which is especially useful when running benchmarks.
Usage:
```
FANTOM_PROFILE_JS=1 yarn fantom Animated-benchmark
```
Output:
{F1980642216}
After this, the trace is fully symbolicated.
Can be opened directly in Google Chrome:
{F1980642229}
Or in the built-in viewer in VSCode:
{F1980642242} {F1980642240} {F1980642241}
When collapsing frames in the Flame Chart viewer in VSCode, we can quickly identify opportunities for optimizations.
This also supports multi-config environments. In that case, trace file names are created using a short representation of the configuration.
User guide for benchmarks in Fantom, including how to use this, will be done in a future diff.
NOTE: This still doesn't work in OSS because we don't support optimized mode there. In dev mode, there's a segmentation fault coming from this line: `hermesRuntime->sampledTraceToStreamInDevToolsFormat(fileStream)`
Reviewed By: sammy-SC
Differential Revision: D78905646
fbshipit-source-id: 382ddd5034db601309bd118cedde2fe0d57fde98
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53019
Changelog: [internal]
This adds support for mocking `HighResTimeStamp` values in Fantom tests via a new `Fantom.installHighResTimeStampMock` function.
See new tests for more details on how it works.
Reviewed By: rshest
Differential Revision: D79554723
fbshipit-source-id: 8b0fb292948be118c7616fde1a8a84014af82de8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52839
**Context**
Experimental V2 Performance Monitor prototype, beginning by bringing the [Interaction to Next Paint (INP)](https://web.dev/articles/inp) metric to React Native.
**This diff**
Adds and configures a `CdpMetricsReporter` class to report `InteractionEntry` live metrics over CDP via the `"__chromium_devtools_metrics_reporter"` runtime binding.
**Notes**
- Introduces a new `react/performance/cdpmetrics` package, and a listener API on `PerformanceEntryReporter` (both to avoid a `jni` dependency in `react/performance/timeline`).
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D78904748
fbshipit-source-id: c75971aba43d9929912b3d1dba7576c2a2342214
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52225
## Changelog:
[Internal] - Fantom in RN CLI
This diff prepares the RN CI to build and run Fantom Tests
Reviewed By: cortinico
Differential Revision: D70097944
fbshipit-source-id: 163cb3f5204f7e5491f94f2fbebe11b514919cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52583
Changelog: [Internal]
OSS build is broken atm as there is rn-tester dep in Fantom, needed for Meta only purposes.
Platformizing code to allow for Meta only implementation here and also for OSS only. Using this approach over ifdef.
Reviewed By: christophpurrer
Differential Revision: D78275698
fbshipit-source-id: c3234bb61b4591c0a5045fdb84aa0316f6382ecc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52393
## Changelog:
[General][Deprecated] - ShadowNode::Shared is now deprecated. Use `std::shared_ptr<const ShadowNode>` instead.
- Mark ShadowNode::Shared as deprecated in ShadowNode.h
- Replace all uses of ShadowNode::Shared with std::shared_ptr<const ShadowNode>.
This continues the systematic effort to remove ShadowNode type aliases in favor of explicit standard library types for improved code clarity and maintainability.
Reviewed By: christophpurrer
Differential Revision: D77650696
fbshipit-source-id: b4769e2a1e39f49d14d5927be105487ecf69fa3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52222
Changelog: [Internal]
Introduce environment option to force usage of OSS fantom test runner.
If env is not set - check for BUCK file in tester which is checked in for FB but not for OSS.
Reviewed By: rubennorte
Differential Revision: D77160761
fbshipit-source-id: 1701ff140ff2be1bbeacfb4305e9f89089cacb42
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52111
Changelog: [Internal]
JSRuntime integration with executor on messagequeue.
Inching closer to full integration with the rest of RN.
Reviewed By: rshest
Differential Revision: D76752667
fbshipit-source-id: 0ef8fe0c615dc1eb45355f7502e01663772ebf13
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52015
Changelog: [Internal]
Add gflags to fantom_tester so we can pass in data like featureFlags
Reviewed By: cortinico
Differential Revision: D76618409
fbshipit-source-id: a18e642a02c405eef972a7418a606a5980253b6a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52003
Changelog: [Internal]
This is a react common dep check that we can build and run tester.
Reviewed By: christophpurrer
Differential Revision: D76531041
fbshipit-source-id: 0a43fdb91aa61f7e6461ff8a94ea6e2732b55dbb