-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools scheduling profiler: Add React component measures #22013
DevTools scheduling profiler: Add React component measures #22013
Conversation
bvaughn
commented
Aug 3, 2021
•
edited
Loading
edited
- Add new user timing API marks for when components start/stop rendering to the scheduling profiler data set.
- Add new row of React components (user code). These are technically visible in the flame graph, but they're too buried. I think it would be helpful to show which components are being rendered (and when) on a flattened row.
- Added borders/bars to Flamechart view
- Update record/cancel buttons to account for scheduling profiler tab
Comparing: 3a1dc3e...fc07195 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
3d458c2
to
21999ae
Compare
21999ae
to
cd3b12e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm at a very high level! obviously not super familiar w the codebase yet, so mostly just leaving a bunch of questions
Add new user timing API marks for when components start/stop rendering to the scheduling profiler data set.
so this data is now being displayed in the new row of React components? if the components were previously visible in the flamegraph, but we didn't have start/stop data, what data were we showing there?
Update record/cancel buttons to account for scheduling profiler tab
What does this mean exactly? Not sure if reflected in your video, but not sure what this particular change corresponds to
packages/react-reconciler/src/__tests__/SchedulingProfiler-test.internal.js
Show resolved
Hide resolved
|
||
const clear = () => { | ||
if (selectedTabID === 'scheduling-profiler') { | ||
clearSchedulingProfilerData(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you share a bit more context on this change? what's the difference between clearing the scheduling profiler data vs clearing the profiler store?
the profiler store corresponds to the current profiler tab vs the new scheduling profiler tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. There are two profilers, each with a separate data source. One is React-generated and the other comes from the browser's Performance profile JSON. This kind of sucks, and I'd like to smooth over this distinction in the future (see #22015).
Summary: This sync includes the following changes: - **[19092ac8c](facebook/react@19092ac8c )**: Re-add old Fabric Offscreen impl behind flag ([#22018](facebook/react#22018)) //<Andrew Clark>// - **[215db465a](facebook/react@215db465a )**: [Fabric] Add `flex: 1` to Offscreen view container ([#22019](facebook/react#22019)) //<Andrew Clark>// - **[8a37b0ef3](facebook/react@8a37b0ef3 )**: typos fixed ([#21955](facebook/react#21955)) //<Sinan Sonmez (Chaush)>// - **[e3049bb85](facebook/react@e3049bb85 )**: DevTools scheduling profiler: Add React component measures ([#22013](facebook/react#22013)) //<Brian Vaughn>// - **[27bf6f9a8](facebook/react@27bf6f9a8 )**: Scheduling profiler UX changes ([#21990](facebook/react#21990)) //<Brian Vaughn>// - **[f0d354efc](facebook/react@f0d354efc )**: [Fabric] Fix reparenting bug in legacy Suspense mount ([#21995](facebook/react#21995)) //<Andrew Clark>// - **[34308b5ad](facebook/react@34308b5ad )**: Tidy up early bailout logic at start of begin phase ([#21852](facebook/react#21852)) //<Andrew Clark>// - **[321087d13](facebook/react@321087d13 )**: [Fizz] Don't add aborted segments to the completedSegments list ([#21976](facebook/react#21976)) //<Sebastian Markbåge>// - **[4cc8ec64c](facebook/react@4cc8ec64c )**: Separate unit tests for ReactFabricHostComponent ([#21969](facebook/react#21969)) //<Timothy Yung>// - **[d4d786493](facebook/react@d4d786493 )**: Fix `ReactFabricHostComponent` methods if detached ([#21967](facebook/react#21967)) //<Timothy Yung>// - **[392253a77](facebook/react@392253a77 )**: [Fabric] Use container node to toggle the visibility of Offscreen and Suspense trees ([#21960](facebook/react#21960)) //<Andrew Clark>// Changelog: [General][Changed] - React Native sync for revisions 419cc9c...19092ac jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D30092460 fbshipit-source-id: 9f118db2419a9a5db26a9b873868f91ab88f2f89
* Rename immediate to ReactNativeMicrotask in Bridge Summary: Changelog: [Internal] This diff replaced all the internal occurrences of "Immediate" with "ReactNativeMicrotask" in the legacy bridge and then polyfilled the original immediate APIs during the timer setup phases as aliases of them. Note that this diff is part of a larger refactoring. Reviewed By: RSNara Differential Revision: D29785430 fbshipit-source-id: 7325d2a7358a6c9baa3e9abb8acf90414de5072f * Implement View.removeClippedSubviews prop Summary: Changelog: [internal] Fabric didn't have prop [removeClippedSubviews](https://reactnative.dev/docs/view#removeclippedsubviews) implemented. This diff adds it. It is Reviewed By: JoshuaGross Differential Revision: D29906458 fbshipit-source-id: 5851fa41d7facea9aab73ca131b4a0d23a2411ea * Add "Use Native Driver" control to RNTester Animated Composing example Summary: Changelog: [Internal] Reviewed By: yungsters Differential Revision: D29832704 fbshipit-source-id: dfd37d08d0f25fe86716a21682648894e8adad8b * docs: Fix dead links in README for rn-tester (#31901) Summary: Part of https://github.com/facebook/react-native/issues/31788 ~Updated link in README that was pointing to master branch to main branch~ Realized that link in rn-tester README and ReactAndroid README leads to a dead link, so I've fixed the links ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [INTERNAL] [FIXED] - Fix dead links in README Pull Request resolved: https://github.com/facebook/react-native/pull/31901 Test Plan: - [ ] Updated link directs you to appropriate page Reviewed By: PeteTheHeat Differential Revision: D29933044 Pulled By: GijsWeterings fbshipit-source-id: c1f301626acbb2995d74f78d8bc19214c70e9319 * docs: update links to forwarded page (#31903) Summary: Some of the links in `CONTRIBUTING.md` redirects you to a different page. I've fixed the links so each link would directly send users to the appropriate page. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [INTERNAL] [Changed] - update links in CONTRIBUTING.md Pull Request resolved: https://github.com/facebook/react-native/pull/31903 Test Plan: - [ ] Change links shows the appropriate content Reviewed By: lunaleaps Differential Revision: D29933105 Pulled By: GijsWeterings fbshipit-source-id: b5be74181f8a8e88d8f43e44c469337b7393dedf * Remove redundant warnings for RCTMountingManager Summary: Changelog: [internal] The warnings are in-actionable for product engineers. Reviewed By: JoshuaGross Differential Revision: D29911438 fbshipit-source-id: f0f81588e8cbe88059e531c8be302ab19b8eb83f * Ignore when a text string or number is supplied as a child. Summary: Currently, React Native throws an invariant violation error when a text string or number is supplied as a child. This is undesirable because core library components should be fault-tolerant and degrade gracefully (with soft errors, if relevant). This change will work when a change in the host configs are landed (https://github.com/facebook/react/pull/21953). Changelog: [internal] Reviewed By: yungsters, sammy-SC Differential Revision: D29894182 fbshipit-source-id: 827ff299991a476b57981382d196c7ee1396ec28 * React Native sync for revisions cae6350...419cc9c Summary: This sync includes the following changes: - **[419cc9c37](https://github.com/facebook/react/commit/419cc9c37 )**: Fix: Hide new/updated nodes in already hidden tree ([#21929](https://github.com/facebook/react/pull/21929)) //<Andrew Clark>// - **[4758e4533](https://github.com/facebook/react/commit/4758e4533 )**: React Native: Export getInspectorDataForInstance API ([#21572](https://github.com/facebook/react/pull/21572)) //<Brian Vaughn>// - **[ae5d26154](https://github.com/facebook/react/commit/ae5d26154 )**: Fix: LegacyHidden should not toggle effects ([#21928](https://github.com/facebook/react/pull/21928)) //<Andrew Clark>// - **[9ab90de60](https://github.com/facebook/react/commit/9ab90de60 )**: Clean-up: Move Offscreen logic from Suspense fiber ([#21925](https://github.com/facebook/react/pull/21925)) //<Andrew Clark>// - **[3f62dec84](https://github.com/facebook/react/commit/3f62dec84 )**: Typo fix ([#21729](https://github.com/facebook/react/pull/21729)) //<Deniz Susman>// - **[5579f1dc8](https://github.com/facebook/react/commit/5579f1dc8 )**: Update test comments with explanations ([#21857](https://github.com/facebook/react/pull/21857)) //<Ricky>// - **[262ff7ad2](https://github.com/facebook/react/commit/262ff7ad2 )**: Refactor "disappear" logic into its own traversal ([#21901](https://github.com/facebook/react/pull/21901)) //<Andrew Clark>// - **[34600f4fa](https://github.com/facebook/react/commit/34600f4fa )**: Refactor "reappear" logic into its own traversal ([#21898](https://github.com/facebook/react/pull/21898)) //<Andrew Clark>// - **[310187264](https://github.com/facebook/react/commit/310187264 )**: Clean up flushSync flow types ([#21887](https://github.com/facebook/react/pull/21887)) //<Ricky>// - **[a97b5ac07](https://github.com/facebook/react/commit/a97b5ac07 )**: [Bugfix] Don't hide/unhide unless visibility changes ([#21875](https://github.com/facebook/react/pull/21875)) //<Andrew Clark>// - **[81346764b](https://github.com/facebook/react/commit/81346764b )**: Run persistent tests in more configurations in CI ([#21880](https://github.com/facebook/react/pull/21880)) //<Andrew Clark>// - **[9090257e6](https://github.com/facebook/react/commit/9090257e6 )**: fix: restore execution context after RetryAfterError completed ([#21766](https://github.com/facebook/react/pull/21766)) //<Sebastian Silbermann>// - **[14bac6193](https://github.com/facebook/react/commit/14bac6193 )**: Allow components to render undefined ([#21869](https://github.com/facebook/react/pull/21869)) //<Ricky>// - **[87b67d319](https://github.com/facebook/react/commit/87b67d319 )**: Enable scheduling profiler flag for react-dom profiling builds ([#21867](https://github.com/facebook/react/pull/21867)) //<Brian Vaughn>// - **[464f27572](https://github.com/facebook/react/commit/464f27572 )**: Update link to flow ([#21862](https://github.com/facebook/react/pull/21862)) //<Ehsan Hosseini>// - **[9f5224a9c](https://github.com/facebook/react/commit/9f5224a9c )**: Restore DevTools console message ([#21864](https://github.com/facebook/react/pull/21864)) //<Dan Abramov>// - **[a4ecd85e8](https://github.com/facebook/react/commit/a4ecd85e8 )**: act: Batch updates, even in legacy roots ([#21797](https://github.com/facebook/react/pull/21797)) //<Andrew Clark>// - **[c2c6ea1fd](https://github.com/facebook/react/commit/c2c6ea1fd )**: Capture suspense boundaries with undefined fallbacks ([#21854](https://github.com/facebook/react/pull/21854)) //<Ricky>// - **[0f09f14ae](https://github.com/facebook/react/commit/0f09f14ae )**: Check if already rendering before flushing //<Andrew Clark>// - **[54e88ed12](https://github.com/facebook/react/commit/54e88ed12 )**: Bugfix: Flush legacy sync passive effects at beginning of event ([#21846](https://github.com/facebook/react/pull/21846)) //<Andrew Clark>// - **[cb8afda18](https://github.com/facebook/react/commit/cb8afda18 )**: Add test for #21837 ([#21842](https://github.com/facebook/react/pull/21842)) //<Andrew Clark>// - **[f85f429d5](https://github.com/facebook/react/commit/f85f429d5 )**: Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839)) ([#21841](https://github.com/facebook/react/pull/21841)) //<Andrew Clark>// - **[84639ab53](https://github.com/facebook/react/commit/84639ab53 )**: Guard against reused fibers in React Native commands ([#21837](https://github.com/facebook/react/pull/21837)) //<Timothy Yung>// - **[c549bc491](https://github.com/facebook/react/commit/c549bc491 )**: Revert "Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839))" ([#21840](https://github.com/facebook/react/pull/21840)) //<Timothy Yung>// - **[59d3aca68](https://github.com/facebook/react/commit/59d3aca68 )**: Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839)) //<Timothy Yung>// - **[9ccc25a0e](https://github.com/facebook/react/commit/9ccc25a0e )**: Reverting recent flushSync changes ([#21816](https://github.com/facebook/react/pull/21816)) //<Brian Vaughn>// - **[ed6c091fe](https://github.com/facebook/react/commit/ed6c091fe )**: Replace unbatchedUpdates with flushSync ([#21776](https://github.com/facebook/react/pull/21776)) //<Andrew Clark>// - **[32eefcb3c](https://github.com/facebook/react/commit/32eefcb3c )**: Replace flushDiscreteUpdates with flushSync ([#21775](https://github.com/facebook/react/pull/21775)) //<Andrew Clark>// - **[ab390c65e](https://github.com/facebook/react/commit/ab390c65e )**: ReactDebugHooks optionally includes fileName, and line/column numbers ([#21781](https://github.com/facebook/react/pull/21781)) //<Brian Vaughn>// - **[c96761c7b](https://github.com/facebook/react/commit/c96761c7b )**: Delete batchedEventUpdates ([#21774](https://github.com/facebook/react/pull/21774)) //<Andrew Clark>// - **[3e8c86c1c](https://github.com/facebook/react/commit/3e8c86c1c )**: fix: maxYieldInterval should not compare with currentTime directly in Scheduler-shouldYieldToHost //<郭帅彬>// - **[d483463bc](https://github.com/facebook/react/commit/d483463bc )**: Updated scripts and config to replace "master" with "main" branch ([#21768](https://github.com/facebook/react/pull/21768)) //<Brian Vaughn>// Changelog: [General][Changed] - React Native sync for revisions cae6350...419cc9c jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D29913856 fbshipit-source-id: 58e4903766a312a64a17cfba0b0f684cf4bcacb0 * Remove option to make measure calls asynchronous Summary: Changelog: [internal] Making measure calls asynchronous in Fabric regresses core metrics, let's remove the option. Reviewed By: JoshuaGross Differential Revision: D29909385 fbshipit-source-id: eea3fefc8da757c8db82cb0af340650e2ce6a947 * Fix android view dimensions Summary: This diff fixes the Android View dimensions in VR PixelUtil.toSPFromPixel and PixelUtil.getDisplayMetricDensity() are both using getScreenDisplayMetrics() to perform conversion of dimensions. This is not correct because we should take into consideration the density of the Context / Activity instead of the Screen. This problem didn't raise before in Fabric Android because it seems that android OS on phones usually share the scale between the screen and the Activity? These two methods are only used in Fabric and they were introduced by D9583972 (https://github.com/facebook/react-native/commit/5c0da011cbaa788c52519f8091157ca6d87d8abb) and D9173758 (https://github.com/facebook/react-native/commit/8b5e3fc16b1e58441318b6ada629dcff572dd120) As part of this diff I'm also deleting the method toSPFromPixel in favor of toDIPFromPixel because I noticed the usages of these methods are meant to use toDIPFromPixel() changelog: [Internal] internal Reviewed By: JoshuaGross Differential Revision: D29864944 fbshipit-source-id: a0a093c120bde21a6cf9e1043a83c31e870d4368 * Refactor DevServerHelper to separate checking if packager running Summary: Changelog: [Internal] Separate the functionality of the isPackagerRunning() function into a new class PackagerStatusCheck with the intention of being able to use this without needing a DevServerHelper Reviewed By: makovkastar, ShikaSD Differential Revision: D29933318 fbshipit-source-id: d708bb987b08634015d6ee6b6c8989faba416c5a * Introduce queueMicrotask API Summary: Changelog: [General][Added] - Add global.queueMicrotask `queueMicrotask` is a relatively recent API defined in the WHATWG HTML spec and it's been widely adopted by all web browsers and Node.js. This diff introduced it to React Native by polyfilling it via a lazily-allocated resolved Promise, or calling directly into a fast path provided by Hermes. Reviewed By: RSNara Differential Revision: D29838852 fbshipit-source-id: 8c4378b1b713fb8b0da5e67f92ba2ea9838766f7 * Shim Immediate APIs when Promise is queueing to JSVM Summary: Changelog: [Internal] Historically, Immediate API is implemented upon the React Native's internal microtask-y queue (known as "immediate queue"), which is the same queue Promise polyfill is operating on. To make React Native suitable of using the built-in Promises from JSVMs, which usually enqueues to the JSVM internal microtask queue and has no access to React Native microtask-y queue, we need to migrate the Immediate API to use the JSVM microtask queue as well to preserve the semantics of code relies on the interleaving of promises and immediates. To do that, this diff implement a shim layer for immediate APIs via the new `global.queueMicrotask` API (which enqueues to JSVM) in JS, by wrapping the immediate callback into a "microtask callback", which validate the `immediate ID` against `clearedImmediate` Set before invoking it. Reviewed By: RSNara Differential Revision: D29845305 fbshipit-source-id: c2ed3fed426a5316b1e0dfbfaad51706d1765d4d * Attempt to fix undefined instance handle in EventTarget Summary: changelog: [internal] Completion block can retain `_eventEmitter` beyond existence of the component. To fix this, do not retain `_eventEmitter` by block but try to acquire it inside it. Reviewed By: JoshuaGross Differential Revision: D29969189 fbshipit-source-id: 456c42f816acc160f9d6bbd3f9c8c55d611940b2 * Makes "force" property available to Apple Pencil based events. (#31780) Summary: Fixes https://github.com/facebook/react-native/issues/31779 For more detailed explanation, see issue https://github.com/facebook/react-native/issues/31779 React Native touch handler events (onTouchStart, onTouchMoved, etc..) are intended to have "force" properties when used on devices which support pressure input (3D Touch & Apple Pencil events). However, due to a check in RCTForceTouchAvailable() function which checks for UITraitCollection's "forceTouchCapability" to be equal to UIForceTouchCapabilityAvailable, the check returns NO on iPad-based devices, due to iPad devices returning UIForceTouchCapabilityUnavailable at all times. This causes "force" values of Apple Pencils to never be passed on to React Native. Since simply passing 0 as a value for force across the RN bridge for every touch event seemed like a change that might seem jarring to some, I decided that a simple additional boolean check if the touch event's type is UITouchTypePencil (this is the same as UITouchTypeStylus) should also suffice. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Fixed "force" property of touch events for Apple Pencil/Stylus devices. [iOS] [Feature] - Added "altitudeAngle" property to touch events from Apple Pencil/Stylus devices. Pull Request resolved: https://github.com/facebook/react-native/pull/31780 Test Plan: The code compiles and runs, and trying a simple handler for a View like ```` touchMove = (e: GestureResponderEvent) => { console.log(`pressure, altitude (${e.nativeEvent.force}, ${e.nativeEvent.altitudeAngle})`); ```` results in <img width="424" alt="Screen Shot 2564-06-28 at 17 13 22" src="https://user-images.githubusercontent.com/5000572/123621055-0b563f00-d835-11eb-9eff-526ba27fdf7b.png"> and when pencil is oriented perpendicular to the screen and pressed with full force shows <img width="412" alt="Screen Shot 2564-06-28 at 17 13 58" src="https://user-images.githubusercontent.com/5000572/123621139-1c06b500-d835-11eb-8207-68a49720d708.png"> Reviewed By: sammy-SC Differential Revision: D29964102 Pulled By: sota000 fbshipit-source-id: 5a1f41d64c6fe325afbd2b9579eaf20a522e92dc * Fix typo in VirtualizedList-test.js (#31756) Summary: occured -> occurred ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Fixed] - Fixed typo in VirtualizedList-test.js Pull Request resolved: https://github.com/facebook/react-native/pull/31756 Test Plan: NONE Reviewed By: lunaleaps Differential Revision: D29975153 Pulled By: charlesbdudley fbshipit-source-id: 966d90df0bf015b4a6a2e3b1bf88c66b61161a7a * Pass context through to all prop parser (core changes) Summary: Unfortunately, parsing some props requires stateful context - namely, PlatformColor on Android. We explored several different options but they all seemed inferior to the approach of using ContextContainer, and most would require using global state. By introducing this change everywhere as early as possible, we can avoid later pain. It is likely that some prop, on some platform, will require this mechanism. We'll be ready for it! Because we can pass a constref of the ContextContainer through to all props and because the context and context data is never retained by prop parsers, perf and memory hit should be ~0. This diff contains core changes only. Leaf changes to all props structs and conversions files will be in next diff(s). Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29838789 fbshipit-source-id: f5090e7f02eb6e8fbe0ef4dd201e7d12104a3e3c * Pass context through to all prop parser (props structs changes) Summary: See previous diffs for context. This updates all of the relevant props structs. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29855426 fbshipit-source-id: 30177c3380ef82ecf8f2a4321f128cfbe8a576e0 * Pass context through to all prop parser (conversions.h) Summary: See previous diffs for context. This updates all conversions.h files. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29855425 fbshipit-source-id: d5751ddfc2724392e3a35f5e22bb68574e95e737 * Pass PropsParserContext to prop parsing layer Summary: Changelog: [internal] Reviewed By: mdvacca Differential Revision: D29921232 fbshipit-source-id: ba045f545b564aedf1b287045a0e75428de30a0f * Fix typo in Constants.h (#31049) Summary: controling -> controlling ## Changelog [Internal] [Fixed] - Fixed typo in comment Pull Request resolved: https://github.com/facebook/react-native/pull/31049 Test Plan: NONE Reviewed By: lunaleaps Differential Revision: D29980007 Pulled By: charlesbdudley fbshipit-source-id: 419f28f08d74faa07db18a07ab41b62c41776344 * Daily `arc lint --take CLANGFORMAT` Reviewed By: zertosh Differential Revision: D29983521 fbshipit-source-id: bebd38e79180c544c8c1986605cc1af4b1f4df98 * Update Dimension.js typo (#29858) Summary: preferred instead of preffered ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [CATEGORY] [TYPE] - Message Pull Request resolved: https://github.com/facebook/react-native/pull/29858 Reviewed By: charlesbdudley Differential Revision: D29998754 Pulled By: sota000 fbshipit-source-id: f13fef58e9154ddf8087944d53e022fb9afa6b1b * Make existential type an error in xplat Summary: This diff updates the xplat flowconfigs to make existential types an error. Changelog: [Internal] Reviewed By: pieterv Differential Revision: D29967838 fbshipit-source-id: f08bbafe2a0269adb2c9afa4572b7a34fd254a4d * Remove unused import (#30544) Summary: Remove unused import ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [performance] - Remove unused import Pull Request resolved: https://github.com/facebook/react-native/pull/30544 Test Plan: Should build on CI Reviewed By: lunaleaps Differential Revision: D30000901 Pulled By: charlesbdudley fbshipit-source-id: 3d3310917823b7af57564ca1ea397cd32cd0c4d5 * Updated TextInput autoCompleteType prop to autoComplete 1/2 (#26010) Summary: Fix for bug https://github.com/facebook/react-native/issues/26003 Rename TextInput prop "autoCompleteType" to "autoComplete". ## Changelog [Android] [Changed] - Updated `autoCompleteType` prop of `TextInput` to `autoComplete` Pull Request resolved: https://github.com/facebook/react-native/pull/26010 Test Plan: Test Pass PR for [Doc Update](https://github.com/facebook/react-native-website/pull/1184) Reviewed By: mdvacca Differential Revision: D29980220 Pulled By: lunaleaps fbshipit-source-id: 3c9e7d3250b5f95b0dbd523fdb0d917a039cd6a9 * Implement PlatformColor in Fabric Android Summary: This diff implements PlatformColor in Fabric Android changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29841461 fbshipit-source-id: 63a523626b021c634bc399e749b639b55730391a * Allows to set individual (left,top,right,bottom) dotted/dashed borders (#29099) Summary: This issue: fixes https://github.com/facebook/react-native/issues/24224 fixes https://github.com/facebook/react-native/issues/28695 fixes https://github.com/facebook/react-native/issues/23651 fixes https://github.com/facebook/react-native/issues/23475 fixes https://github.com/facebook/react-native/issues/22256 fixes https://github.com/facebook/react-native/issues/22226 fixes https://github.com/facebook/react-native/issues/19234 fixes https://github.com/facebook/react-native/issues/18285 fixes https://github.com/facebook/react-native/issues/17344 fixes https://github.com/facebook/react-native/issues/17343 fixes https://github.com/facebook/react-native/issues/17251 fixes https://github.com/facebook/react-native/issues/12817 fixes https://github.com/facebook/react-native/issues/12403 fixes https://github.com/facebook/react-native/issues/11042 fixes https://github.com/facebook/react-native/issues/9343 fixes https://github.com/facebook/react-native/issues/8236 fixes https://github.com/facebook/react-native/issues/8105 fixes https://github.com/facebook/react-native/issues/7838 fixes https://github.com/facebook/react-native/issues/6721 fixes https://github.com/facebook/react-native/issues/5411 fixes https://github.com/facebook/react-native/issues/3159 fixes https://github.com/facebook/react-native/issues/2335 fixes https://github.com/facebook/react-native/issues/840 fixes https://github.com/facebook/react-native/issues/27133 fixes https://github.com/facebook/react-native/issues/28695 Allows to set individual (left,top,right,bottom) dotted/dashed borders. If a single border is specified and the borderStyle is dotted or dashed, each border will be drawn with moveTo and lineTo taking in consideration of the border style and thickness. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - Quickfix individual border style dotted or dashed rendering as solid Pull Request resolved: https://github.com/facebook/react-native/pull/29099 Test Plan: **<details><summary>CLICK TO OPEN TESTS RESULTS</summary>** <p> | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158300-05e05800-aa6c-11ea-96a3-40007b2ca611.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158309-07aa1b80-aa6c-11ea-973b-51e8e68b5808.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158320-0d9ffc80-aa6c-11ea-9d7f-dfba49fbfe41.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158334-11cc1a00-aa6c-11ea-8422-cd5b9384f391.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158556-4c35b700-aa6c-11ea-9a4d-eea791b3813a.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158574-51930180-aa6c-11ea-8e84-526cfb168f49.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158586-55268880-aa6c-11ea-9540-51d79a8e4cb0.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158601-5952a600-aa6c-11ea-82e7-85d54b858f1a.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158638-62dc0e00-aa6c-11ea-8765-ecba0d9d126f.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158652-67a0c200-aa6c-11ea-8336-e6eb8aa52e96.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158690-738c8400-aa6c-11ea-9cf1-edec72d27cb7.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158912-b6e6f280-aa6c-11ea-94a7-0ee0db685f38.png" width="300" height="" /> | </p> </details> Reviewed By: mdvacca Differential Revision: D28688914 Pulled By: RSNara fbshipit-source-id: 34781d63265dcf55e30f11c014e6b4a35d67dcbd * Correct error message in getViewState method Summary: Changelog: [internal] Here, getting `viewState` has failed, not its view property. Reviewed By: mdvacca Differential Revision: D30042652 fbshipit-source-id: 42831b577f17db1f64860e68be33870f5be27207 * Clean up RAIICallbackManager experiment Summary: This experiment was shipped in D27436402 (https://github.com/facebook/react-native/commit/3d1afbbda301d48a75e45f73b96cd51ae5105dd8). Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D30023039 fbshipit-source-id: 5f7335f2ddaf6f4e2d876a917aaff2cf3d906b5c * Stop sharing LongLivedObjectCollection with the bridge Summary: ## Context Previously, when you'd call TurboModule methods with JavaScript callbacks, we'd [store the callbacks](https://www.internalfb.com/code/fbsource/[c503ff1b38621aebca87b2bbebeae088b01886c4]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm?lines=173%2C248-249) into [this global LongLivedObjectCollection collection](https://www.internalfb.com/code/fbsource/[c503ff1b38621aebca87b2bbebeae088b01886c4]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h?lines=65). Then, when React Native's JavaScript VM got torn down, we'd [clear the global collection](https://www.internalfb.com/code/fbsource/[e26f476ce208c578f05b1edb7639d1dad5612c7d]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp?lines=49), which would ensure that we deleted all held jsi::Functions, before deleting the jsi::Runtime. ## Problem With bridgeless mode enabled, there can be two TurboModule systems. Further, it is possible to tear down bridgeless mode, or the bridge, without tearing down the other initialization infra. In this scenario, the jsi::Function for the other initialization infra would also get deleted, which could lead to mysterious problems. ## Fix In this diff, I refactored the jsi::Function cleanup in the TurboModule system. Now, there are 3 modes: - kGlobalScope: Everything works as it did before - kRCTGlobalScopeUsingRetainJSCallback: We still use the global LongLivedObjectCollection, but we do it through invoking a block passed to every ObjCTurboModule by the TurboModuleManager. This group exists to assess the impact of having each TurboModule retain/use the block. I suspect this will be negligible, but it'd be good to have actual data to back this claim. - kRCTTurboModuleManagerScope: Every TurboModule uses a LongLivedObjectCollection that is owned by its TurboModuleManager. This should effectively fix the problem I outlined above. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D30019833 fbshipit-source-id: da50d884c7e37190107f570d8ed70eeda7d9ae83 * Stop sharing LongLivedObjectCollection with the bridge Summary: This is the Android analogue to D30019833. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D30029295 fbshipit-source-id: 13df0dfb915697eeedcc527dcdb6c246e89afb0c * setup fragment based tab bar navigation Summary: `Changelog: [Android] [Changed] - Make ReactFragment variables protected instead of private, create getter for ReactDelegate` Reviewed By: keoskate Differential Revision: D29981436 fbshipit-source-id: 3e5df811cd07edccf37f72c9f917f9ea0882be0b * Remove 'using namespace facebook::jni' Summary: Ez diff to remove 'using namespace facebook::jni' changelog: [internal] internal Reviewed By: sshic Differential Revision: D30046080 fbshipit-source-id: 52100970a408d772854cc0783fa13edd0cc39235 * Add TODO to fix and enable 'generated_tests-codegen_testsAndroid' Summary: Add TODO to fix and enable 'generated_tests-codegen_testsAndroid' changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D30046143 fbshipit-source-id: dbeba6f1d51b32c069bda8bb9ca976014d299dae * Move RNTester Buck library to GitHub (#31435) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31435 Moves the Facebook-internal Buck target definition for RNTester closer to the actual source files. This does not affect how RNTester is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27942209 fbshipit-source-id: 66c970a5464a9329597d155ceeca78fb7f4834e8 * Move react-native Buck library to GitHub Summary: Moves the Facebook-internal Buck target definition for React Native closer to the actual JS source files. This does not affect how React Native is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27942687 fbshipit-source-id: 328febb661ed6597feafdfd8efb2a95365325348 * Extract feature detection as an utilitiy module Summary: Changelog: [Internal] This diff only extracted the `isNativeFunction` used in `setUpTimers` into the `FeatureDetection` utility, but later we will add more functions in it and reuse them in other places. Reviewed By: RSNara Differential Revision: D29986750 fbshipit-source-id: 6e48e38d92ceccb35eead3c52e00e1eecb81b5b0 * Conditionalize the Regenerator Setup Summary: Changelog: [Internal] If generators are provided natively, that should suggest that the JS source code did not go through the regenerator-transform (e.g. in Metro Hermes profile), then there is no need to set up the regenerator runtime. This should save some work during the Core initialization. Reviewed By: motiz88 Differential Revision: D29986751 fbshipit-source-id: 129f5122e8e4c05535ee2aa5da6970a66843e8cd * Protect against crashes when over-releasing a TouchEvent Summary: It seems that, possibly due to optimizations and refactoring elsewhere in the event system, some TouchEvents are being over-disposed. This doesn't really pose a problem besides performance; and could even indicate that an Event was in a pool but never properly initialized. In these cases it seems perfectly reasonable to silently continue, and to log a soft exception. This WILL still crash in debug mode, so we can gather more information if we find a good repro; otherwise we will continue to get production data from this soft exception if it's an issue and we can investigate further. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D30061178 fbshipit-source-id: 05d1f60afc382ce0a202ac8f3de34770cf9a760d * Co-locate Buck targets for JS polyfills with their sources Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032230 fbshipit-source-id: 0d714b4e0a79a9c5c1c21e79f782635d8bd9c5f1 * chore: update Dimensions API Flow types (#31898) Summary: This small PR updates the Flow types used in Dimensions. The following changes has been made: * generic types has been replaced with types from `NativeDeviceInfo` (which already were used in event subscription update) * ~simplification of `DisplayMetricsAndroid` by spreading via intersection with `DisplayMetrics` type and removing shared properties~ > I have tried both notations, but according to the lint, it looks like a Native Modules typing limitation which requires redundancy / code duplication in cases like this. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Changed] - update Dimensions API Flow types Pull Request resolved: https://github.com/facebook/react-native/pull/31898 Test Plan: Running `yarn flow` in the workspace yields no errors. Reviewed By: yungsters Differential Revision: D29932940 Pulled By: GijsWeterings fbshipit-source-id: bf97bb972964c585207e2450ccf71d932555e291 * Fix order of calls for Native Animated Module Summary: Changelog: [internal] Make sure the order of call is preserved for `NativeAnimatedModule`. The order of calls to NativeAnimatedModule needs to be preserved because its internals depend on it. For example, if you `getValue` is called before `createAnimatedNode`, it causes a crash. To resolve it, we need to enqueue `getValue` onto operationQueue. Reviewed By: JoshuaGross Differential Revision: D30035911 fbshipit-source-id: bbd698a96cada5d2b1312a1a689ca99b04a07cdc * Merge BUCK file at Libraries/ into root Summary: Merges the Facebook-internal Buck target definitions in `Libraries/` into the BUCK file at the root of the repo (which is currently not synced to GitHub at all). This does not affect how React Native is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27967499 fbshipit-source-id: 39c51a544b3868242598072d24cb6cfb5a6e2d8c * Fix Buck package boundary violation in core components schema Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D29996246 fbshipit-source-id: e560c7261c4274da5219dc1e2d59d46b60e7549e * Allow resolving view from FabricUIManager Summary: Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D30043188 fbshipit-source-id: d8675754b29fb58a28a06777f602098da6dbc27f * Flush operations queue when animation starts Summary: changelog: [internal] If nodesManager has the information if animated node is managed by Fabric, we can't decide if the operation queue should be flushed before it is flushed. Therefore, keep the information about animated nodes inside a set instead of nodesManager. For simplicity, I will refer to class `RCTNativeAnimatedTurboModule` as *NativeAnimated* and to `RCTNativeAnimatedNodesManager` as *NodesManager* Notice that each call to *NativeAnimated* is queued up in `_operations` or `_preOperations`. When the queues are flushed, only then methods are called on `RCTNativeAnimatedNodesManager`. There are two mechanisms that flush operations. One is triggered by `RCTMountingManager` before mounting operations are applied and after they are applied. This works fine but is important to paint the picture. The second mechanism is inside `[RCTNativeAnimatedTurboModule startAnimatingNode]`. It flushes the queues for Fabric nodes only (not sure why Fabric nodes only, I couldn't find any explanation in old diffs). It checks with *NativeAnimated* if a node is managed by Fabric. Keep in mind, *NodesManager* only knows about the nodes when the queues have been flushed. Exampe: JavaScript calls methods on *NativeAnimated*. For example: 1. `createNode` 2. `connectAnimatedNodeToView` 3. `startAnimatingNode`. (here, the queues should be flushed, since we are in Fabric) All of these operations are queued up and for as long as `RCTMountingManager` executes mounting, all proceeds as expected. But if those operations happen after mounting phase, `startAnimatingNode` will not flush the operations queues, because it can't tell if nodeTag is managed by fabric or it isn't. This is because *NodesManager* hasn't been notified about any new nodes. Reviewed By: JoshuaGross, p-sun Differential Revision: D30053890 fbshipit-source-id: b7fe24861d5300f9cfefa813a53df8330fa56d86 * iOS: Log error when invalid NSNull data is passed to RCTAsyncLocalStorage Summary: Changelog: [Internal] Differential Revision: D30081478 fbshipit-source-id: 7d425e71b020eaeb4eb1b33b500fbf5df7ea9c29 * fbshipit-source-id: 909b2667480ed96ae376896d966f6c27f5e73964 * Update OSS Buck definitions (#31948) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31948 Changelog: [Internal] Adds necessary shims to bring our BUCK files closer to parsing/building correctly in open source. This is part of fixing the Buck-based tests on CircleCI which were broken by https://github.com/facebook/react-native/commit/d4ee734f3297463fe7b54af6d69e4ea151cf4cf9. Reviewed By: sammy-SC Differential Revision: D30072866 fbshipit-source-id: 4aebd9f67dd0a102516603915d9a021032611279 * Update Android Dockerfile to include root BUCK file (#31950) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31950 Changelog: [Internal] Adds the root BUCK file to the Docker image we use to test RNTester on CircleCI. See https://github.com/facebook/react-native/commit/df9cd05621f58fe5c67f889b741bfff20c780b0e Reviewed By: ShikaSD Differential Revision: D30099261 fbshipit-source-id: 936c505a0f4e7b791743901a06fa3b14c40b183e * Check for negative `numberOfLines` in TextView Summary: Negative `numberOfLines` prop is not supported by Android and causes a crash during layout measurement. This change adds a check in JS to catch the error earlier. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30047103 fbshipit-source-id: 4248a0f573c3b6facd25c7ae6ce007a357a1469b * Fix NPE when hierarchy return null values Summary: This diff fixes a NullPointer that was being thorwn when hierarchy values are null changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095407 fbshipit-source-id: b0a13661b4506cf94eeb5d99923d4c12cba0f972 * Extend getInspectorDataForInstance to return props Summary: This diff extends the FabricUIManager.getInspectorDataForInstance to return the props of the React Native component associated to the view passed as a parameter. changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095406 fbshipit-source-id: 50fdba6636a1f5042dbc113e341c3cb2534a1b04 * Add documentation for FabricUIManager.getInspectorDataForInstance Summary: Add documentation for FabricUIManager.getInspectorDataForInstance changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095818 fbshipit-source-id: dfe8590598099e7581460ca45bc0e779690463a6 * chore: remove FlowFixMe (#29468) Summary: Removed FlowFixMe that has been fixed ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Removed FlowFixMe that has been fixed Pull Request resolved: https://github.com/facebook/react-native/pull/29468 Test Plan: flow check passes Reviewed By: JoshuaGross Differential Revision: D29967702 Pulled By: lunaleaps fbshipit-source-id: 541279287ba6f21c5c7290bcba7c282f092126ff * Move RCT* Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30030454 fbshipit-source-id: 02a4c36f5c5ca519e4de3d1a3d79708d0d0b6d01 * Move integration test Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032467 fbshipit-source-id: 56e293c821f02e78fe13f5e7f22bcb2b2050019a * Move RNTester unit/integration test Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032476 fbshipit-source-id: d1f9a39a6d2fc92f69b9ee931c2a0f3ba37687f6 * Move RCTTestApple into packages/rn-tester Summary: Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D30056021 fbshipit-source-id: 9012ca6934f95946ff157ca472aa6a6e84d7d7e9 * React Native sync for revisions 419cc9c...19092ac Summary: This sync includes the following changes: - **[19092ac8c](https://github.com/facebook/react/commit/19092ac8c )**: Re-add old Fabric Offscreen impl behind flag ([#22018](https://github.com/facebook/react/pull/22018)) //<Andrew Clark>// - **[215db465a](https://github.com/facebook/react/commit/215db465a )**: [Fabric] Add `flex: 1` to Offscreen view container ([#22019](https://github.com/facebook/react/pull/22019)) //<Andrew Clark>// - **[8a37b0ef3](https://github.com/facebook/react/commit/8a37b0ef3 )**: typos fixed ([#21955](https://github.com/facebook/react/pull/21955)) //<Sinan Sonmez (Chaush)>// - **[e3049bb85](https://github.com/facebook/react/commit/e3049bb85 )**: DevTools scheduling profiler: Add React component measures ([#22013](https://github.com/facebook/react/pull/22013)) //<Brian Vaughn>// - **[27bf6f9a8](https://github.com/facebook/react/commit/27bf6f9a8 )**: Scheduling profiler UX changes ([#21990](https://github.com/facebook/react/pull/21990)) //<Brian Vaughn>// - **[f0d354efc](https://github.com/facebook/react/commit/f0d354efc )**: [Fabric] Fix reparenting bug in legacy Suspense mount ([#21995](https://github.com/facebook/react/pull/21995)) //<Andrew Clark>// - **[34308b5ad](https://github.com/facebook/react/commit/34308b5ad )**: Tidy up early bailout logic at start of begin phase ([#21852](https://github.com/facebook/react/pull/21852)) //<Andrew Clark>// - **[321087d13](https://github.com/facebook/react/commit/321087d13 )**: [Fizz] Don't add aborted segments to the completedSegments list ([#21976](https://github.com/facebook/react/pull/21976)) //<Sebastian Markbåge>// - **[4cc8ec64c](https://github.com/facebook/react/commit/4cc8ec64c )**: Separate unit tests for ReactFabricHostComponent ([#21969](https://github.com/facebook/react/pull/21969)) //<Timothy Yung>// - **[d4d786493](https://github.com/facebook/react/commit/d4d786493 )**: Fix `ReactFabricHostComponent` methods if detached ([#21967](https://github.com/facebook/react/pull/21967)) //<Timothy Yung>// - **[392253a77](https://github.com/facebook/react/commit/392253a77 )**: [Fabric] Use container node to toggle the visibility of Offscreen and Suspense trees ([#21960](https://github.com/facebook/react/pull/21960)) //<Andrew Clark>// Changelog: [General][Changed] - React Native sync for revisions 419cc9c...19092ac jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D30092460 fbshipit-source-id: 9f118db2419a9a5db26a9b873868f91ab88f2f89 * refactor!: drop deprecated `StatusBarIOS` (#31466) Summary: This component has been merged with `StatusBar` and deprecated since [Jun 24, 2019](https://github.com/facebook/react-native/commit/a8337785539d572009d2cc4263aef7755ae03097) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [JavaScript] [Removed] - refactor!: drop deprecated `StatusBarIOS` Pull Request resolved: https://github.com/facebook/react-native/pull/31466 Test Plan: Warning when user imports `StatusBarIOS` Reviewed By: yungsters Differential Revision: D30109324 Pulled By: lunaleaps fbshipit-source-id: fa2d3aa2cf35206ed8a196e09f12af57d3b61ccc * Fix OSS Buck parsing errors (#31957) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31957 Changelog: [Internal] Some fixes for the GitHub shims for FB-internal Buck macros. Should fix the Buck-related breakages in the `test_android` and `test_docker` CI jobs. Also adds license headers to some recently-added files that didn't have them. Reviewed By: mdvacca Differential Revision: D30114177 fbshipit-source-id: 88a24fa7130bd98dd60568566bde51fcfc89df60 * Fix Buck package boundary violation involving RCTEventDispatcher.h (#31965) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31965 Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30030580 fbshipit-source-id: 3b4140a831c7ad7282aae0ff79c54014dcd82615 * Remove package boundary exceptions in OSS Buck config Summary: Changelog: [Internal] Reviewed By: stepancheg Differential Revision: D30102445 fbshipit-source-id: 571ab5dc41379e01d4482f64418f6383f660dbfa * Update JSLoader.cpp (#29270) Summary: Since react-native-cli is deprecated, the correct command should be `npx react-native start` Pull Request resolved: https://github.com/facebook/react-native/pull/29270 Reviewed By: sammy-SC Differential Revision: D30017028 Pulled By: sota000 fbshipit-source-id: cfcf9e1d150f51750a4e86133bd3167506ee7348 * Warn when negative `numberOfLines` prop set on <Text/> component Summary: Updates previous variant that was crashing a surface to the non-crashing variant. Now it prints error in console and modifies value to be 0. Changelog: [General][Fixed] Clamp negative values for `numberOfLines` in <Text> component Reviewed By: yungsters Differential Revision: D30129658 fbshipit-source-id: fda47a262365573514d3e1e4bf8a26f6d30cdae0 * Make So loading inside generated TMM delegates less confusing Summary: ## Rationale Inlining the maybeLoadSoLibrary private static method makes following the So load chain from TurboModuleManagerDelegate through ReactPackageTurboModuleManagerDelegate to each app's TurboModuleManagerDelegate much easier to understand. Changelog: [Internal] Reviewed By: sshic Differential Revision: D30082675 fbshipit-source-id: ff467d6ac8c792317dd9bdcd91844d3b480cbb60 * Add TODOs to unify component names between JS - Android - iOS - C++ Summary: EZ diff that adds a few TODOs to unify component names between JS - Android - iOS - C++ see task: T97384889 changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30139942 fbshipit-source-id: 91f51d04e7e7ecba7f059f94a121be43d820647d * Replace Paper -> old renderer Summary: Replace Paper -> old renderer changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30139941 fbshipit-source-id: 3bb1e81a3df018aa669f3dba1de445107d70116c * Fix Deadlock in RCTi18nUtil (iOS) (#31032) Summary: Note: PR to react-native-macos here https://github.com/microsoft/react-native-macos/pull/733 Internally in Microsoft code, we ran into a deadlock where the main queue and the UIManager queue were both trying to access `[RCTI18nUtil sharedInstance]`, and were blocked on each other. This is similar to an earlier issue with RCTScreenScale decsribed [here](https://github.com/facebook/react-native/issues/18096). To summarize: 1- RCTShadowView (on the UIManager queue) and RCTView (on the main queue) both try to access `[RCTI18nUtil sharedInstance]` 2- The UIManager thread gets there first, and lazily initializes the sharedInstance. Meanwhile, the main thread is waiting on a lock possessed by the UIManager thread 3- As part of the initialization, we set an NSUserDefault, which seems to require the (blocked) main thread. 4- Deadlock. For whatever reason, this only happens on debug. I did not figure out why, but I do know based on [this comment](https://github.com/facebook/react-native/issues/18096#issuecomment-368718081), that the UIManagerQueue should never block the main queue. The fix is to not use NSUserDefaults, and simpy use atomic properties instead. We get the thread safety for free, and it also simplifies the code somewhat without changing the public API. The downside is values aren't persisted anymore, but I do not think that was necessary / intended. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Fix deadlock on RCTi18nUtil Pull Request resolved: https://github.com/facebook/react-native/pull/31032 Test Plan: Ran the RTLExample in RNTester, and ensured switching to RTL still worked, and that setting forceRTL would still work after reloading the bundle. https://user-images.githubusercontent.com/6722175/108775429-aefdae80-7526-11eb-9a89-3114f7ddc2af.mov Reviewed By: javache Differential Revision: D29522152 Pulled By: RSNara fbshipit-source-id: 160840f63a7b1d6721b0fd8294fb11990a4509fa * Codegen: Always prepare filesystem Summary: For any Pod that uses the codegen, create references to code-gen'd files in local filesystem regardless of Pod install status by invoking the same command used by `prepare_command` whenever `pod install` is run. This works around the issue where CocoaPods may decide to skip running `prepare_command`. While this is expected CocoaPods behavior, external factors may result in the deletion of the original code-gen'd files in which case we need to make sure that running `pod install` will bring these files back. See Test Plan for more details on how to reproduce the issue being fixed. Fixes T97404254. Changelog: [Internal] Codegen invoked with every `pod install` regardless of pod install status Differential Revision: D30116640 fbshipit-source-id: 81db5dff1d4c4f8ae22b5dbe822609c770789ac8 * - Bump CLI to ^6.0.0 (#31971) Summary: Upgrade CLI to the v6 stable. [Changelog](https://github.com/react-native-community/cli/releases/tag/v6.0.0) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fix] - Bump CLI to ^6.0.0 Pull Request resolved: https://github.com/facebook/react-native/pull/31971 Test Plan: cc kelset grabbou Reviewed By: TheSavior Differential Revision: D30158170 Pulled By: ShikaSD fbshipit-source-id: 392e22cb112a830778149b4a2b4a19198facf42b * Fix to make taps on views outside parent bounds work on Android (#29039) Summary: By default, Views in React Native have `overflow: visible`. When a child view is outside of the parent view's boundaries, it's visible on Android, but not tappable. This behaviour is incorrect, and doesn't match iOS behaviour. - Taps on Views outside the bounds of a parent with `overflow: visible` (or unset) should register - Taps on Views outside the bounds of a parent with `overflow: hidden` should continue to not register Related issues: - fixes https://github.com/facebook/react-native/issues/21455 - fixes https://github.com/facebook/react-native/issues/27061 - fixes https://github.com/facebook/react-native/issues/27232 ### Fix - Made `findTouchTargetView` not check that the touch was in the bounds of the immediate children, but instead - Check that the touch is in its own bounds when returning itself - Check that the touch for a child is in its own bounds only when `overflow: hidden` is set - Modified related code to adjust to this change - Added RNTesterApp test ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - Allow taps on views outside the bounds of a parent with `overflow: hidden` Pull Request resolved: https://github.com/facebook/react-native/pull/29039 Test Plan: This can be tested with 2 examples added to the bottom of the PointerEvents page of the RNTesterApp: | Before | After | | --- | --- | | ![Before](https://user-images.githubusercontent.com/2937410/83610933-19079b00-a535-11ea-8add-22daae0191e1.gif) | ![After](https://user-images.githubusercontent.com/2937410/83610583-8830bf80-a534-11ea-97e2-71e180a70343.gif) | Reviewed By: ShikaSD Differential Revision: D30104853 Pulled By: JoshuaGross fbshipit-source-id: 644a109706258bfe829096354dfe477599e2db23 * Create slider accessibility delegate in createViewInstance (#31942) Summary: Recent change in https://github.com/facebook/react-native/pull/31865 made it so if `ReactSliderManager` is created on the react context creation thread it will crash with the following error. This happens because `ReactAccessibilityDelegate` tries to create a handler on a thread without a looper. This seems to happen because react-native-reanimated tries to get the UIManager module during its initialization which will cause view managers to be created and explains why the crash probably does not happens in RNTester or using only RN bundled modules. ``` 08-03 14:44:56.318 21206 21360 E AndroidRuntime: FATAL EXCEPTION: create_react_context 08-03 14:44:56.318 21206 21360 E AndroidRuntime: Process: com.th3rdwave, PID: 21206 08-03 14:44:56.318 21206 21360 E AndroidRuntime: java.lang.ExceptionInInitializerError 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.shell.MainReactPackage.createViewManagers(MainReactPackage.java:166) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.getOrCreateViewManagers(ReactInstanceManager.java:882) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:137) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.CoreModulesPackage.getModule(CoreModulesPackage.java:102) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:159) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:147) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:153) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:486) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:462) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.bridge.ReactContext.getNativeModule(ReactContext.java:176) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.swmansion.reanimated.NodesManager.<init>(NodesManager.java:153) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.swmansion.reanimated.ReanimatedModule.getNodesManager(ReanimatedModule.java:101) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:17) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.th3rdwave.MainApplication$1$1.getJSIModules(MainApplication.java:135) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1329) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1058) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at java.lang.Thread.run(Thread.java:923) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: Caused by: java.lang.RuntimeException: Can't create handler inside thread Thread[create_react_context,5,main] that has not called Looper.prepare() 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at android.os.Handler.<init>(Handler.java:227) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at android.os.Handler.<init>(Handler.java:129) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.uimanager.ReactAccessibilityDelegate$1.<init>(ReactAccessibilityDelegate.java:185) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.uimanager.ReactAccessibilityDelegate.<init>(ReactAccessibilityDelegate.java:184) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.views.slider.ReactSliderManager$ReactSliderAccessibilityDelegate.<init>(ReactSliderManager.java:281) 08-03 14:44:56.318 21206 21360 E AndroidRuntime: at com.facebook.react.views.slider.ReactSliderManager.<clinit>(ReactSliderManager.java:301) ``` To fix it I changed the delegate creation to be done in `createViewInstance` which will be called on main thread. This is also more in line with how other accessibility delegates are created for other view managers. Since Slider is probably not used a lot, creating more delegate instance won't be an issue. Another alternative could be to initialize a Looper on the thread that creates the react context, but it seems more involved and probably not needed. ## Changelog [Android] [Fixed] - Create slider accessibility delegate in createViewInstance Pull Request resolved: https://github.com/facebook/react-native/pull/31942 Test Plan: Reproduced the crash in an app and made sure this patch fixes it. Reviewed By: JoshuaGross Differential Revision: D30167451 Pulled By: p-sun fbshipit-source-id: 5327130064db52ac0086e1ae5541a1b3e3954f15 * Flush operations queue when animation starts in RCTNativeAnimatedModule Summary: changelog: [internal] If nodesManager has the information if animated node is managed by Fabric, we can't decide if the operation queue should be flushed before it is flushed. Therefore, keep the information about animated nodes inside a set instead of nodesManager. For simplicity, I will refer to class `RCTNativeAnimatedTurboModule` as *NativeAnimated* and to `RCTNativeAnimatedNodesManager` as *NodesManager* Notice that each call to *NativeAnimated* is queued up in `_operations` or `_preOperations`. When the queues are flushed, only then methods are called on `RCTNativeAnimatedNodesManager`. There are two mechanisms that flush operations. One is triggered by `RCTMountingManager` before mounting operations are applied and after they are applied. This works fine but is important to paint the picture. The second mechanism is inside `[RCTNativeAnimatedTurboModule startAnimatingNode]`. It flushes the queues for Fabric nodes only (not sure why Fabric nodes only, I couldn't find any explanation in old diffs). It checks with *NativeAnimated* if a node is managed by Fabric. Keep in mind, *NodesManager* only knows about the nodes when the queues have been flushed. Exampe: JavaScript calls methods on *NativeAnimated*. For example: 1. `createNode` 2. `connectAnimatedNodeToView` 3. `startAnimatingNode`. (here, the queues should be flushed, since we are in Fabric) All of these operations are queued up and for as long as `RCTMountingManager` executes mounting, all proceeds as expected. But if those operations happen after mounting phase, `startAnimatingNode` will not flush the operations queues, because it can't tell if nodeTag is managed by fabric or it isn't. This is because *NodesManager* hasn't been notified about any new nodes. Reviewed By: RSNara Differential Revision: D30099010 fbshipit-source-id: d3fc021dd4346d1cbbda3b49ecd9d982c543e705 * Add Flow libdefs for `global` Summary: Changelog: [Internal] Currently, `global` is typed as `any` and any `global` properties accesses are untyped. This diff add a flow libdefs for the `global` object as a start point. Reviewed By: yungsters Differential Revision: D30000895 fbshipit-source-id: ab6988d01921a3c2a3434b534b2f69083570fb6d * Feat/dynamic color borders (#31140) Summary: Following up my issue https://github.com/facebook/react-native/issues/30377 I decided to have a look myself and contribute. On iOS, border colors using `PlatformColor` or `DynamicColorIOS` do not update on the fly when the system appearance updates. When the component mounts, the color is correct for the current appearance, but a component unmout/remount is required in order to see the color changing after a system appearance change. Fixes https://github.com/facebook/react-native/issues/30377 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Added] - Added `PlatformColor` and `DynamicColorIOS` examples to RNTester Pull Request resolved: https://github.com/facebook/react-native/pull/31140 Test Plan: I added 2 border examples, one using `PlatformColor` and the other using `DynamicColorIOS`. I recorded the following before/after videos showing the effect of my changes: https://user-images.githubusercontent.com/4186230/110828711-9c5dd600-8297-11eb-8bc8-bdc9054b6b44.mov https://user-images.githubusercontent.com/4186230/110828800-b4cdf080-8297-11eb-9d23-07f69dc3a702.mov Reviewed By: lunaleaps Differential Revision: D30073335 Pulled By: charlesbdudley fbshipit-source-id: 2990a6ed40dd08fc2b1f20e93d6f21ec3d8980da * Cleanup warnings in the NDK build Summary: This diff is cleaning up some configurations in the `Android.mk` files of the native build. Specifically I simplified some of the rules and removed a duplicate file specification. Changelog: Internal - Cleanup warnings in the NDK build Reviewed By: ShikaSD Differential Revision: D30220715 fbshipit-source-id: a100953fe977879a6d28cb0a2ef4b3358fb7c774 * Back out "Flush operations queue when animation starts in RCTNativeAnimatedModule" Summary: Changelog: [internal] Original commit changeset: d3fc021dd434 Reviewed By: motiz88 Differential Revision: D30223203 fbshipit-source-id: 8edf79e109858855d13a36fabab2bcae36180df2 * Fix Undefined symbol: __swift_FORCE_LOAD_$_swiftFileProvider when building with Xcode 13 Summary: Changelog: Fix Xcode 13 build error in HelloWorld template Error: {F640400959} Fix: Embed `libswiftFileProvider.tbd` in app. Reviewed By: hramos Differential Revision: D30192423 fbshipit-source-id: 59dbde441e61bc6ab870e2324e5202f4772bee8e * introduce RCTPlatformColorUtils Summary: Changelog: [Internal] in this diff, we add the logic to handle converting PlatformColor strings to their corresponding RGBA values, using `UIColor`'s API as the source of truth of these colors. functionality not covered yet: - customColor - iOS Dynamic Colors - Variant Colors Reviewed By: sammy-SC Differential Revision: D30103451 fbshipit-source-id: 7d7be0f08dc2fb95b606b8f5d73784766787a574 * hook up PlatformColorParser to RCTPlatformColorUtils Summary: Changelog: [Internal] in this diff, we iterate through the list of color passed down in the props, and write the RGBA value of the first valid UIColor Reviewed By: sammy-SC Differential Revision: D30110297 fbshipit-source-id: c6730110129d0fe1f784fa89cd26b46d3dda7f28 * replace SharedColor alias with class for more reliable template deduction Summary: Changelog: [Internal] when we try to write a `SharedColor` type prop in the renderer, the template function we match to is the following: https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/js/react-native-github/ReactCommon/react/renderer/core/propsConversions.h?commit=28dacb972cda702d37dedd4612bc67c212d4d9eb&lines=108-132 this is because `SharedColor` is an alias of `better::optional<Color>`. ultimately, this causes a crash in L130 - the template deduction in L130 interprets the T as an `int`, rather than `SharedColor`, but our `rawValue` is pointing …
* Adding metadata to React Native QPL points Summary: Changelog: [General][Added] - Added data field to markerPoint to allow callers to add additional arbitrary string data to logged points Reviewed By: dmitry-voronkevich Differential Revision: D29764274 fbshipit-source-id: b0d21e3b20a5353351424afb10c950f3e8689887 * Resolve some XCode warnings (#31883) Summary: UIAccessibilityVoiceOverStatusChanged deprecated (iOS 11+) in favor for UIAccessibilityVoiceOverStatusDidChangeNotification ref: https://developer.apple.com/documentation/uikit/uiaccessibilityvoiceoverstatuschanged?language=objc topLayoutGuide/bottomLayoutGuide deprecated (iOS 11+) in favor for safeAreaLayoutGuide ref: https://developer.apple.com/documentation/uikit/uiviewcontroller/1621367-toplayoutguide This block declaration is not a prototype warnings fixed by adding void to specify no parameters ref: https://stackoverflow.com/questions/47916585/objective-c-block-parameter-issue-this-block-declaration-is-not-a-prototype ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Fixed] - Resolved some deprecations Pull Request resolved: https://github.com/facebook/react-native/pull/31883 Test Plan: Tests should pass, no functionality should change. Reviewed By: fkgozali Differential Revision: D29822033 Pulled By: mdvacca fbshipit-source-id: dec8d612885634aca090ac3372cd4c7bf8a197ee * Migrate to androidx.autofill.HintConstants & Support all constant types (#28008) Summary: Fix for https://github.com/facebook/react-native/issues/27952. Noticed more than just `AUTOFILL_HINT_NEW_PASSWORD` were missing, this PR will support every `AUTOFILL_HINT_*` type. ## Changelog [Android] [Added] - Added all autofill types to TextEdit Pull Request resolved: https://github.com/facebook/react-native/pull/28008 Reviewed By: sturmen Differential Revision: D29766235 Pulled By: mdvacca fbshipit-source-id: d5171aef8092d37716fddcb6f3443637a4af8481 * Fix mislabelled polyfills for Object.entries and Object.values (#31880) Summary: The polyfills for `Object.entries` and `Object.values` are in a file named `Object.es7.js` when these APIs form part of ES8/ES2017 (https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_–_ECMAScript_2017). The docs (https://reactnative.dev/docs/javascript-environment#polyfills) list these correctly as ES8 so I thought it might reduce confusion if anyone starts looking into the polyfills in the future like I did. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Fixed] - Fix filename to include correct ECMA spec Pull Request resolved: https://github.com/facebook/react-native/pull/31880 Test Plan: All unit tests pass. Reviewed By: yungsters Differential Revision: D29820165 Pulled By: ShikaSD fbshipit-source-id: 2a4eb58bed7b7a4089406665c5c9115cb1773ff6 * integrate RCTImpressionTrackingView into Fabric on Android Summary: This diff integrates RCTImpressionTrackingView into Fabric on Android Following https://www.internalfb.com/intern/wiki/React_Native/Migration_of_RN_Renderer_(Fabric)/ and https://fb.quip.com/T8AtArEVcb0Z Changelog: [Internal] Reviewed By: bearzx Differential Revision: D29804625 fbshipit-source-id: 16e89d629390093ace51d3b25725c37a49a08a39 * Implement textTransform prop Summary: Added to C++ props, but realized this is already implemented using C++ state in Android, so added to C++ state to keep this diff simpler. Keeping the C++ props change for future use. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D29805267 fbshipit-source-id: c1fe2dc34af8bc69352ee48a5d60ba998194e3f7 * Manually some remove existential types from xplat/js Summary: Manually remove some existential types. Changelog: [Internal] Reviewed By: gkz Differential Revision: D29724881 fbshipit-source-id: e21558dc033fa07d0b8a188eb64e14ddcf7df2ac * Remove existential types from xplat/js Summary: Changelog: [Internal] Reviewed By: pieterv Differential Revision: D29724915 fbshipit-source-id: 97cbeefbba2ddc2e1088dfe19db14fa545213549 * Deploy 0.156.0 to xplat Summary: Changelog: [Internal] Reviewed By: gkz Differential Revision: D29833943 fbshipit-source-id: cb0260e1f4119b4208d42ef1267e253f6f84ff19 * RN: 5s Delay in `ReactAppInstrumentationTestCase` Summary: Tests like `CatalystSubviewsClippingTestCase` are intermittently failing due to registered callable modules not yet being registered. Increasing the timeout to wait for the bundle execution to mitigate these intermittent failures. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29835227 fbshipit-source-id: c9fe03202ad4028d3785216d50c6c173a56c6d84 * Wrong warning message Summary: * it says focusTextInput but the function name is blurTextInput * probably the message was copy-pasted from `focusTextInput` where is the same error message. Changelog: [Internal] Reviewed By: arhelmus Differential Revision: D29845922 fbshipit-source-id: 21fd3e572c32779c13f6909556153d07dc7a416f * Add flow, flowfixmes to RNTesterModuleContainer and Animation examples Summary: Changelog: [Internal] - RNTester: Add flow to RNTesterModuleContainer, render example as component, remove flowfixmes from Animation examples Reviewed By: yungsters Differential Revision: D29783772 fbshipit-source-id: 64ec6f247822b25c8cc6f64b192d17081be9c1f9 * Add useNativeDriver toggle UI Summary: Changelog: [Internal] - Update Animation examples to toggle useNativeDriver There are issues when we toggle the native driver on and off. Where once off, the animations don't seem to update anymore, until we turn nativeDriver back on. See videos in testplan Reviewed By: yungsters Differential Revision: D29774939 fbshipit-source-id: cf6d70c1b574a87bb803510196dfb273b36de5e1 * Downgrade warning of view illegally being added to parent to Soft Exception Summary: - This is crashing too much in debug, which is good signal but making it harder to test, and test unrelated features. Reviewed By: JoshuaGross Differential Revision: D29857626 fbshipit-source-id: c52cfb6131747ae420b27de0591620fe79f47359 * Add INFO, and MENU key event support to Android TV (#31884) Summary: Add INFO, and MENU key event support to Android TV ## Changelog [Android] [Added] - Add INFO, and MENU key event support to Android TV Pull Request resolved: https://github.com/facebook/react-native/pull/31884 Test Plan: We develop application that utilizes aforementioned events, we've made a build against react-native fork with these changes and it was working as expected. These changes just add 2 more button mappings, so I don't think it requires some extensive testing. Reviewed By: mdvacca Differential Revision: D29821996 Pulled By: yungsters fbshipit-source-id: 5f97c29c9c29d6e3bafed352b8b65f0cb02f3f1d * Bump Flipper to 0.99.0 (#31896) Summary: Includes fix included in a Flipper Pod for incorrect timestamps in the Network viewer with iOS apps https://github.com/facebook/flipper/commit/1cf745613390e5ce87b72e09016c42784cb0566a ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [general][changed] - Update Flipper to 0.99.0 [CATEGORY] [TYPE] - Message Pull Request resolved: https://github.com/facebook/react-native/pull/31896 Reviewed By: fkgozali Differential Revision: D29881218 Pulled By: mdvacca fbshipit-source-id: a206faa3d7b969a708d286884cff83bed5453d22 * Fix testID support for TextInput, Slider and ScrollView component (#31865) Summary: With the advent of https://github.com/facebook/react-native/issues/29610, we are now able to use the `testID` view prop on Android in black-box testing framework through the view's `resource-id`. But after testing it, I noticed that on the `TextInput`, `Slider` and `ScrollView` components, the `testID` prop was not exposed as the `resource-id` properly. The main issue was that those component was using the `AccessibilityDelegateCompat` instead of the `ReactAccessibilityDelegate`. ## Changelog [Android] [Fixed] - Fix `testID` prop for `TextInput`, `Slider` and `ScrollView` components Pull Request resolved: https://github.com/facebook/react-native/pull/31865 Test Plan: ![test-screenshot](https://user-images.githubusercontent.com/69216913/125802180-c0791a8c-a740-4657-a44f-42b1885eee39.png) Reviewed By: mdvacca Differential Revision: D29765333 Pulled By: yungsters fbshipit-source-id: 2b8e362257e3e5fdcd20330280c588dabb44f28a * EditText: maintain cursor position when text changes Summary: Similar to D29786190 (https://github.com/facebook/react-native/commit/b0e39b2ed9b66b378eb75bee9e692fc801431ddd) on iOS, keeps cursor position constant to the end of the text whenever text changes without selection updates. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29879663 fbshipit-source-id: da1b50a99ae3b9ef796423146ba49e4172e286df * Expose new API RuntimeExecutor.executeSynchronouslyOnSameThread_CAN_DEADLOCK Summary: This diff exposes a new API Expose new API RuntimeExecutor.executeSynchronouslyOnSameThread_CAN_DEADLOCK. This API will be used by the next diffs of the stack changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29764996 fbshipit-source-id: e6cd6799e16f2e47a353b7504d58d80aa49447d8 * Expose new struct InspectorData Summary: This diff exposes a new struct InspectorData that will be used by FabricUIManager.getInspectorDataForInstance to return metadata of stacktraces. See next diffs of the stack changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29764995 fbshipit-source-id: 6a2ab819623e379795e59002be0e4d40ac73b9a6 * Expose new API FabricUIManager.getInspectorDataForInstance Summary: This diff exposes a new API in FabricUIManager called getInspectorDataForInstance. The goal of this method is to return React metadata for a Native view. This data will be used from partner teams to build tools that uses React metadata in RN Data returned from React: P429701924 changelog: [internal] internal allow-large-files Reviewed By: JoshuaGross Differential Revision: D29747864 fbshipit-source-id: 8cb55573be08cb530f7e3c83eed8b4fcf43e7781 * React Native sync for revisions 568dc35...cae6350 Summary: This sync includes the following changes: - **[cae635054](https://github.com/facebook/react/commit/cae635054 )**: `act`: Resolve to return value of scope function ([#21759](https://github.com/facebook/react/pull/21759)) //<Andrew Clark>// - **[e2453e200](https://github.com/facebook/react/commit/e2453e200 )**: act: Add test for bypassing queueMicrotask ([#21743](https://github.com/facebook/react/pull/21743)) //<Andrew Clark>// - **[534c9c52e](https://github.com/facebook/react/commit/534c9c52e )**: Move error logging to update callback ([#21737](https://github.com/facebook/react/pull/21737)) //<Dan Abramov>// - **[51b0becf3](https://github.com/facebook/react/commit/51b0becf3 )**: Always keep disabled logs in the second pass ([#21739](https://github.com/facebook/react/pull/21739)) //<Dan Abramov>// - **[7fec38041](https://github.com/facebook/react/commit/7fec38041 )**: Log and show error overlay for commit phase errors ([#21723](https://github.com/facebook/react/pull/21723)) //<Dan Abramov>// - **[27c9c95e2](https://github.com/facebook/react/commit/27c9c95e2 )**: act: Bypass microtask for "default sync" updates ([#21740](https://github.com/facebook/react/pull/21740)) //<Andrew Clark>// - **[355591add](https://github.com/facebook/react/commit/355591add )**: Next/experimental release versions include commit date ([#21700](https://github.com/facebook/react/pull/21700)) //<Brian Vaughn>// - **[d7dce572c](https://github.com/facebook/react/commit/d7dce572c )**: Remove internal `act` builds from public modules ([#21721](https://github.com/facebook/react/pull/21721)) //<Andrew Clark>// - **[06f7b4f43](https://github.com/facebook/react/commit/06f7b4f43 )**: `act` should work without mock Scheduler ([#21714](https://github.com/facebook/react/pull/21714)) //<Andrew Clark>// Changelog: [General][Changed] - React Native sync for revisions 568dc35...cae6350 jest_e2e[run_all_tests] Reviewed By: JoshuaGross, ShikaSD Differential Revision: D29555979 fbshipit-source-id: 0afc869cc007bce417f0020d3ee4dc8b0ea5beb9 * Before removing a task from queue, make sure it was executed Summary: Changelog: [internal] If task that is being executed schedules a new task with higher priority, the new task will be dropped from the queue. To fix this, we always check if the top of the queue is what was executed and only then remove it. Example: Let's say there is task A with priority "normal". When we execute task A (which is not removed from the queue until later), it adds a task B with "immediate" priority. So priority queue now has two tasks: [1: B, 2: A] After task A finishes, inside workLoop, it will pop from top of the priority queue. But task A is no longer top of the priority queue (this is the bug) and it pops B. B is never executed and A is executed twice. Reviewed By: ShikaSD Differential Revision: D29841433 fbshipit-source-id: b2f1474fdfc7b3e2d42bae5b7f4ac7e6c3a37b54 * Make mHybridData thread safe for EventEmitterWrapper Summary: In T94154173, when calling ```EventEmitterWrapper->invoke()```, hybrid function ```invokeEvent``` is null, even if we checked that ```mHybridData``` is valid before calling ```invokeEvent```. **Theory:** ```invoke()``` is called from ```mqt_js``` thread, ```desotry()``` is called from ```main``` thread, which cause multi-thread access of```mHybridData```. So if ```desotry()``` is called after ```isValid()``` check and before calling ```invokeEvent()```, ```invokeEvent``` could be destroyed and is null. I can reproduce with above theory: {F633411001} **Fix:** Make functions synchronized so ```mHybridData``` can be thread safe. Changelog: [Android][Fixed] - Make mHybridData thread safe Reviewed By: RSNara Differential Revision: D29792453 fbshipit-source-id: 8b4c754d53ece933be7b2cf99c6cd026b39e24ad * Make initializeMessageQueueThreads() thread safe Summary: **Context:** Issue: ```java.lang.IllegalStateException: Message queue threads already initialized at com.facebook.react.bridge.ReactContext.initializeMessageQueueThreads(ReactContext.java:100) ``` Possible root cause: 1, ReactContext.initializeMessageQueueThreads() can be called from different threads, so it's not thread safe 2, ReactContext.initializeMessageQueueThreads() is called again without detroying the threads. **Fix:** Make initializeMessageQueueThreads() thread safe. If this won't fix T93983690, I'll continue investigating with possible root cause 2. Changelog: [Android][Changed] - Make initializeMessageQueueThreads() thread safe Reviewed By: GijsWeterings Differential Revision: D29877386 fbshipit-source-id: 11b32c7184e9e8d6f882474fd607538df12276b7 * Handle OSS renderers in sync script Summary: Changelog: [Internal] Reviewed By: ShikaSD Differential Revision: D29896358 fbshipit-source-id: 83a9c124a01945706c4bdced8cf6e997e14f831c * Back out "Use atomic pointer to prevent race during teardown" Summary: Changelog: [internal] Original commit changeset: 390e773283a7 Original diff didn't resolve crash T82119127. Let's back this out and investigate again. Reviewed By: mdvacca Differential Revision: D29909878 fbshipit-source-id: 54b054f4a5c97b8f6369f8790c2cf32a56c4fbd2 * Back out "Use atomic pointer for animationDelegate_ to prevent race during teardown" Summary: Changelog: [internal] Original commit changeset: 6cb898caf7c2 This change doesn't fix LayoutAnimation crashes. Let's back it out. Reviewed By: fkgozali Differential Revision: D29909973 fbshipit-source-id: 34926ace220e6b269bb938a3da72c977b0608187 * add persistentScrollbar option example for ScrollView (#31895) Summary: There was an unused example in ScrollView example, so I've added the example to RNTester App ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Added] - Added persistentScrollbar option example for ScrollView in RNTester App Pull Request resolved: https://github.com/facebook/react-native/pull/31895 Test Plan: - RNTester App builds and shows example properly on Android Reviewed By: sshic Differential Revision: D29881126 Pulled By: mdvacca fbshipit-source-id: 9e7e61c9d3f712cb767a78e729469fc95cb9953e * chore: fix dead link in comment (#31902) Summary: Fixed a link in a comment that lead to dead link whatwg-url changed the source directory from `lib` to `src` ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [INTERNAL] [FIXED] - fix dead link in a comment Pull Request resolved: https://github.com/facebook/react-native/pull/31902 Test Plan: - [ ] Changed URL opens properly Reviewed By: charlesbdudley Differential Revision: D29915170 Pulled By: lunaleaps fbshipit-source-id: 00b69db82f51d16cf887cd4540a159132ad7d771 * Remove gating for on demand view mounting Summary: Changelog: [internal] This feature has shipped. I remove gating here. Reviewed By: mdvacca Differential Revision: D29906460 fbshipit-source-id: 23433cfd4d618633b135d8c858ce6cf90cfe9fa1 * Add RNTester cases for Animated Easing API Summary: - Update `RNTesterNavBar` to be positioned relatively to allow for scroll views to not be clipped - Add EasingExample with example animations taken from https://reactnative.dev/docs/easing Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D29744160 fbshipit-source-id: d0e2112769d74dd34e11477f1d3b1f8f0ffebc03 * Animated Transform Styles Example Summary: Changelog: [Internal] - Add an example to demo all the transform properties. Reviewed By: charlesbdudley Differential Revision: D29865790 fbshipit-source-id: 79174457071de8fca9b0aab8bf8dcc543ea9a0a3 * Rename immediate to ReactNativeMicrotask in Bridge Summary: Changelog: [Internal] This diff replaced all the internal occurrences of "Immediate" with "ReactNativeMicrotask" in the legacy bridge and then polyfilled the original immediate APIs during the timer setup phases as aliases of them. Note that this diff is part of a larger refactoring. Reviewed By: RSNara Differential Revision: D29785430 fbshipit-source-id: 7325d2a7358a6c9baa3e9abb8acf90414de5072f * Implement View.removeClippedSubviews prop Summary: Changelog: [internal] Fabric didn't have prop [removeClippedSubviews](https://reactnative.dev/docs/view#removeclippedsubviews) implemented. This diff adds it. It is Reviewed By: JoshuaGross Differential Revision: D29906458 fbshipit-source-id: 5851fa41d7facea9aab73ca131b4a0d23a2411ea * Add "Use Native Driver" control to RNTester Animated Composing example Summary: Changelog: [Internal] Reviewed By: yungsters Differential Revision: D29832704 fbshipit-source-id: dfd37d08d0f25fe86716a21682648894e8adad8b * docs: Fix dead links in README for rn-tester (#31901) Summary: Part of https://github.com/facebook/react-native/issues/31788 ~Updated link in README that was pointing to master branch to main branch~ Realized that link in rn-tester README and ReactAndroid README leads to a dead link, so I've fixed the links ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [INTERNAL] [FIXED] - Fix dead links in README Pull Request resolved: https://github.com/facebook/react-native/pull/31901 Test Plan: - [ ] Updated link directs you to appropriate page Reviewed By: PeteTheHeat Differential Revision: D29933044 Pulled By: GijsWeterings fbshipit-source-id: c1f301626acbb2995d74f78d8bc19214c70e9319 * docs: update links to forwarded page (#31903) Summary: Some of the links in `CONTRIBUTING.md` redirects you to a different page. I've fixed the links so each link would directly send users to the appropriate page. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [INTERNAL] [Changed] - update links in CONTRIBUTING.md Pull Request resolved: https://github.com/facebook/react-native/pull/31903 Test Plan: - [ ] Change links shows the appropriate content Reviewed By: lunaleaps Differential Revision: D29933105 Pulled By: GijsWeterings fbshipit-source-id: b5be74181f8a8e88d8f43e44c469337b7393dedf * Remove redundant warnings for RCTMountingManager Summary: Changelog: [internal] The warnings are in-actionable for product engineers. Reviewed By: JoshuaGross Differential Revision: D29911438 fbshipit-source-id: f0f81588e8cbe88059e531c8be302ab19b8eb83f * Ignore when a text string or number is supplied as a child. Summary: Currently, React Native throws an invariant violation error when a text string or number is supplied as a child. This is undesirable because core library components should be fault-tolerant and degrade gracefully (with soft errors, if relevant). This change will work when a change in the host configs are landed (https://github.com/facebook/react/pull/21953). Changelog: [internal] Reviewed By: yungsters, sammy-SC Differential Revision: D29894182 fbshipit-source-id: 827ff299991a476b57981382d196c7ee1396ec28 * React Native sync for revisions cae6350...419cc9c Summary: This sync includes the following changes: - **[419cc9c37](https://github.com/facebook/react/commit/419cc9c37 )**: Fix: Hide new/updated nodes in already hidden tree ([#21929](https://github.com/facebook/react/pull/21929)) //<Andrew Clark>// - **[4758e4533](https://github.com/facebook/react/commit/4758e4533 )**: React Native: Export getInspectorDataForInstance API ([#21572](https://github.com/facebook/react/pull/21572)) //<Brian Vaughn>// - **[ae5d26154](https://github.com/facebook/react/commit/ae5d26154 )**: Fix: LegacyHidden should not toggle effects ([#21928](https://github.com/facebook/react/pull/21928)) //<Andrew Clark>// - **[9ab90de60](https://github.com/facebook/react/commit/9ab90de60 )**: Clean-up: Move Offscreen logic from Suspense fiber ([#21925](https://github.com/facebook/react/pull/21925)) //<Andrew Clark>// - **[3f62dec84](https://github.com/facebook/react/commit/3f62dec84 )**: Typo fix ([#21729](https://github.com/facebook/react/pull/21729)) //<Deniz Susman>// - **[5579f1dc8](https://github.com/facebook/react/commit/5579f1dc8 )**: Update test comments with explanations ([#21857](https://github.com/facebook/react/pull/21857)) //<Ricky>// - **[262ff7ad2](https://github.com/facebook/react/commit/262ff7ad2 )**: Refactor "disappear" logic into its own traversal ([#21901](https://github.com/facebook/react/pull/21901)) //<Andrew Clark>// - **[34600f4fa](https://github.com/facebook/react/commit/34600f4fa )**: Refactor "reappear" logic into its own traversal ([#21898](https://github.com/facebook/react/pull/21898)) //<Andrew Clark>// - **[310187264](https://github.com/facebook/react/commit/310187264 )**: Clean up flushSync flow types ([#21887](https://github.com/facebook/react/pull/21887)) //<Ricky>// - **[a97b5ac07](https://github.com/facebook/react/commit/a97b5ac07 )**: [Bugfix] Don't hide/unhide unless visibility changes ([#21875](https://github.com/facebook/react/pull/21875)) //<Andrew Clark>// - **[81346764b](https://github.com/facebook/react/commit/81346764b )**: Run persistent tests in more configurations in CI ([#21880](https://github.com/facebook/react/pull/21880)) //<Andrew Clark>// - **[9090257e6](https://github.com/facebook/react/commit/9090257e6 )**: fix: restore execution context after RetryAfterError completed ([#21766](https://github.com/facebook/react/pull/21766)) //<Sebastian Silbermann>// - **[14bac6193](https://github.com/facebook/react/commit/14bac6193 )**: Allow components to render undefined ([#21869](https://github.com/facebook/react/pull/21869)) //<Ricky>// - **[87b67d319](https://github.com/facebook/react/commit/87b67d319 )**: Enable scheduling profiler flag for react-dom profiling builds ([#21867](https://github.com/facebook/react/pull/21867)) //<Brian Vaughn>// - **[464f27572](https://github.com/facebook/react/commit/464f27572 )**: Update link to flow ([#21862](https://github.com/facebook/react/pull/21862)) //<Ehsan Hosseini>// - **[9f5224a9c](https://github.com/facebook/react/commit/9f5224a9c )**: Restore DevTools console message ([#21864](https://github.com/facebook/react/pull/21864)) //<Dan Abramov>// - **[a4ecd85e8](https://github.com/facebook/react/commit/a4ecd85e8 )**: act: Batch updates, even in legacy roots ([#21797](https://github.com/facebook/react/pull/21797)) //<Andrew Clark>// - **[c2c6ea1fd](https://github.com/facebook/react/commit/c2c6ea1fd )**: Capture suspense boundaries with undefined fallbacks ([#21854](https://github.com/facebook/react/pull/21854)) //<Ricky>// - **[0f09f14ae](https://github.com/facebook/react/commit/0f09f14ae )**: Check if already rendering before flushing //<Andrew Clark>// - **[54e88ed12](https://github.com/facebook/react/commit/54e88ed12 )**: Bugfix: Flush legacy sync passive effects at beginning of event ([#21846](https://github.com/facebook/react/pull/21846)) //<Andrew Clark>// - **[cb8afda18](https://github.com/facebook/react/commit/cb8afda18 )**: Add test for #21837 ([#21842](https://github.com/facebook/react/pull/21842)) //<Andrew Clark>// - **[f85f429d5](https://github.com/facebook/react/commit/f85f429d5 )**: Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839)) ([#21841](https://github.com/facebook/react/pull/21841)) //<Andrew Clark>// - **[84639ab53](https://github.com/facebook/react/commit/84639ab53 )**: Guard against reused fibers in React Native commands ([#21837](https://github.com/facebook/react/pull/21837)) //<Timothy Yung>// - **[c549bc491](https://github.com/facebook/react/commit/c549bc491 )**: Revert "Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839))" ([#21840](https://github.com/facebook/react/pull/21840)) //<Timothy Yung>// - **[59d3aca68](https://github.com/facebook/react/commit/59d3aca68 )**: Use `act()` in ReactFabric tests ([#21839](https://github.com/facebook/react/pull/21839)) //<Timothy Yung>// - **[9ccc25a0e](https://github.com/facebook/react/commit/9ccc25a0e )**: Reverting recent flushSync changes ([#21816](https://github.com/facebook/react/pull/21816)) //<Brian Vaughn>// - **[ed6c091fe](https://github.com/facebook/react/commit/ed6c091fe )**: Replace unbatchedUpdates with flushSync ([#21776](https://github.com/facebook/react/pull/21776)) //<Andrew Clark>// - **[32eefcb3c](https://github.com/facebook/react/commit/32eefcb3c )**: Replace flushDiscreteUpdates with flushSync ([#21775](https://github.com/facebook/react/pull/21775)) //<Andrew Clark>// - **[ab390c65e](https://github.com/facebook/react/commit/ab390c65e )**: ReactDebugHooks optionally includes fileName, and line/column numbers ([#21781](https://github.com/facebook/react/pull/21781)) //<Brian Vaughn>// - **[c96761c7b](https://github.com/facebook/react/commit/c96761c7b )**: Delete batchedEventUpdates ([#21774](https://github.com/facebook/react/pull/21774)) //<Andrew Clark>// - **[3e8c86c1c](https://github.com/facebook/react/commit/3e8c86c1c )**: fix: maxYieldInterval should not compare with currentTime directly in Scheduler-shouldYieldToHost //<郭帅彬>// - **[d483463bc](https://github.com/facebook/react/commit/d483463bc )**: Updated scripts and config to replace "master" with "main" branch ([#21768](https://github.com/facebook/react/pull/21768)) //<Brian Vaughn>// Changelog: [General][Changed] - React Native sync for revisions cae6350...419cc9c jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D29913856 fbshipit-source-id: 58e4903766a312a64a17cfba0b0f684cf4bcacb0 * Remove option to make measure calls asynchronous Summary: Changelog: [internal] Making measure calls asynchronous in Fabric regresses core metrics, let's remove the option. Reviewed By: JoshuaGross Differential Revision: D29909385 fbshipit-source-id: eea3fefc8da757c8db82cb0af340650e2ce6a947 * Fix android view dimensions Summary: This diff fixes the Android View dimensions in VR PixelUtil.toSPFromPixel and PixelUtil.getDisplayMetricDensity() are both using getScreenDisplayMetrics() to perform conversion of dimensions. This is not correct because we should take into consideration the density of the Context / Activity instead of the Screen. This problem didn't raise before in Fabric Android because it seems that android OS on phones usually share the scale between the screen and the Activity? These two methods are only used in Fabric and they were introduced by D9583972 (https://github.com/facebook/react-native/commit/5c0da011cbaa788c52519f8091157ca6d87d8abb) and D9173758 (https://github.com/facebook/react-native/commit/8b5e3fc16b1e58441318b6ada629dcff572dd120) As part of this diff I'm also deleting the method toSPFromPixel in favor of toDIPFromPixel because I noticed the usages of these methods are meant to use toDIPFromPixel() changelog: [Internal] internal Reviewed By: JoshuaGross Differential Revision: D29864944 fbshipit-source-id: a0a093c120bde21a6cf9e1043a83c31e870d4368 * Refactor DevServerHelper to separate checking if packager running Summary: Changelog: [Internal] Separate the functionality of the isPackagerRunning() function into a new class PackagerStatusCheck with the intention of being able to use this without needing a DevServerHelper Reviewed By: makovkastar, ShikaSD Differential Revision: D29933318 fbshipit-source-id: d708bb987b08634015d6ee6b6c8989faba416c5a * Introduce queueMicrotask API Summary: Changelog: [General][Added] - Add global.queueMicrotask `queueMicrotask` is a relatively recent API defined in the WHATWG HTML spec and it's been widely adopted by all web browsers and Node.js. This diff introduced it to React Native by polyfilling it via a lazily-allocated resolved Promise, or calling directly into a fast path provided by Hermes. Reviewed By: RSNara Differential Revision: D29838852 fbshipit-source-id: 8c4378b1b713fb8b0da5e67f92ba2ea9838766f7 * Shim Immediate APIs when Promise is queueing to JSVM Summary: Changelog: [Internal] Historically, Immediate API is implemented upon the React Native's internal microtask-y queue (known as "immediate queue"), which is the same queue Promise polyfill is operating on. To make React Native suitable of using the built-in Promises from JSVMs, which usually enqueues to the JSVM internal microtask queue and has no access to React Native microtask-y queue, we need to migrate the Immediate API to use the JSVM microtask queue as well to preserve the semantics of code relies on the interleaving of promises and immediates. To do that, this diff implement a shim layer for immediate APIs via the new `global.queueMicrotask` API (which enqueues to JSVM) in JS, by wrapping the immediate callback into a "microtask callback", which validate the `immediate ID` against `clearedImmediate` Set before invoking it. Reviewed By: RSNara Differential Revision: D29845305 fbshipit-source-id: c2ed3fed426a5316b1e0dfbfaad51706d1765d4d * Attempt to fix undefined instance handle in EventTarget Summary: changelog: [internal] Completion block can retain `_eventEmitter` beyond existence of the component. To fix this, do not retain `_eventEmitter` by block but try to acquire it inside it. Reviewed By: JoshuaGross Differential Revision: D29969189 fbshipit-source-id: 456c42f816acc160f9d6bbd3f9c8c55d611940b2 * Makes "force" property available to Apple Pencil based events. (#31780) Summary: Fixes https://github.com/facebook/react-native/issues/31779 For more detailed explanation, see issue https://github.com/facebook/react-native/issues/31779 React Native touch handler events (onTouchStart, onTouchMoved, etc..) are intended to have "force" properties when used on devices which support pressure input (3D Touch & Apple Pencil events). However, due to a check in RCTForceTouchAvailable() function which checks for UITraitCollection's "forceTouchCapability" to be equal to UIForceTouchCapabilityAvailable, the check returns NO on iPad-based devices, due to iPad devices returning UIForceTouchCapabilityUnavailable at all times. This causes "force" values of Apple Pencils to never be passed on to React Native. Since simply passing 0 as a value for force across the RN bridge for every touch event seemed like a change that might seem jarring to some, I decided that a simple additional boolean check if the touch event's type is UITouchTypePencil (this is the same as UITouchTypeStylus) should also suffice. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Fixed] - Fixed "force" property of touch events for Apple Pencil/Stylus devices. [iOS] [Feature] - Added "altitudeAngle" property to touch events from Apple Pencil/Stylus devices. Pull Request resolved: https://github.com/facebook/react-native/pull/31780 Test Plan: The code compiles and runs, and trying a simple handler for a View like ```` touchMove = (e: GestureResponderEvent) => { console.log(`pressure, altitude (${e.nativeEvent.force}, ${e.nativeEvent.altitudeAngle})`); ```` results in <img width="424" alt="Screen Shot 2564-06-28 at 17 13 22" src="https://user-images.githubusercontent.com/5000572/123621055-0b563f00-d835-11eb-9eff-526ba27fdf7b.png"> and when pencil is oriented perpendicular to the screen and pressed with full force shows <img width="412" alt="Screen Shot 2564-06-28 at 17 13 58" src="https://user-images.githubusercontent.com/5000572/123621139-1c06b500-d835-11eb-8207-68a49720d708.png"> Reviewed By: sammy-SC Differential Revision: D29964102 Pulled By: sota000 fbshipit-source-id: 5a1f41d64c6fe325afbd2b9579eaf20a522e92dc * Fix typo in VirtualizedList-test.js (#31756) Summary: occured -> occurred ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Fixed] - Fixed typo in VirtualizedList-test.js Pull Request resolved: https://github.com/facebook/react-native/pull/31756 Test Plan: NONE Reviewed By: lunaleaps Differential Revision: D29975153 Pulled By: charlesbdudley fbshipit-source-id: 966d90df0bf015b4a6a2e3b1bf88c66b61161a7a * Pass context through to all prop parser (core changes) Summary: Unfortunately, parsing some props requires stateful context - namely, PlatformColor on Android. We explored several different options but they all seemed inferior to the approach of using ContextContainer, and most would require using global state. By introducing this change everywhere as early as possible, we can avoid later pain. It is likely that some prop, on some platform, will require this mechanism. We'll be ready for it! Because we can pass a constref of the ContextContainer through to all props and because the context and context data is never retained by prop parsers, perf and memory hit should be ~0. This diff contains core changes only. Leaf changes to all props structs and conversions files will be in next diff(s). Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29838789 fbshipit-source-id: f5090e7f02eb6e8fbe0ef4dd201e7d12104a3e3c * Pass context through to all prop parser (props structs changes) Summary: See previous diffs for context. This updates all of the relevant props structs. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29855426 fbshipit-source-id: 30177c3380ef82ecf8f2a4321f128cfbe8a576e0 * Pass context through to all prop parser (conversions.h) Summary: See previous diffs for context. This updates all conversions.h files. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D29855425 fbshipit-source-id: d5751ddfc2724392e3a35f5e22bb68574e95e737 * Pass PropsParserContext to prop parsing layer Summary: Changelog: [internal] Reviewed By: mdvacca Differential Revision: D29921232 fbshipit-source-id: ba045f545b564aedf1b287045a0e75428de30a0f * Fix typo in Constants.h (#31049) Summary: controling -> controlling ## Changelog [Internal] [Fixed] - Fixed typo in comment Pull Request resolved: https://github.com/facebook/react-native/pull/31049 Test Plan: NONE Reviewed By: lunaleaps Differential Revision: D29980007 Pulled By: charlesbdudley fbshipit-source-id: 419f28f08d74faa07db18a07ab41b62c41776344 * Daily `arc lint --take CLANGFORMAT` Reviewed By: zertosh Differential Revision: D29983521 fbshipit-source-id: bebd38e79180c544c8c1986605cc1af4b1f4df98 * Update Dimension.js typo (#29858) Summary: preferred instead of preffered ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [CATEGORY] [TYPE] - Message Pull Request resolved: https://github.com/facebook/react-native/pull/29858 Reviewed By: charlesbdudley Differential Revision: D29998754 Pulled By: sota000 fbshipit-source-id: f13fef58e9154ddf8087944d53e022fb9afa6b1b * Make existential type an error in xplat Summary: This diff updates the xplat flowconfigs to make existential types an error. Changelog: [Internal] Reviewed By: pieterv Differential Revision: D29967838 fbshipit-source-id: f08bbafe2a0269adb2c9afa4572b7a34fd254a4d * Remove unused import (#30544) Summary: Remove unused import ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [performance] - Remove unused import Pull Request resolved: https://github.com/facebook/react-native/pull/30544 Test Plan: Should build on CI Reviewed By: lunaleaps Differential Revision: D30000901 Pulled By: charlesbdudley fbshipit-source-id: 3d3310917823b7af57564ca1ea397cd32cd0c4d5 * Updated TextInput autoCompleteType prop to autoComplete 1/2 (#26010) Summary: Fix for bug https://github.com/facebook/react-native/issues/26003 Rename TextInput prop "autoCompleteType" to "autoComplete". ## Changelog [Android] [Changed] - Updated `autoCompleteType` prop of `TextInput` to `autoComplete` Pull Request resolved: https://github.com/facebook/react-native/pull/26010 Test Plan: Test Pass PR for [Doc Update](https://github.com/facebook/react-native-website/pull/1184) Reviewed By: mdvacca Differential Revision: D29980220 Pulled By: lunaleaps fbshipit-source-id: 3c9e7d3250b5f95b0dbd523fdb0d917a039cd6a9 * Implement PlatformColor in Fabric Android Summary: This diff implements PlatformColor in Fabric Android changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D29841461 fbshipit-source-id: 63a523626b021c634bc399e749b639b55730391a * Allows to set individual (left,top,right,bottom) dotted/dashed borders (#29099) Summary: This issue: fixes https://github.com/facebook/react-native/issues/24224 fixes https://github.com/facebook/react-native/issues/28695 fixes https://github.com/facebook/react-native/issues/23651 fixes https://github.com/facebook/react-native/issues/23475 fixes https://github.com/facebook/react-native/issues/22256 fixes https://github.com/facebook/react-native/issues/22226 fixes https://github.com/facebook/react-native/issues/19234 fixes https://github.com/facebook/react-native/issues/18285 fixes https://github.com/facebook/react-native/issues/17344 fixes https://github.com/facebook/react-native/issues/17343 fixes https://github.com/facebook/react-native/issues/17251 fixes https://github.com/facebook/react-native/issues/12817 fixes https://github.com/facebook/react-native/issues/12403 fixes https://github.com/facebook/react-native/issues/11042 fixes https://github.com/facebook/react-native/issues/9343 fixes https://github.com/facebook/react-native/issues/8236 fixes https://github.com/facebook/react-native/issues/8105 fixes https://github.com/facebook/react-native/issues/7838 fixes https://github.com/facebook/react-native/issues/6721 fixes https://github.com/facebook/react-native/issues/5411 fixes https://github.com/facebook/react-native/issues/3159 fixes https://github.com/facebook/react-native/issues/2335 fixes https://github.com/facebook/react-native/issues/840 fixes https://github.com/facebook/react-native/issues/27133 fixes https://github.com/facebook/react-native/issues/28695 Allows to set individual (left,top,right,bottom) dotted/dashed borders. If a single border is specified and the borderStyle is dotted or dashed, each border will be drawn with moveTo and lineTo taking in consideration of the border style and thickness. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Fixed] - Quickfix individual border style dotted or dashed rendering as solid Pull Request resolved: https://github.com/facebook/react-native/pull/29099 Test Plan: **<details><summary>CLICK TO OPEN TESTS RESULTS</summary>** <p> | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158300-05e05800-aa6c-11ea-96a3-40007b2ca611.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158309-07aa1b80-aa6c-11ea-973b-51e8e68b5808.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158320-0d9ffc80-aa6c-11ea-9d7f-dfba49fbfe41.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158334-11cc1a00-aa6c-11ea-8422-cd5b9384f391.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158556-4c35b700-aa6c-11ea-9a4d-eea791b3813a.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158574-51930180-aa6c-11ea-8e84-526cfb168f49.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158586-55268880-aa6c-11ea-9540-51d79a8e4cb0.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158601-5952a600-aa6c-11ea-82e7-85d54b858f1a.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158638-62dc0e00-aa6c-11ea-8765-ecba0d9d126f.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158652-67a0c200-aa6c-11ea-8336-e6eb8aa52e96.png" width="300" height="" /> | | **AFTER** | **AFTER** | |:-------------------------:|:-------------------------:| | <img src="https://user-images.githubusercontent.com/24992535/84158690-738c8400-aa6c-11ea-9cf1-edec72d27cb7.png" width="300" height="" /> | <img src="https://user-images.githubusercontent.com/24992535/84158912-b6e6f280-aa6c-11ea-94a7-0ee0db685f38.png" width="300" height="" /> | </p> </details> Reviewed By: mdvacca Differential Revision: D28688914 Pulled By: RSNara fbshipit-source-id: 34781d63265dcf55e30f11c014e6b4a35d67dcbd * Correct error message in getViewState method Summary: Changelog: [internal] Here, getting `viewState` has failed, not its view property. Reviewed By: mdvacca Differential Revision: D30042652 fbshipit-source-id: 42831b577f17db1f64860e68be33870f5be27207 * Clean up RAIICallbackManager experiment Summary: This experiment was shipped in D27436402 (https://github.com/facebook/react-native/commit/3d1afbbda301d48a75e45f73b96cd51ae5105dd8). Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D30023039 fbshipit-source-id: 5f7335f2ddaf6f4e2d876a917aaff2cf3d906b5c * Stop sharing LongLivedObjectCollection with the bridge Summary: ## Context Previously, when you'd call TurboModule methods with JavaScript callbacks, we'd [store the callbacks](https://www.internalfb.com/code/fbsource/[c503ff1b38621aebca87b2bbebeae088b01886c4]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm?lines=173%2C248-249) into [this global LongLivedObjectCollection collection](https://www.internalfb.com/code/fbsource/[c503ff1b38621aebca87b2bbebeae088b01886c4]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleUtils.h?lines=65). Then, when React Native's JavaScript VM got torn down, we'd [clear the global collection](https://www.internalfb.com/code/fbsource/[e26f476ce208c578f05b1edb7639d1dad5612c7d]/xplat/js/react-native-github/ReactCommon/react/nativemodule/core/ReactCommon/TurboModuleBinding.cpp?lines=49), which would ensure that we deleted all held jsi::Functions, before deleting the jsi::Runtime. ## Problem With bridgeless mode enabled, there can be two TurboModule systems. Further, it is possible to tear down bridgeless mode, or the bridge, without tearing down the other initialization infra. In this scenario, the jsi::Function for the other initialization infra would also get deleted, which could lead to mysterious problems. ## Fix In this diff, I refactored the jsi::Function cleanup in the TurboModule system. Now, there are 3 modes: - kGlobalScope: Everything works as it did before - kRCTGlobalScopeUsingRetainJSCallback: We still use the global LongLivedObjectCollection, but we do it through invoking a block passed to every ObjCTurboModule by the TurboModuleManager. This group exists to assess the impact of having each TurboModule retain/use the block. I suspect this will be negligible, but it'd be good to have actual data to back this claim. - kRCTTurboModuleManagerScope: Every TurboModule uses a LongLivedObjectCollection that is owned by its TurboModuleManager. This should effectively fix the problem I outlined above. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D30019833 fbshipit-source-id: da50d884c7e37190107f570d8ed70eeda7d9ae83 * Stop sharing LongLivedObjectCollection with the bridge Summary: This is the Android analogue to D30019833. Changelog: [Internal] Reviewed By: p-sun Differential Revision: D30029295 fbshipit-source-id: 13df0dfb915697eeedcc527dcdb6c246e89afb0c * setup fragment based tab bar navigation Summary: `Changelog: [Android] [Changed] - Make ReactFragment variables protected instead of private, create getter for ReactDelegate` Reviewed By: keoskate Differential Revision: D29981436 fbshipit-source-id: 3e5df811cd07edccf37f72c9f917f9ea0882be0b * Remove 'using namespace facebook::jni' Summary: Ez diff to remove 'using namespace facebook::jni' changelog: [internal] internal Reviewed By: sshic Differential Revision: D30046080 fbshipit-source-id: 52100970a408d772854cc0783fa13edd0cc39235 * Add TODO to fix and enable 'generated_tests-codegen_testsAndroid' Summary: Add TODO to fix and enable 'generated_tests-codegen_testsAndroid' changelog: [internal] internal Reviewed By: JoshuaGross Differential Revision: D30046143 fbshipit-source-id: dbeba6f1d51b32c069bda8bb9ca976014d299dae * Move RNTester Buck library to GitHub (#31435) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31435 Moves the Facebook-internal Buck target definition for RNTester closer to the actual source files. This does not affect how RNTester is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27942209 fbshipit-source-id: 66c970a5464a9329597d155ceeca78fb7f4834e8 * Move react-native Buck library to GitHub Summary: Moves the Facebook-internal Buck target definition for React Native closer to the actual JS source files. This does not affect how React Native is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27942687 fbshipit-source-id: 328febb661ed6597feafdfd8efb2a95365325348 * Extract feature detection as an utilitiy module Summary: Changelog: [Internal] This diff only extracted the `isNativeFunction` used in `setUpTimers` into the `FeatureDetection` utility, but later we will add more functions in it and reuse them in other places. Reviewed By: RSNara Differential Revision: D29986750 fbshipit-source-id: 6e48e38d92ceccb35eead3c52e00e1eecb81b5b0 * Conditionalize the Regenerator Setup Summary: Changelog: [Internal] If generators are provided natively, that should suggest that the JS source code did not go through the regenerator-transform (e.g. in Metro Hermes profile), then there is no need to set up the regenerator runtime. This should save some work during the Core initialization. Reviewed By: motiz88 Differential Revision: D29986751 fbshipit-source-id: 129f5122e8e4c05535ee2aa5da6970a66843e8cd * Protect against crashes when over-releasing a TouchEvent Summary: It seems that, possibly due to optimizations and refactoring elsewhere in the event system, some TouchEvents are being over-disposed. This doesn't really pose a problem besides performance; and could even indicate that an Event was in a pool but never properly initialized. In these cases it seems perfectly reasonable to silently continue, and to log a soft exception. This WILL still crash in debug mode, so we can gather more information if we find a good repro; otherwise we will continue to get production data from this soft exception if it's an issue and we can investigate further. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D30061178 fbshipit-source-id: 05d1f60afc382ce0a202ac8f3de34770cf9a760d * Co-locate Buck targets for JS polyfills with their sources Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032230 fbshipit-source-id: 0d714b4e0a79a9c5c1c21e79f782635d8bd9c5f1 * chore: update Dimensions API Flow types (#31898) Summary: This small PR updates the Flow types used in Dimensions. The following changes has been made: * generic types has been replaced with types from `NativeDeviceInfo` (which already were used in event subscription update) * ~simplification of `DisplayMetricsAndroid` by spreading via intersection with `DisplayMetrics` type and removing shared properties~ > I have tried both notations, but according to the lint, it looks like a Native Modules typing limitation which requires redundancy / code duplication in cases like this. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Internal] [Changed] - update Dimensions API Flow types Pull Request resolved: https://github.com/facebook/react-native/pull/31898 Test Plan: Running `yarn flow` in the workspace yields no errors. Reviewed By: yungsters Differential Revision: D29932940 Pulled By: GijsWeterings fbshipit-source-id: bf97bb972964c585207e2450ccf71d932555e291 * Fix order of calls for Native Animated Module Summary: Changelog: [internal] Make sure the order of call is preserved for `NativeAnimatedModule`. The order of calls to NativeAnimatedModule needs to be preserved because its internals depend on it. For example, if you `getValue` is called before `createAnimatedNode`, it causes a crash. To resolve it, we need to enqueue `getValue` onto operationQueue. Reviewed By: JoshuaGross Differential Revision: D30035911 fbshipit-source-id: bbd698a96cada5d2b1312a1a689ca99b04a07cdc * Merge BUCK file at Libraries/ into root Summary: Merges the Facebook-internal Buck target definitions in `Libraries/` into the BUCK file at the root of the repo (which is currently not synced to GitHub at all). This does not affect how React Native is built in open source. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D27967499 fbshipit-source-id: 39c51a544b3868242598072d24cb6cfb5a6e2d8c * Fix Buck package boundary violation in core components schema Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D29996246 fbshipit-source-id: e560c7261c4274da5219dc1e2d59d46b60e7549e * Allow resolving view from FabricUIManager Summary: Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D30043188 fbshipit-source-id: d8675754b29fb58a28a06777f602098da6dbc27f * Flush operations queue when animation starts Summary: changelog: [internal] If nodesManager has the information if animated node is managed by Fabric, we can't decide if the operation queue should be flushed before it is flushed. Therefore, keep the information about animated nodes inside a set instead of nodesManager. For simplicity, I will refer to class `RCTNativeAnimatedTurboModule` as *NativeAnimated* and to `RCTNativeAnimatedNodesManager` as *NodesManager* Notice that each call to *NativeAnimated* is queued up in `_operations` or `_preOperations`. When the queues are flushed, only then methods are called on `RCTNativeAnimatedNodesManager`. There are two mechanisms that flush operations. One is triggered by `RCTMountingManager` before mounting operations are applied and after they are applied. This works fine but is important to paint the picture. The second mechanism is inside `[RCTNativeAnimatedTurboModule startAnimatingNode]`. It flushes the queues for Fabric nodes only (not sure why Fabric nodes only, I couldn't find any explanation in old diffs). It checks with *NativeAnimated* if a node is managed by Fabric. Keep in mind, *NodesManager* only knows about the nodes when the queues have been flushed. Exampe: JavaScript calls methods on *NativeAnimated*. For example: 1. `createNode` 2. `connectAnimatedNodeToView` 3. `startAnimatingNode`. (here, the queues should be flushed, since we are in Fabric) All of these operations are queued up and for as long as `RCTMountingManager` executes mounting, all proceeds as expected. But if those operations happen after mounting phase, `startAnimatingNode` will not flush the operations queues, because it can't tell if nodeTag is managed by fabric or it isn't. This is because *NodesManager* hasn't been notified about any new nodes. Reviewed By: JoshuaGross, p-sun Differential Revision: D30053890 fbshipit-source-id: b7fe24861d5300f9cfefa813a53df8330fa56d86 * iOS: Log error when invalid NSNull data is passed to RCTAsyncLocalStorage Summary: Changelog: [Internal] Differential Revision: D30081478 fbshipit-source-id: 7d425e71b020eaeb4eb1b33b500fbf5df7ea9c29 * fbshipit-source-id: 909b2667480ed96ae376896d966f6c27f5e73964 * Update OSS Buck definitions (#31948) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31948 Changelog: [Internal] Adds necessary shims to bring our BUCK files closer to parsing/building correctly in open source. This is part of fixing the Buck-based tests on CircleCI which were broken by https://github.com/facebook/react-native/commit/d4ee734f3297463fe7b54af6d69e4ea151cf4cf9. Reviewed By: sammy-SC Differential Revision: D30072866 fbshipit-source-id: 4aebd9f67dd0a102516603915d9a021032611279 * Update Android Dockerfile to include root BUCK file (#31950) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31950 Changelog: [Internal] Adds the root BUCK file to the Docker image we use to test RNTester on CircleCI. See https://github.com/facebook/react-native/commit/df9cd05621f58fe5c67f889b741bfff20c780b0e Reviewed By: ShikaSD Differential Revision: D30099261 fbshipit-source-id: 936c505a0f4e7b791743901a06fa3b14c40b183e * Check for negative `numberOfLines` in TextView Summary: Negative `numberOfLines` prop is not supported by Android and causes a crash during layout measurement. This change adds a check in JS to catch the error earlier. Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30047103 fbshipit-source-id: 4248a0f573c3b6facd25c7ae6ce007a357a1469b * Fix NPE when hierarchy return null values Summary: This diff fixes a NullPointer that was being thorwn when hierarchy values are null changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095407 fbshipit-source-id: b0a13661b4506cf94eeb5d99923d4c12cba0f972 * Extend getInspectorDataForInstance to return props Summary: This diff extends the FabricUIManager.getInspectorDataForInstance to return the props of the React Native component associated to the view passed as a parameter. changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095406 fbshipit-source-id: 50fdba6636a1f5042dbc113e341c3cb2534a1b04 * Add documentation for FabricUIManager.getInspectorDataForInstance Summary: Add documentation for FabricUIManager.getInspectorDataForInstance changelog: [internal] internal Reviewed By: sammy-SC Differential Revision: D30095818 fbshipit-source-id: dfe8590598099e7581460ca45bc0e779690463a6 * chore: remove FlowFixMe (#29468) Summary: Removed FlowFixMe that has been fixed ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Removed FlowFixMe that has been fixed Pull Request resolved: https://github.com/facebook/react-native/pull/29468 Test Plan: flow check passes Reviewed By: JoshuaGross Differential Revision: D29967702 Pulled By: lunaleaps fbshipit-source-id: 541279287ba6f21c5c7290bcba7c282f092126ff * Move RCT* Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30030454 fbshipit-source-id: 02a4c36f5c5ca519e4de3d1a3d79708d0d0b6d01 * Move integration test Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032467 fbshipit-source-id: 56e293c821f02e78fe13f5e7f22bcb2b2050019a * Move RNTester unit/integration test Buck targets to GitHub Summary: Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30032476 fbshipit-source-id: d1f9a39a6d2fc92f69b9ee931c2a0f3ba37687f6 * Move RCTTestApple into packages/rn-tester Summary: Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D30056021 fbshipit-source-id: 9012ca6934f95946ff157ca472aa6a6e84d7d7e9 * React Native sync for revisions 419cc9c...19092ac Summary: This sync includes the following changes: - **[19092ac8c](https://github.com/facebook/react/commit/19092ac8c )**: Re-add old Fabric Offscreen impl behind flag ([#22018](https://github.com/facebook/react/pull/22018)) //<Andrew Clark>// - **[215db465a](https://github.com/facebook/react/commit/215db465a )**: [Fabric] Add `flex: 1` to Offscreen view container ([#22019](https://github.com/facebook/react/pull/22019)) //<Andrew Clark>// - **[8a37b0ef3](https://github.com/facebook/react/commit/8a37b0ef3 )**: typos fixed ([#21955](https://github.com/facebook/react/pull/21955)) //<Sinan Sonmez (Chaush)>// - **[e3049bb85](https://github.com/facebook/react/commit/e3049bb85 )**: DevTools scheduling profiler: Add React component measures ([#22013](https://github.com/facebook/react/pull/22013)) //<Brian Vaughn>// - **[27bf6f9a8](https://github.com/facebook/react/commit/27bf6f9a8 )**: Scheduling profiler UX changes ([#21990](https://github.com/facebook/react/pull/21990)) //<Brian Vaughn>// - **[f0d354efc](https://github.com/facebook/react/commit/f0d354efc )**: [Fabric] Fix reparenting bug in legacy Suspense mount ([#21995](https://github.com/facebook/react/pull/21995)) //<Andrew Clark>// - **[34308b5ad](https://github.com/facebook/react/commit/34308b5ad )**: Tidy up early bailout logic at start of begin phase ([#21852](https://github.com/facebook/react/pull/21852)) //<Andrew Clark>// - **[321087d13](https://github.com/facebook/react/commit/321087d13 )**: [Fizz] Don't add aborted segments to the completedSegments list ([#21976](https://github.com/facebook/react/pull/21976)) //<Sebastian Markbåge>// - **[4cc8ec64c](https://github.com/facebook/react/commit/4cc8ec64c )**: Separate unit tests for ReactFabricHostComponent ([#21969](https://github.com/facebook/react/pull/21969)) //<Timothy Yung>// - **[d4d786493](https://github.com/facebook/react/commit/d4d786493 )**: Fix `ReactFabricHostComponent` methods if detached ([#21967](https://github.com/facebook/react/pull/21967)) //<Timothy Yung>// - **[392253a77](https://github.com/facebook/react/commit/392253a77 )**: [Fabric] Use container node to toggle the visibility of Offscreen and Suspense trees ([#21960](https://github.com/facebook/react/pull/21960)) //<Andrew Clark>// Changelog: [General][Changed] - React Native sync for revisions 419cc9c...19092ac jest_e2e[run_all_tests] Reviewed By: JoshuaGross Differential Revision: D30092460 fbshipit-source-id: 9f118db2419a9a5db26a9b873868f91ab88f2f89 * refactor!: drop deprecated `StatusBarIOS` (#31466) Summary: This component has been merged with `StatusBar` and deprecated since [Jun 24, 2019](https://github.com/facebook/react-native/commit/a8337785539d572009d2cc4263aef7755ae03097) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [JavaScript] [Removed] - refactor!: drop deprecated `StatusBarIOS` Pull Request resolved: https://github.com/facebook/react-native/pull/31466 Test Plan: Warning when user imports `StatusBarIOS` Reviewed By: yungsters Differential Revision: D30109324 Pulled By: lunaleaps fbshipit-source-id: fa2d3aa2cf35206ed8a196e09f12af57d3b61ccc * Fix OSS Buck parsing errors (#31957) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31957 Changelog: [Internal] Some fixes for the GitHub shims for FB-internal Buck macros. Should fix the Buck-related breakages in the `test_android` and `test_docker` CI jobs. Also adds license headers to some recently-added files that didn't have them. Reviewed By: mdvacca Differential Revision: D30114177 fbshipit-source-id: 88a24fa7130bd98dd60568566bde51fcfc89df60 * Fix Buck package boundary violation involving RCTEventDispatcher.h (#31965) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/31965 Changelog: [Internal] Reviewed By: GijsWeterings Differential Revision: D30030580 fbshipit-source-id: 3b4140a831c7ad7282aae0ff79c54014dcd82615 * Remove package boundary exceptions in OSS Buck config Summary: Changelog: [Internal] Reviewed By: stepancheg Differential Revision: D30102445 fbshipit-source-id: 571ab5dc41379e01d4482f64418f6383f660dbfa * Update JSLoader.cpp (#29270) Summary: Since react-native-cli is deprecated, the correct command should be `npx react-native start` Pull Request resolved: https://github.com/facebook/react-native/pull/29270 Reviewed By: sammy-SC Differential Revision: D30017028 Pulled By: sota000 fbshipit-source-id: cfcf9e1d150f51750a4e86133bd3167506ee7348 * Warn when negative `numberOfLines` prop set on <Text/> component Summary: Updates previous variant that was crashing a surface to the non-crashing variant. Now i…
Looks like "reload and profile" button is always disabled for "scheduling profiler" (now called "timeline") by purpose. What's the reason? It recently reported as a bug #24603 |
@mondaychen There's no reason. It's most likely a left over artifact from when the only way to use Timeline Profiler was to upload a chrome profiling trace. |
@lunaruan Thanks. I'll remove that restriction then. |
….1 October 13, 2022 * [standalone] Stop highlighting events when a component is selected ([tyao1](https://github.com/tyao1) in [facebook#25448](facebook#25448)) --- ### 4.26.0 September 16, 2022 * Show DevTools icons in Edge browser panel ([itskolli](https://github.com/itskolli) in [facebook#25257](facebook#25257)) * [Bugfix] Don't hide fragment if it has a key ([lunaruan](https://github.com/lunaruan) in [facebook#25197](facebook#25197)) * Handle info, group, and groupCollapsed in Strict Mode logging ([timneutkens](https://github.com/timneutkens) in [facebook#25172](facebook#25172)) * Highlight RN elements on hover ([tyao1](https://github.com/tyao1) in [facebook#25106](facebook#25106)) * Remove ForwardRef/Memo from display name if `displayName` is set ([eps1lon](https://github.com/eps1lon) in [facebook#21952](facebook#21952)) --- ### 4.25.0 July 13, 2022 * Timeline Profiler Sidebar with component tree ([lunaruan](https://github.com/lunaruan) and [blakef](https://github.com/blakef) in [facebook#24816](facebook#24816), [facebook#24815](facebook#24815), [facebook#24814](facebook#24814), [facebook#24805](facebook#24805), [facebook#24776](facebook#24776)) * [DevTools][Bugfix] Fix DevTools Perf Issue When Unmounting Large React Subtrees ([lunaruan](https://github.com/lunaruan) in [facebook#24863](facebook#24863)) * Enable "reload & profile" button for timeline view ([mondaychen](https://github.com/mondaychen) in [facebook#24702](facebook#24702)) * Find best renderer when inspecting app with mutilple react roots ([mondaychen](https://github.com/mondaychen) in [facebook#24665](facebook#24665)) * Only polyfill requestAnimationFrame when necessary ([mondaychen](https://github.com/mondaychen) in [facebook#24651](facebook#24651)) --- ### 4.24.7 May 31, 2022 * mock requestAnimationFrame with setTimeout as a temporary fix for facebook#24626 ([mondaychen](https://github.com/mondaychen) in [facebook#24633](facebook#24633)) * Fix formatWithStyles not styling the results if the first argument is an object + Added unit tests ([lunaruan](https://github.com/lunaruan) in [facebook#24554](facebook#24554)) --- ### 4.24.6 May 12, 2022 * fix a bug in console.log with non-string args ([mondaychen](https://github.com/mondaychen) in [facebook#24546](facebook#24546)) * Add Pragma to Only Run Tests if Version Requirement Satisfied ([lunaruan](https://github.com/lunaruan) in [facebook#24533](facebook#24533)) * [DevTools][Bug] Fix Race Condition When Unmounting Fibers ([lunaruan](https://github.com/lunaruan) in [facebook#24510](facebook#24510)) * [React DevTools] Improve DevTools UI when Inspecting a user Component that Throws an Error ([mondaychen](https://github.com/mondaychen) in [facebook#24248](facebook#24248)) --- ### 4.24.5 May 5, 2022 * Fixed potential undefined error in `TreeContext` reducer ([bvaughn](https://github.com/bvaughn) in [facebook#24501](facebook#24501)) * Fix error where Profiler sometimes incorrectlyed reported that a `forwardRef` did not render ([lunaruan](https://github.com/lunaruan) in [facebook#24494](facebook#24494)) * Fix regex for `formateWithStyles` function ([lunaruan](https://github.com/lunaruan) in [facebook#24486](facebook#24486)) * Fixed wrong method call for LRU cache ([bvaughn](https://github.com/bvaughn) in [facebook#24477](facebook#24477)) * Synchronize implementations of second render logging ([billyjanitsch](https://github.com/billyjanitsch) in [facebook#24381](facebook#24381)) * Don't stringify objects for console log second render ([lunaruan](https://github.com/lunaruan) in [facebook#24373](facebook#24373)) --- ### 4.24.4 April 8, 2022 * Allow react-devtools-inline `createStore()` method to override Store config params ([bvaughn](https://github.com/bvaughn) in [facebook#24303](facebook#24303)) * [ReactDebugTools] wrap uncaught error from rendering user's component ([mondaychen](https://github.com/mondaychen) in [facebook#24216](facebook#24216)) --- ### 4.24.3 March 29, 2022 #### Bugfix * Profiler should only report stateful hooks that change between renders ([bvaughn](https://github.com/bvaughn) in [facebook#24189](facebook#24189)) * Ignore duplicate welcome "message" events ([bvaughn](https://github.com/bvaughn) in [facebook#24186](facebook#24186)) * Attach DevTools Tree keyboard events to the Tree container (not the document) ([bvaughn](https://github.com/bvaughn) in [facebook#24164](facebook#24164)) --- ### 4.24.2 March 24, 2022 #### Bugfix * Show upgrade/downgrade instructions inline for errors thrown by the Store due to incompatible protocol (mismatched backend and frontend versions) ([bvaughn](https://github.com/bvaughn) in [facebook#24147](facebook#24147)) * Inspecting an element in a nested renderer no longer throws ([lunaruan](https://github.com/lunaruan) in [facebook#24116](facebook#24116)) --- ### 4.24.1 March 15, 2022 #### Bugfix * Disable unsupported Bridge protocol version dialog and add workaround for old protocol operations format ([bvaughn](https://github.com/bvaughn) in [facebook#24093](facebook#24093)) --- ### 4.24.0 March 10, 2022 #### Feature * Show DevTools backend and frontend versions in UI ([bvaughn](https://github.com/bvaughn) in [facebook#23399](facebook#23399)) * Timeline profiler refactored to support reading basic profiling data directly from React ([bvaughn](https://github.com/bvaughn) in [facebook#22529](facebook#22529)) #### Bugfix * Better handle undefined `Error` stacks in DevTools error boundary ([bvaughn](https://github.com/bvaughn) in [facebook#24065](facebook#24065)) * Fixed edge case bug in Profiler commit filtering ([bvaughn](https://github.com/bvaughn) in [facebook#24031](facebook#24031)) * Gracefully handle empty "xstyle" prop values ([lunaruan](https://github.com/lunaruan) in [facebook#23279](facebook#23279) and [bvaughn](https://github.com/bvaughn) in [facebook#23190](facebook#23190)) * Add `<TracingMarker>` component boilerplate ([lunaruan](https://github.com/lunaruan) in [facebook#23275](facebook#23275)) #### Misc * Remove object-assign polyfill ([sebmarkbage](https://github.com/sebmarkbage) in [facebook#23351](facebook#23351)) #### Breaking change * Move createRoot/hydrateRoot to react-dom/client ([sebmarkbage](https://github.com/sebmarkbage) in [facebook#23385](facebook#23385)). Technically this is a breaking change for projects using `react-devtools-inline`, but since this package already depends on the _experimental_ release channel, we are going to include it in 4.24. --- ### 4.23.0 January 24, 2022 #### Feature * DevTools: Only show StrictMode badge on root elements ([bvaughn](https://github.com/bvaughn) in [facebook#23012](facebook#23012)) #### Bugfix * Don't crawl unmounted subtrees when profiling starts ([bvaughn](https://github.com/bvaughn) in [facebook#23162](facebook#23162)) * Filter deleted components from the updaters list to avoid runtime errors later ([lunaruan](https://github.com/lunaruan) in [facebook#23156](facebook#23156)) #### Misc * DevTools (not React) logs Timeline performance data to the User Timing API ([bvaughn](https://github.com/bvaughn) in [facebook#23102](facebook#23102)) --- ### 4.22.1 December 14, 2021 * Fix invalid `require()` statements in `react-devtools-inline` ([bvaughn](https://github.com/bvaughn) in [facebook#22961](facebook#22961)) * Fix invalid `files` array in `react-devtools` `package.json` ([bvaughn](https://github.com/bvaughn) in [facebook#22960](facebook#22960)) --- ### 4.22.0 December 13, 2021 #### A note for React Native users React DevTools has [two main pieces](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#overview): * The *frontend* users interact with (the Components tree, the Profiler, etc.). * The *backend* which runs in the same context as React itself. (In the web page with React DOM or shipped on the device with the React Native runtime.) This release updates the [**protocol** that DevTools uses](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#serializing-the-tree) to communicate between the "frontend" and "backend" components. Because React Native embeds a copy of the React DevTools "backend" ([`react-devtools-core/backend`](https://www.npmjs.com/package/react-devtools-core)), the "frontend" (UI) needs to match. This means you may be prompted to upgrade (or downgrade) your React DevTools based on which version of React Native your app uses. #### Features * Support multiple DevTools instances per page ([@bvaughn](https://github.com/bvaughn) in [facebook#22949](facebook#22949)) * Advocate for StrictMode usage within Components tree ([@bvaughn](https://github.com/bvaughn) in [facebook#22886](facebook#22886)) * StyleX plug-in for resolving atomic styles to values for props.xstyle ([@bvaughn](https://github.com/bvaughn) in [facebook#22808](facebook#22808)) * Timeline search ([@bvaughn](https://github.com/bvaughn) in [facebook#22799](facebook#22799)) * Timeline: Improved snapshot view ([@bvaughn](https://github.com/bvaughn) in [facebook#22706](facebook#22706)) * Display root type for root updates in "what caused this update?" ([@eps1lon](https://github.com/eps1lon) in [facebook#22599](facebook#22599)) #### Bugfix * DevTools should inject itself for XHTML pages too (not just HTML) ([@bvaughn](https://github.com/bvaughn) in [facebook#22932](facebook#22932)) * Don't restore profiling data if we're profling ([@eps1lon](https://github.com/eps1lon) in [facebook#22753](facebook#22753)) * DevTools should properly report re-renders due to (use)context changes ([@bvaughn](https://github.com/bvaughn) in [facebook#22746](facebook#22746)) * Filter empty commits (all Fibers bailed out) from Profiler ([@bvaughn](https://github.com/bvaughn) in [facebook#22745](facebook#22745)) * Accept json file in import fileinput ([@jyash97](https://github.com/jyash97) in [facebook#22717](facebook#22717)) * Expose css vars to reach-ui portal components ([@jyash97](https://github.com/jyash97) in [facebook#22716](facebook#22716)) * Fix DevTools advanced tooltip display conditional check ([@bvaughn](https://github.com/bvaughn) in [facebook#22669](facebook#22669)) #### Misc * Emit new event when DevTools connects in standalone app ([@jstejada](https://github.com/jstejada) in [facebook#22848](facebook#22848)) --- ### 4.21.0 October 31, 2021 #### Features * Scheduling Profiler: Add marks for component effects (mount and unmount) ([@bvaughn](https://github.com/bvaughn) in [facebook#22578](facebook#22578)) * Scheduling Profiler: De-emphasize React internal frames ([bvaughn](https://github.com/bvaughn) in [facebook#22588](facebook#22588)) #### Bugfix * Revert logic for checking for duplicate installations of DevTools potentially causing issues loading Components tab ([@jstejada](https://github.com/jstejada) in [facebook#22638](facebook#22638)) * Scheduling Profiler does not warn about long transitions ([@bvaughn](https://github.com/bvaughn) in [facebook#22614](facebook#22614)) * Re-enable 'Reload and Start Profiling' for Microsoft Edge ([@eoandersson](https://github.com/eoandersson) in [facebook#22631](facebook#22631)) #### Misc * DevTools supports ENV-injected version for better internal bug reports ([@bvaughn](https://github.com/bvaughn) in [facebook#22635](facebook#22635)) * Fix typos ([@KonstHardy](https://github.com/KonstHardy) in [facebook#22494](facebook#22494)) --- ### 4.20.2 October 20, 2021 #### Bugfix * Dev Tools: Relax constraint on passing extensionId for backend init ([@jstejada](https://github.com/jstejada) in [facebook#22597](facebook#22597)) * DevTools: Fix passing extensionId in evaled postMessage calls ([@jstejada](https://github.com/jstejada) in [facebook#22590](facebook#22590)) --- ### 4.20.1 October 19, 2021 #### Bugfix * Only show DevTools warning about unrecognized build in Chrome ([@jstejada](https://github.com/jstejada) in [facebook#22571](facebook#22571)) * DevTools: Include Edge in browser name detection ([@jstejada](https://github.com/jstejada) in [facebook#22584](facebook#22584)) --- ### 4.20.0 October 15, 2021 #### Features * Allow to use the Profiler when no client is connected in standalone DevTools ([@gabrieltrompiz](https://github.com/gabrieltrompiz) in [facebook#22551](facebook#22551)) #### Bugfix * Surface backend errors during inspection in the frontend UI ([@bvaughn](https://github.com/bvaughn) in [facebook#22546](facebook#22546)) * Prevent splash page in standalone app from becoming unresponsive after the disconnection of a client (facebook#22558) ([@gabrieltrompiz](https://github.com/gabrieltrompiz) in [facebook#22560](facebook#22560)) * Prevent errors/crashing when multiple installs of DevTools are present ([@jstejada](https://github.com/jstejada) in [facebook#22517](facebook#22517)) * Update Fiber logic in backend renderer to match implementation in React ([@jstejada](https://github.com/jstejada) in [facebook#22527](facebook#22527)) #### Misc * Show warning in UI when duplicate installations of DevTools extension are detected ([@jstejada](https://github.com/jstejada) in [facebook#22563](facebook#22563)) * Improved filenames of built worker files ([@akgupta0777](https://github.com/akgupta0777) in [facebook#22559](facebook#22559)) --- ### 4.19.2 October 8, 2021 #### Bugfix * Show different error boundary UI for timeouts than normal errors ([bvaughn](https://github.com/bvaughn) in [facebook#22483](facebook#22483)) * Fixed bug where deleting a component filter would also close the settings modal ([Biki-das](https://github.com/Biki-das) in [facebook#22484](facebook#22484)) --- ### 4.19.1 October 1, 2021 #### Bugfix * Fixed potential cache miss when inspecting elements ([bvaughn](https://github.com/bvaughn) in [facebook#22472](facebook#22472)) --- ### 4.19.0 September 29, 2021 #### Features * Scheduling Profiler: Show Suspense resource .displayName ([bvaughn](https://github.com/bvaughn) in [facebook#22451](facebook#22451)) * Scheduling Profiler marks should include thrown Errors ([bvaughn](https://github.com/bvaughn) in [facebook#22419](facebook#22419)) * Don't patch console during first render in strict mode ([lunaruan](https://github.com/lunaruan) in [facebook#22308](facebook#22308)) * Show which hook indices changed when profiling for all builds ([bvaughn](https://github.com/bvaughn) in [facebook#22365](facebook#22365)) * Display actual ReactDOM API name in root type ([eps1lon](https://github.com/eps1lon) in [facebook#22363](facebook#22363)) * Add named hooks support to standalone and inline DevTools ([jstejada](https://github.com/jstejada) in [facebook#22320](facebook#22320) and [bvaughn](https://github.com/bvaughn) in [facebook#22263](facebook#22263)) #### Bugfix * DevTools encoding supports multibyte characters (e.g. "🟩") ([bvaughn](https://github.com/bvaughn) in [facebook#22424](facebook#22424)) * Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) ([justingrant](https://github.com/justingrant) in [facebook#22064](facebook#22064)) * Fix memory leak caused by not storing alternate Fiber pointer ([bvaughn](https://github.com/bvaughn) in [facebook#22346](facebook#22346)) * Fix call stack exceeded error in `utfDecodeString()` ([bvaughn](https://github.com/bvaughn) in [facebook#22330](facebook#22330)) * Fix runtime error when inspecting an element times out ([jstejada](https://github.com/jstejada) in [facebook#22329](facebook#22329)) #### Performance * DevTools: Lazily parse indexed map sections ([bvaughn](https://github.com/bvaughn) in [facebook#22415](facebook#22415)) * DevTools: Hook names optimizations ([bvaughn](https://github.com/bvaughn) in [facebook#22403](facebook#22403)) * Replaced `network.onRequestFinished()` caching with `network.getHAR()` ([bvaughn](https://github.com/bvaughn) in [facebook#22285](facebook#22285)) --- ### 4.18.0 September 1, 2021 #### Features * DevTools: Improve named hooks network caching ([bvaughn](https://github.com/bvaughn) in [facebook#22198](facebook#22198)) * Console Logging for StrictMode Double Rendering ([lunaruan](https://github.com/lunaruan) in [facebook#22030](facebook#22030)) --- ### Bugfix * Fix react-devtools-inline size issues ([lunaruan](https://github.com/lunaruan) in [facebook#22232](facebook#22232)) * devtools: Don't display hook index of useContext ([eps1lon](https://github.com/eps1lon) in [facebook#22200](facebook#22200)) * Throw error in console without interfering with logs ([lunaruan](https://github.com/lunaruan) in [facebook#22175](facebook#22175)) --- ### 4.17.0 August 24, 2021 #### Features * Scheduling Profiler: Add network measures ([bvaughn](https://github.com/bvaughn) in [facebook#22112](facebook#22112)) * Add options for disabling some features ([hbenl](https://github.com/hbenl) in [facebook#22136](facebook#22136)) #### Bugfix * Fixed broken scroll-to error or warning feature ([bvaughn](https://github.com/bvaughn) and [eps1lon](https://github.com/eps1lon) in [facebook#22147](facebook#22147) and [facebook#22144](facebook#22144)) * Replaced WeakMap with LRU for inspected element cache ([bvaughn](https://github.com/bvaughn) in [facebook#22160](facebook#22160)) * Add more detailed error handling if profiling data does not have any React marks ([byronluk](https://github.com/byronluk) in [facebook#22157](facebook#22157)) * Various named hooks bug fixes ([jstejada](https://github.com/jstejada) in [facebook#22129](facebook#22129), [facebook#22128](facebook#22128), [facebook#22096](facebook#22096), and [facebook#22148](facebook#22148)) * Fix tooltip wheel event regression ([bvaughn](https://github.com/bvaughn) in [facebook#22130](facebook#22130)) * Replace `source-map` library with `source-map-js` for named hooks source map parsing ([bvaughn](https://github.com/bvaughn) in [facebook#22126](facebook#22126)) --- ### 4.16.0 August 16, 2021 #### Features * Scheduling Profiler: Inline snapshots ([bvaughn](https://github.com/bvaughn) in [facebook#22091](facebook#22091) and[bvaughn](https://github.com/bvaughn) in [facebook#22088](facebook#22088)) #### Bugfix * split parsing code to unblock Firefox release ([lunaruan](https://github.com/lunaruan) in [facebook#22102](facebook#22102)) * Scheduling profiler: Canvas views clip by default ([bvaughn](https://github.com/bvaughn) in [facebook#22100](facebook#22100)) * Fixed Components tree indentation bug for Chrome extension ([bvaughn](https://github.com/bvaughn) in [facebook#22083](facebook#22083)) --- ### 4.15.0 August 11, 2021 #### Features * Added new scheduling profiler tool ([bvaughn](https://github.com/bvaughn), [kartikcho](https://github.com/kartikcho), and [taneliang](https://github.com/taneliang) in [facebook#22006](facebook#22006), [facebook#21990](facebook#21990), [facebook#22013](facebook#22013), [facebook#21897](facebook#21897), [facebook#22029](facebook#22029), [facebook#22038](facebook#22038), [facebook#22043](facebook#22043), [facebook#21947](facebook#21947), [facebook#21966](facebook#21966), [facebook#21970](facebook#21970), [facebook#21971](facebook#21971), [facebook#21975](facebook#21975)). * Parsing source code for extracting names for hooks now happens in a worker ([tsirlucas](https://github.com/tsirlucas) in [facebook#21902](facebook#21902)). * Format hyperlink text as a clickable link ([kkragoth](https://github.com/kkragoth) in [facebook#21964](facebook#21964)). * Named hooks can now be extracted from extended source maps ([jstejada](https://github.com/jstejada) [facebook#22010](facebook#22010), [facebook#22073](facebook#22073)). * Hook indices now show up as a reason why a component rendered in the profiler ([mrkev](https://github.com/mrkev) in [facebook#22073](facebook#22073)). * Optimize images in DevTools ([ilhamsyahids](https://github.com/ilhamsyahids) in [facebook#21968](facebook#21968)). #### Bugfix * Named hooks cache is correctly cleared after Fast Refresh ([bvaughn](https://github.com/bvaughn) in [facebook#21891](facebook#21891)). * Hook names are correctly extracted when parsing nested hook calls ([jstejada](https://github.com/jstejada) in [facebook#22037](facebook#22037), [facebook#21996](facebook#21996)). * Highlight updates with memoized components ([Selnapenek](https://github.com/Selnapenek) in [facebook#22008](facebook#22008)). * Set app icon on MacOS ([christian-schulze](https://github.com/christian-schulze) in [facebook#21908](facebook#21908)). * Updated @reach packages to fix unmount bug ([bvaughn](https://github.com/bvaughn) in [facebook#22075](facebook#22075)). #### Misc * Refactor imperative theme code ([houssemchebeb](https://github.com/houssemchebeb) in [facebook#21950](facebook#21950)). * Change some remaining instances of master -> main ([shubham9411](https://github.com/shubham9411) in [facebook#21982](facebook#21982)). ##### Scheduling profiler ###### What is React working on? React’s previous Profiler primarily reports how fast (or slow) components are when rendering. It didn’t provide an overview of *what React is doing* (the actual cooperative scheduling bits). The new profiler does. It shows when components schedule state updates and when React works on them. It also shows how React categorizes and prioritizing what it works on. Here’s a profile for a simple app that uses only the legacy (synchronous) `ReactDOM.render` API. The profiler shows that all of the work scheduled and rendered by this app is done at *synchronous* priority: https://user-images.githubusercontent.com/29597/129042321-56985f5a-264e-4f3a-a8b7-9371d75c690f.mp4 Here’s a more interesting profile for an app that’s rendered at _default_ priority using the new [`createRoot` API](reactwg/react-18#5), then updates _synchronously_ in response to an “input” event to manage a ["controlled component"](https://reactjs.org/docs/forms.html#controlled-components): https://user-images.githubusercontent.com/29597/129074959-50912a63-0215-4be5-b51b-1e0004fcd2a1.mp4 Here’s part of a profile showing an idle app (no JavaScript running). In this case, React does some pre-rendering work for components that are “offscreen” (not currently displayed). https://user-images.githubusercontent.com/29597/128971757-612f232f-c64f-4447-a766-66a0516e8f49.mp4 Note that “offscreen” refers to a new API and set of features that we haven’t talked about much yet except for [some passing references](reactwg/react-18#18 (reply in thread)). We’ll talk more about it in future posts. ###### What are “transitions” and how do they work? We recently shared an update about the new [`startTransition` API](reactwg/react-18#41). This API helps apps feel responsive even when there are large updates by splitting the work into (1) a quick update to show that the app has received some input and (2) a slower update (the “transition”) that actually does any heavy lifting needed as a result of the input. Here is an example profile that uses the transition API. First React renders a small update that shows the user some visual feedback (like updating a controlled component or showing an inline loading indicator). Then it renders a larger update that, in this case, computes some expensive value. https://user-images.githubusercontent.com/29597/129079176-0995c8c0-e95a-4f44-8d55-891a7efa35c0.mp4 ###### How does Suspense impact rendering performance? You may have heard mention of “suspense” in past talks or seen it referenced [in our docs](https://reactjs.org/docs/react-api.html#suspense). Although full support for data fetching via Suspense is [expected to be released sometime after React 18.0](reactwg/react-18#47 (comment)), you can use Suspense today for things like lazy-loading React components. The new profiler shows when components suspend during render and how that impacts overall rendering performance. Here’s an example profile that suspends during the initial render to lazy-load a component using [`React.lazy`](https://reactjs.org/docs/code-splitting.html#reactlazy). While this component is loading, React shows a “fallback“ (placeholder UI). Once the component finishes loading, React retries the render and commits the final UI. https://user-images.githubusercontent.com/29597/129054366-2700e7e8-0172-4f61-9453-475acd740456.mp4 We plan to expand support for Suspense in the coming weeks to more explicitly show when suspense fallbacks are rendered and which subsequent renders are related to an initial update that suspended. ###### What else might cause a render to get delayed? Suspense can cause a render to get delayed as React waits for data to load, but React can also get stuck waiting on a lot of JavaScript to run. React profiling tools have previously focused on only reporting what React (or React components) are doing, but any JavaScript the browser runs affects performance. The new profiler shows non-React JavaScript as well, making it easy to see when it delays React from rendering. https://user-images.githubusercontent.com/29597/128971952-7c4e7e11-f4fb-497e-b643-4d9b3994b590.mp4 ###### What can you do to improve performance? Until now, DevTools (and the Profiler) has provided information without commentary. The new profiler takes a more active approach– highlighting where we think performance can be improved and providing suggestions. For example, suspending during an update is generally a bad user experience because it causes previously shown components to be unmounted (hidden) so the fallback can be shown while data loads. This can be avoided using the new [Transition API](reactwg/react-18#41). If you forget to add a transition to an update that suspends, the new profiler will warn you about this: https://user-images.githubusercontent.com/29597/128972228-3b23f01a-8017-43ad-b371-975ffed26c06.mp4 The new profiler also warns about scheduling a long, synchronous React update inside of event handler. https://user-images.githubusercontent.com/29597/128972000-d7477ba3-b779-46f2-b141-aaa712e9d6d2.mp4 Another thing the new profiler will warn about is long-running renders scheduled from layout effects (`useLayoutEffect` or `componentDidMount`/`componentDidUpdate`). These updates (called “nested updates”) are sometimes necessary to adjust layout before the browser paints, but they should be *fast*. Slow nested updates make the browser feel unresponsive. https://user-images.githubusercontent.com/29597/128972017-3ed0e682-751c-46fb-a6c5-271f255c8087.mp4 --- ### 4.14.0 July 17, 2021 #### Features * Display hook names for inspected components ([saphal1998](https://github.com/saphal1998), [VibhorCodecianGupta](https://github.com/VibhorCodecianGupta), [bvaughn](https://github.com/bvaughn), and [motiz88](https://github.com/motiz88) in [facebook#21641](facebook#21641), [facebook#21790](facebook#21790), [facebook#21814](facebook#21814), [facebook#21815](facebook#21815), [facebook#21831](facebook#21831), [facebook#21833](facebook#21833), [facebook#21835](facebook#21835), [facebook#21865](facebook#21865), [facebook#21871](facebook#21871), [facebook#21874](facebook#21874), [facebook#21891](facebook#21891)) * Control for manually toggling error boundaries ([baopham](https://github.com/baopham) in [facebook#21583](facebook#21583)) * Allow user to manually enter Profiler commit number to jump between commits ([srubin](https://github.com/srubin) in [facebook#19957](facebook#19957)) ##### Display hook names for inspected components ![DevTools parsing hook names](https://user-images.githubusercontent.com/29597/124013541-68c2cb00-d9b0-11eb-83ab-81a5180da46b.gif) ##### Control for manually toggling error boundaries ![DevTools error boundary toggle](https://user-images.githubusercontent.com/29597/125891522-30f0d99d-407f-4c31-b5a7-e9d0bd3fa554.gif) --- ### 4.13.5 May 25, 2021 #### Bugfix * Handle edge case where a component mounts before its "owner" (in DEV mode) that previously caused a validation error ([bvaughn](https://github.com/bvaughn) in [facebook#21562](facebook#21562)) --- ### 4.13.4 May 20, 2021 #### Bugfix * Fix edge-case Fast Refresh bug that caused Fibers with warnings/errors to be untracked prematurely (which broke componentinspection in DevTools) ([bvaughn](https://github.com/bvaughn) in [facebook#21536](facebook#21536)) * Revert force deep re-mount when Fast Refresh detected (was no longer necessary) ([bvaughn](https://github.com/bvaughn) in [facebook#21539](facebook#21539)) --- ### 4.13.3 May 19, 2021 #### Misc * Updated `react` and `react-dom` API imports in preparation for upcoming stable release ([bvaughn](https://github.com/bvaughn) in [facebook#21488](facebook#21488)) #### Bugfix * Reload all roots after Fast Refresh force-remount (to avoid corrupted Store state) ([bvaughn](https://github.com/bvaughn) in [facebook#21516](facebook#21516) and [facebook#21523](facebook#21523)) * Errors thrown by Store can be dismissed so DevTools remain usable in many cases ([bvaughn](https://github.com/bvaughn) in [facebook#21520](facebook#21520)) * Bugfix for `useState()` object with `hasOwnProperty` key ([bvaughn](https://github.com/bvaughn) in [facebook#21524](facebook#21524)) * Fixed string concatenation problem when a `Symbol` was logged to `console.error` or `console.warn` ([bvaughn](https://github.com/bvaughn) in [facebook#21521](facebook#21521)) * DevTools: Fixed version range NPM syntax ([bvaughn](https://github.com/bvaughn) in [9cf1069](facebook@9cf1069#diff)) * Tweaked DevTools error template title to match issue form template ([bvaughn](https://github.com/bvaughn) in [1a2d792](facebook@1a2d792)) --- ### 4.13.2 May 7, 2021 #### Misc * Improved bug report template to use new [GitHub issue forms](https://gh-community.github.io/issue-template-feedback/structured/) ([bvaughn](https://github.com/bvaughn) in [facebook#21450](facebook#21450)) --- ### 4.13.1 April 28, 2021 #### Bugfix * Improve display name logic for `React.memo` components ([bvaughn](https://github.com/bvaughn) in [facebook#21392](facebook#21392)) * Fixed potential runtime error with Suspense in versions <= 17 ([bvaughn](https://github.com/bvaughn) in [facebook#21432](facebook#21432)) * Errors thrown in the Store are no longer silent ([bvaughn](https://github.com/bvaughn) in [facebook#21426](facebook#21426)) #### Misc * Improved bug report template ([bvaughn](https://github.com/bvaughn) in [facebook#21413](facebook#21413)), [facebook#21421](facebook#21421)) --- ### 4.13.0 April 28, 2021 #### Features * Add Bridge protocol version backend/frontend ([bvaughn](https://github.com/bvaughn) in [facebook#21331](facebook#21331)) #### Bugfix * DevTools iterates over siblings during mount (rather than recursing) to avoid stack overflow errors ([bvaughn](https://github.com/bvaughn) in [facebook#21377](facebook#21377)) * Multiple error dialogs can be visible at once ([bvaughn](https://github.com/bvaughn) in [facebook#21370](facebook#21370)) * Console patching should handle Symbols without erroring ([bvaughn](https://github.com/bvaughn) in [facebook#21368](facebook#21368)) ###### Bridge protocol version backend/frontend During initialization, DevTools now checks to ensure it's compatible with the ["backend"](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#overview) that's embedded within a renderer like React Native. If the two aren't compatible, upgrade instructions will be shown: <img width="400" height="233" alt="Dialog displaying downgrade instructions for the React DevTools frontend to connect to an older backend version" src="https://user-images.githubusercontent.com/29597/115997927-f77f2a00-a5b2-11eb-9098-20042b664cea.png"> <img width="400" height="233" alt="Dialog displaying upgrade instructions for the React DevTools frontend to connect to a newer backend version" src="https://user-images.githubusercontent.com/29597/115997965-167dbc00-a5b3-11eb-9cbc-082c65077a6e.png"> Learn more about this change at [fb.me/devtools-unsupported-bridge-protocol](https://fb.me/devtools-unsupported-bridge-protocol) --- ### 4.12.4 April 19, 2021 #### Bugfix * Remove `@octokit/rest` dependency because of a problem with transitive dependencies ([bvaughn](https://github.com/bvaughn) in [facebook#21317](facebook#21317)) --- ### 4.12.3 April 19, 2021 #### Bugfix * Wrapped quotation marks around Fiber ids or indices for all DevTools errors to better support GitHub fuzzy error search ([bvaughn](https://github.com/bvaughn) in [facebook#21314](facebook#21314)) --- ### 4.12.2 April 16, 2021 #### Bugfix * DevTools reliably suppresses console logs when generating component stacks ([bvaughn](https://github.com/bvaughn) in [facebook#21301](facebook#21301)) --- ### 4.12.1 April 14, 2021 Although this release is being made for all NPM packages, only the `react-devtools-inline` package contains changes. #### Bugfix * Fixed `react-devtools-inline` bug in frontend `initialize` method ([bvaughn](https://github.com/bvaughn) in [facebook#21265](facebook#21265)) --- ### 4.12.0 April 12, 2021 Although this release is being made for all NPM packages, only the `react-devtools-inline` package contains changes. #### Features * Added `createBridge` and `createStore` exports to the `react-devtools-inline/frontend` entrypoint to support advanced use cases ([bvaughn](https://github.com/bvaughn) in [facebook#21032](facebook#21032)) --- ### 4.11.1 April 11, 2021 #### Bugfix * Fixed broken import in `react-devtools-inline` for feature flags file ([bvaughn](https://github.com/bvaughn) in [facebook#21237](facebook#21237)) --- ### 4.11.0 April 9, 2021 #### Bugfix * `$r` should contain hooks property when it is `forwardRef` or `memo` component ([meowtec](https://github.com/meowtec) in [facebook#20626](facebook#20626)) * Ensure `sync-xhr` is allowed before reload and profile ([ChrisDobby](https://github.com/ChrisDobby) in [facebook#20879](facebook#20879)) * Bump electron version from 9.1.0 to 11.1.0 for darwin-arm64 builds ([jaiwanth-v](https://github.com/jaiwanth-v) in [facebook#20496](facebook#20496)) * Fixed primitive hook badge colors for light theme ([bvaughn](https://github.com/bvaughn) in [facebook#21034](facebook#21034)) * Increased minimum Chrome/Firefox versions from 51/54 to 60/55 to reduce polyfill code. ([bvaughn](https://github.com/bvaughn) in [facebook#21185](facebook#21185)) * Fix can't expand prop value in some scenario ([iChenLei](https://github.com/iChenLei) in [facebook#20534](facebook#20534)) * Flush updated passive warning/error info after delay ([bvaughn](https://github.com/bvaughn) in [facebook#20931](facebook#20931)) * Patch console methods even when only show-inline-warnings/errors enabled ([bvaughn](https://github.com/bvaughn) in [facebook#20688](facebook#20688)) * React Native fixes for new inline errors feature ([bvaughn](https://github.com/bvaughn) in [facebook#20502](facebook#20502)) * Fixed invalid work tag constants that affected a certain range of React versions ([bvaughn](https://github.com/bvaughn) in [facebook#20362](facebook#20362)) #### Features * Improve Profiler commit-selector UX ([bvaughn](https://github.com/bvaughn) in [facebook#20943](facebook#20943)) * Swap `log` with `cbrt` for commit bar height ([bvaughn](https://github.com/bvaughn) in [facebook#20952](facebook#20952)) * Integrate with new experimental React Suspense features to improve props loading and inspection UX ([bvaughn](https://github.com/bvaughn) in [facebook#20548](facebook#20548), [facebook#20789](facebook#20789), [facebook#20458](facebook#20458)) * Expose DEV-mode warnings in devtools UI ([eps1lon](https://github.com/eps1lon) in [facebook#20463](facebook#20463)) * Display shortcuts for prev/next search result ([eps1lon](https://github.com/eps1lon) in [facebook#20470](facebook#20470)) * Increase the clickable area of the prop value ([TryingToImprove](https://github.com/TryingToImprove) in [facebook#20428](facebook#20428)) #### Experimental features The following features are only enabled when used with (experimental) builds of React: * Shows which fibers scheduled the current update ([bvaughn](https://github.com/bvaughn) in [facebook#21171](facebook#21171)) * Add commit and post-commit durations to Profiler UI ([bvaughn](https://github.com/bvaughn) in [facebook#20984](facebook#20984), [facebook#21183](facebook#21183)) * Show which hooks (indices) changed when profiling ([bvaughn](https://github.com/bvaughn) in [facebook#20998](facebook#20998)) ###### Improve Profiler commit-selector UX ![Video demonstrating tooltip with commit duration and time](https://user-images.githubusercontent.com/29597/110225725-30a1f480-7eb6-11eb-9825-4c762ffde0bb.gif) ![Graphic illustrating Profiler bar heights using different scales](https://user-images.githubusercontent.com/29597/110361997-bafd6c00-800e-11eb-92d8-d411e6c79d84.png) ###### Expose DEV-mode warnings in devtools UI ![Inline warnings and errors](https://user-images.githubusercontent.com/29597/114225729-adeed800-9940-11eb-8df2-34d8b0ead3b8.png) ###### Shows which fibers scheduled the current update ![Shows which fibers scheduled the current update](https://user-images.githubusercontent.com/29597/114225931-eee6ec80-9940-11eb-90cc-fe6630fbfc08.gif) ###### Add commit and post-commit durations to Profiler UI ![Add commit and post-commit durations to Profiler UI](https://user-images.githubusercontent.com/29597/114225991-00c88f80-9941-11eb-84df-e2af04ecef1c.gif) ###### Show which hooks (indices) changed when profiling ![Show which hooks (indices) changed when profiling](https://user-images.githubusercontent.com/29597/114225838-d37be180-9940-11eb-93f8-93e0115421c8.png) --- ### 4.10.4 May 20, 2021 #### Bugfix * Ported passive effects sync flushing/bubbling bugfix ([bvaughn](https://github.com/bvaughn) in [facebook#21540](facebook#21540)) --- ### 4.10.3 April 27, 2021 #### Bugfix * Replaced Facebook-internal fburl.com link with public fb.me link for Bridge protocol mismatch info page ([bvaughn](https://github.com/bvaughn) in [facebook#21344](facebook#21344)) --- ### 4.10.2 April 27, 2021 #### Features * Added Bridge protocol check and warning dialog if embedded DevTools backend is incompatible with DevTools UI ([bvaughn](https://github.com/bvaughn) in [facebook#21344](facebook#21344)) --- ### 4.10.1 November 12, 2020 #### Bugfix * Fixed invalid internal work tag mappings ([bvaughn](https://github.com/bvaughn) in [facebook#20362](facebook#20362)) --- ### 4.10.0 November 12, 2020 #### Features * Make DevTools Websocket retry delay configurable ([bvaughn](https://github.com/bvaughn) in [facebook#20107](facebook#20107)) #### Bugfix * Fix error loading source maps for devtools extension ([sytranvn](https://github.com/sytranvn) in [facebook#20079](facebook#20079)) * Remove css-sourcemap for `react-devtools-inline` ([sean9keenan](https://github.com/sean9keenan) in [facebook#20170](facebook#20170)) * Decrease NPM update notification/prompt for standalone DevTools ([recurx](https://github.com/recurx) in [facebook#20078](facebook#20078)) --- ### 4.9.0 October 19, 2020 #### Features * [Improved DevTools editing interface](#improved-devtools-editing-interface) ([bvaughn](https://github.com/bvaughn) in [facebook#19774](facebook#19774)) * Add ⎇ + arrow key navigation ([bvaughn](https://github.com/bvaughn) in [facebook#19741](facebook#19741)) * Add checkbox toggle for boolean values ([mdaj06](https://github.com/mdaj06) in [facebook#19714](facebook#19714)) * Show symbols used as keys in state ([omarsy](https://github.com/omarsy) in [facebook#19786](facebook#19786)) * Add new (unstable) `SuspenseList` component type ([bpernick](https://github.com/bpernick) in [facebook#19684](facebook#19684)) #### Bugfix * Show proper icon/tooltip for restricted browser pages ([sktguha](https://github.com/sktguha) in [facebook#20023](facebook#20023)) * Fix emoji character shown in Chrome developer tools panel ([bvaughn](https://github.com/bvaughn) in [facebook#19603](facebook#19603)) * Don't open two tabs in Firefox when clicking on troubleshooting instructions ([unbyte](https://github.com/unbyte) in [facebook#19632](facebook#19632)) * Support inner component `_debugOwner` in memo ([bvaughn](https://github.com/bvaughn) in [facebook#19556](facebook#19556)) * Proxied methods should be safely dehydrated for display ([@pfongkye](https://github.com/pfongkye) in [b6e1d08](facebook@b6e1d08) * Property list values should show whitespace ([sammarks](https://github.com/sammarks) in [facebook#19640](facebook#19640)) * Fix crash when inspecting document.all ([omarsy](https://github.com/omarsy) in [facebook#19619](facebook#19619)) * Don't call generators during inspection since they may be stateful ([todortotev](https://github.com/todortotev) in [facebook#19831](facebook#19831)) * Fix bad null check in DevTools highlight code ([bvaughn](https://github.com/bvaughn) in [facebook#20010](facebook#20010)) * Handled a missing suspense fiber when suspense is filtered on the profiler ([IDrissAitHafid](https://github.com/IDrissAitHafid) in [#ISSUE](https://github.com/facebook/react/pull/ISSUE)) * Fixed unfound node error when Suspense is filtered ([IDrissAitHafid](https://github.com/IDrissAitHafid) in [facebook#20019](facebook#20019)) * Always overrides the dispatcher when shallow rendering ([bvaughn](https://github.com/bvaughn) in [facebook#20011](facebook#20011)) * Frevent phishing attacks ([iamwilson](https://github.com/iamwilson) in [facebook#19934](facebook#19934)) --- ### Other * Enable source maps for DevTools production builds ([jpribyl ](https://github.com/jpribyl ) in [facebook#19773](facebook#19773)) * Drop support for IE 11 ([bvaughn](https://github.com/bvaughn) in [facebook#19875](facebook#19875)) * Remove ReactJS.org version check "cheat" ([sktguha](https://github.com/sktguha) in [facebook#19939](facebook#19939)) * Update outdated links and fix two broken links ([sktguha](https://github.com/sktguha) in [facebook#19985](facebook#19985)) * Remove support for deprecated/unreleased React Flare event system ([trueadm](https://github.com/trueadm) in [facebook#19520](facebook#19520)) ###### Improved DevTools editing interface **Improved parsing** Value parsing logic has been relaxed so as to no longer require quotes around strings or double quotes: ![looser parsing logic](https://user-images.githubusercontent.com/29597/93407442-36504300-f860-11ea-90e8-5ad54c9b8b34.gif) **Modifying arrays** New values can be added to array props/state/hooks now. Existing values can also be deleted: ![adding and removing values from an array](https://user-images.githubusercontent.com/29597/93407457-3ea87e00-f860-11ea-8b85-a41904e6c25f.gif) **Modifying objects** New keys can be added to object props/state/hooks now. Existing keys can be renamed or deleted entirely: ![adding/renaming/removing object properties](https://user-images.githubusercontent.com/29597/93407464-449e5f00-f860-11ea-909b-49dafb56f6c5.gif) --- ### 4.8.2 July 15, 2020 #### Bugfix * Fix broken `Suspense` heuristic ([bvaughn](https://github.com/bvaughn) in [facebook#19373](facebook#19373)) * Fixed error with standalone in HTTPS mode ([b-ponomarenko](https://github.com/b-ponomarenko) in [facebook#19336](facebook#19336)) * Disable DevTools minification ([bvaughn](https://github.com/bvaughn) in [facebook#19369](facebook#19369)) --- ### 4.8.1 July 10, 2020 #### Bugfix * Fix break-on-warning to truly be off by default. ([gaearon](https://github.com/gaearon) in [facebook#19309](facebook#19309)) --- ### 4.8.0 July 9, 2020 #### Features * Add SSL support to React devtools standalone ([ittaibaratz](https://github.com/ittaibaratz) in [facebook#19191](facebook#19191)) * New break-on-warning feature (off by default) ([bvaughn](https://github.com/bvaughn) in [facebook#19048](facebook#19048)) #### Bugfix * Updates Electron version for react-devtools to pull in several security fixes ([gsimone](https://github.com/gsimone) in [facebook#19280](facebook#19280)) * Remove unnecessary tag end from CommitRanked view ([finico](https://github.com/finico) in [facebook#19195](facebook#19195)) * Shutdown DevTools Bridge synchronously when unmounting ([bvaughn](https://github.com/bvaughn) in [facebook#19180](facebook#19180)) --- ### 4.7.0 May 18, 2020 #### Features * Improved appended component stacks for third party warnings to be more like native ([bvaughn](https://github.com/bvaughn) in [facebook#18656](facebook#18656)) * Improve inline search results by highlighting match on HOC badge ([bl00mber](https://github.com/bl00mber) in [facebook#18802](facebook#18802)) * Add key badge to inspected element in right hand pane ([karlhorky]](https://github.com/karlhorky) in [facebook#18737](facebook#18737)) * Improve Profiler snapshot selector drag-and-drop UX ([bl00mber](https://github.com/bl00mber) in [facebook#18852](facebook#18852)) * Profiler tooltip now includes self duration to make it easier to scan times without requiring selection ([bvaughn](https://github.com/bvaughn) in [facebook#18510](facebook#18510)) * Rendered by list also now highlights native elements on hover ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#18479](facebook#18479)) * Add in-page highlighting for mouse-over interactions in Profiler ([bl00mber](https://github.com/bl00mber) in [facebook#18745](facebook#18745)) #### Bugfix * Fix Profiler bug "_Could not find commit data for root_" by resetting selected node on root change ([bl00mber](https://github.com/bl00mber) in [facebook#18880](facebook#18880)) * Add `imported` flag to Profiling data to more reliably differentiate between imported and session data ([bl00mber](https://github.com/bl00mber) in [facebook#18913](facebook#18913)) * Disable Profiler filtering to avoid edge case runtime error "_Cannot read property 'duration' of undefined_" ([bvaughn](https://github.com/bvaughn) in [facebook#18862](facebook#18862)) * Fix Profiler bug "_cannot read property 'memoizedState' of null_" ([bvaughn](https://github.com/bvaughn) in [facebook#18522](facebook#18522)) * Whitespace search results highlighting bug fix ([bvaughn](https://github.com/bvaughn) in [facebook#18527](facebook#18527)) * Improved confusing Profiler tooltip text for components that did not render ([bvaughn](https://github.com/bvaughn) in [facebook#18523](facebook#18523)) * Fix edge case performance issue when highlight elements enabled ([Faelivrinx](https://github.com/Faelivrinx) in [facebook#18498](facebook#18498)) * Disabled Webpack auto polyfill for `setImmediate` ([bvaughn](https://github.com/bvaughn) in [facebook#18860](facebook#18860)) * Fix mouse interactions for standalone DevTools on Linux ([bl00mber](https://github.com/bl00mber) in [facebook#18772](facebook#18772)) --- ### 4.6.0 March 26, 2020 #### Features * Add shortcut keys for tab switching ([kerolloz](https://github.com/kerolloz) in [facebook#18248](facebook#18248)) #### Bugfix * Improve display of complex values for `useDebugValue` ([eps1lon](https://github.com/eps1lon) in [facebook#18070](facebook#18070)) * Fix minor CSS layout issue that broke Profiler commit selector UI ([bvaughn](https://github.com/bvaughn) in [facebook#18286](facebook#18286)) * Inlined DevTools event emitter implementation to fix a source of Profiler bugs ([bvaughn](https://github.com/bvaughn) in [facebook#18378](facebook#18378)) #### Cleanup * Remove "es6-symbol" dependency from "react-devtools-inline" package ([bvaughn](https://github.com/bvaughn) in [facebook#18397](facebook#18397)) --- ### 4.5.0 March 3, 2020 #### Features * Improve function props display for inspected elements ([bvaughn](https://github.com/bvaughn) in [facebook#17789](facebook#17789)) * Re-enabled context menu for Firefox extension ([bvaughn](https://github.com/bvaughn) in [facebook#17838](facebook#17838)) * Apply changes to props/state/hooks on blur (rather than on ENTER) ([muratcatal](https://github.com/muratcatal) in [facebook#17062](facebook#17062)) * Add info tooltip to nodes in Profiler ([M-Izadmehr](https://github.com/M-Izadmehr) in [facebook#18048](facebook#18048)) * Added resize support to Components panel ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#18046](facebook#18046)) #### Bugfix * Improve how empty commits are filtered ([nutboltu](https://github.com/nutboltu) in [facebook#17931](facebook#17931)) * BigInt serialize issue in devtools copy to clipboard ([bvaughn](https://github.com/bvaughn) in [facebook#17771](facebook#17771)) * Renamed "backend.js" to "react_devtools_backend.js" to reduce potential confusion from profiling ([bvaughn](https://github.com/bvaughn) in [facebook#17790](facebook#17790)) * Update root styles to prevent `box-sizing` style from leaking outside of inline target ([GasimGasimzada](https://github.com/GasimGasimzada) in [facebook#17775](facebook#17775)) * Fix "_Cannot read property 'sub' of undefined_" error when navigating to plain-text pages ([wfnuser](https://github.com/wfnuser) in [facebook#17848](facebook#17848)) * Fix potential error with composite hooks during shallow re-rendering ([bvaughn](https://github.com/bvaughn) in [facebook#18130](facebook#18130)) * Scope dev tools wildcard styles within DevTools CSS class ([@GasimGasimzada](https://github.com/GasimGasimzada) in [9cc094a](facebook@9cc094a#diff-ab5ee5655b2aac3260e1f836546a13c9)) ###### Info summary tooltips ![Profiler tooltips in Flamegraph chart](https://user-images.githubusercontent.com/28848972/74614074-09468100-5115-11ea-8c87-c224d229ef15.gif) ![Profiler tooltips in Ranked chart](https://user-images.githubusercontent.com/28848972/74614072-08155400-5115-11ea-8d19-7ab3d27b9b0a.gif) ###### Components panel resize ![Horizontal Components panel resizing](https://user-images.githubusercontent.com/23095052/74603147-ca7edf80-50b0-11ea-887f-db7ada855c50.gif) ![Vertical Components panel resizing](https://user-images.githubusercontent.com/23095052/74603149-d074c080-50b0-11ea-820f-63db30b4c285.gif) --- ### 4.4.0 January 3, 2020 #### Features * Re-enabled "copy" prop/state/hooks context menu option for Firefox ([bvaughn](https://github.com/bvaughn),[rpl](https://github.com/rpl) in [facebook#17740](facebook#17740)) * Shift+Enter focuses previous search result in Components tree ([Bo-Duke](https://github.com/Bo-Duke) in [facebook#17005](facebook#17005)) * Properly display formatted `RegExp` values in props/state panel([bvaughn](https://github.com/bvaughn) in [facebook#17690](facebook#17690)) * Profiler commit selector wraps around for easier navigation of large profiles ([bvaughn](https://github.com/bvaughn) in [facebook#17760](facebook#17760)) #### Bugfix * Check `document.contentType` before injecting hook to avoid breaking XML file syntax highlighting in Firefox ([bvaughn](https://github.com/bvaughn) in [facebook#17739](facebook#17739)) * Fix standalone UI not responding to mouse interactions due to `webkit-app-region` style ([cwatson88](https://github.com/cwatson88) in [facebook#17584](facebook#17584)) * Support inspecting object values with null protos ([bvaughn](https://github.com/bvaughn) in [facebook#17757](facebook#17757)) * Support inspecting values that have overridden `hasOwnProperty` attribute ([bvaughn](https://github.com/bvaughn) in [facebook#17768](facebook#17768)) * Fixed regression that made Profiler "Could not find node…" error happen more frequently ([bvaughn](https://github.com/bvaughn) in [facebook#17759](facebook#17759)) --- ### 4.3.0 December 20, 2019 #### Features * Show component location for selected element in bottom/right panel ([bvaughn](https://github.com/bvaughn) in [facebook#17567](facebook#17567)) * Improved inspected element values with inline previews ([bvaughn](https://github.com/bvaughn) in [facebook#17579](facebook#17579)) * Improved selection and toggling for inspected element panel ([bvaughn](https://github.com/bvaughn) in [facebook#17588](facebook#17588)) * Copy context menu for inspecting and copying props/state/hooks/context values ([bvaughn](https://github.com/bvaughn) in [facebook#17608](facebook#17608)) #### Bug fixes * Fix serialization for `BigInt` type so that it does not break inspection panel. ([nutboltu](https://github.com/nutboltu) in [facebook#17233](facebook#17233)) * Fix display name logic for `forwardRef`s that use `displayName` property ([zthxxx](https://github.com/zthxxx) in [facebook#17613](facebook#17613)) --- ### 4.2.1 November 27, 2019 #### Bug fixes * Profiler automatically filters certain types of empty (no work) commits. ([bvaughn](https://github.com/bvaughn) in [facebook#17253](facebook#17253)) * Fix memoized components showing as "Anonymous" in Components tab. ([wsmd](https://github.com/wsmd) in [facebook#17274](facebook#17274)) * Edge-case bugfix for non-string element keys. ([bvaughn](https://github.com/bvaughn) in [facebook#17164](facebook#17164)) --- ### 4.2.0 October 3, 2019 #### Features * "Highlight updates" feature added for browser extensions and `react-devtools-inline` NPM package. ([bvaughn](https://github.com/bvaughn) in [facebook#16989](facebook#16989)) --- ### 4.1.3 September 30, 2019 #### Bug fixes * Fixed regression where DevTools wouldn't properly connect with apps when using the `file://` protocol. ([linshunghuang](https://github.com/linshunghuang) in [facebook#16953](facebook#16953)) --- ### 4.1.2 September 27, 2019 #### Bug fixes * Fixed an infinite loop that occurred in some cases with prop values of `NaN`. ([bvaughn](https://github.com/bvaughn) in [facebook#16934](facebook#16934)) --- ### 4.1.1 September 26, 2019 #### Bug fixes * Fixed bug where Components panel was always empty for certain users. ([linshunghuang](https://github.com/linshunghuang) in [facebook#16900](facebook#16900)) * Fixed regression in DevTools editable hooks interface that caused primitive values to be shown as `undefined`. ([bvaughn](https://github.com/bvaughn) in [facebook#16867](facebook#16867)) * Fixed bug where DevTools showed stale values in props/state/hooks editing interface. ([bvaughn](https://github.com/bvaughn) in [facebook#16878](facebook#16878)) * Show unsupported version dialog with downgrade instructions. ([bvaughn](https://github.com/bvaughn) in [facebook#16897](facebook#16897)) --- ### 4.1.0 September 19, 2019 #### Features * Props/state editor supports adding new values and changing value types. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16700](facebook#16700)) #### Bug fixes * Profiler correctly saves/exports profiling data in Firefox now. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16612](facebook#16612)) * Class components now show "legacy context" header (rather than "context") for legacy API. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16617](facebook#16617)) * Show component source button ("<>") now highlights the `render` method for class components. ([theKashey](https://github.com/theKashey) in [facebook#16759](facebook#16759)) * Bugfix for components with non-standard object values for `function.name`. ([LetItRock](https://github.com/LetItRock) in [facebook#16798](facebook#16798)) --- ### 4.0.6 August 26, 2019 #### Bug fixes * Remove ⚛️ emoji prefix from Firefox extension tab labels * Standalone polyfills `Symbol` usage --- ### 4.0.5 August 19, 2019 #### Bug fixes * Props, state, and context values are alpha sorted. * Standalone DevTools properly serves backend script over localhost:8097 --- ### 4.0.4 August 18, 2019 #### Bug fixes * Bugfix for potential error if a min-duration commit filter is applied after selecting a fiber in the Profiler UI. --- ### 4.0.3 August 17, 2019 #### Bug fixes * ES6 `Map` and `Set`, typed arrays, and other unserializable types (e.g. Immutable JS) can now be inspected. * Empty objects and arrays now display an "(empty)" label to the right to reduce confusion. * Components that use only the `useContext` hook now properly display hooks values in side panel. * Style editor now supports single quotes around string values (e.g. both `"red"` and `'red'`). * Fixed edge case bug that prevented profiling when both React v16 and v15 were present on a page. --- ### 4.0.2 August 15, 2019 #### Permissions cleanup * Removed unnecessary `webNavigation ` permission from Chrome and Firefox extensions. --- ### 4.0.1 August 15, 2019 #### Permissions cleanup * Removed unnecessary `<all_urls>`, `background`, and `tabs` permissions from Chrome and Firefox extensions. --- ### 4.0.0 August 15, 2019 --- ### General changes #### Improved performance The legacy DevTools extension used to add significant performance overhead, making it unusable for some larger React applications. That overhead has been effectively eliminated in version 4. [Learn more](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) about the performance optimizations that made this possible. #### Component stacks React component authors have often requested a way to log warnings that include the React ["component stack"](https://reactjs.org/docs/error-boundaries.html#component-stack-traces). DevTools now provides an option to automatically append this information to warnings (`console.warn`) and errors (`console.error`). ![Example console warning with component stack added](https://user-images.githubusercontent.com/29597/62228120-eec3da80-b371-11e9-81bb-018c1e577389.png) It can be disabled in the general settings panel: ![Settings panel showing "component stacks" option](https://user-images.githubusercontent.com/29597/62227882-8f65ca80-b371-11e9-8a4e-5d27011ad1aa.png) --- ### Components tree changes #### Component filters Large component trees can sometimes be hard to navigate. DevTools now provides a way to filter components so that you can hide ones you're not interested in seeing. ![Component filter demo video](https://user-images.githubusercontent.com/29597/62229209-0bf9a880-b374-11e9-8f84-cebd6c1a016b.gif) Host nodes (e.g. HTML `<div>`, React Native `View`) are now hidden by default, but you can see them by disabling that filter. Filter preferences are remembered between sessions. #### No more inline props Components in the tree no longer show inline props. This was done to [make DevTools faster](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) and to make it easier to browse larger component trees. You can view a component's props, state, and hooks by selecting it: ![Inspecting props](https://user-images.githubusercontent.c…