Summary: Changelog: [Internal] Create FlatList example index for 3 levels of navigation
Reviewed By: charlesbdudley
Differential Revision: D30816721
fbshipit-source-id: a3bdae7f385bab3695a9c2dc6fe3148ebdbd12b4
Summary:
This Diff is adapting the `BundleJsAndAssetsTask` to be a bit more idiomatic. Here the summary of changes.
- Make the task `abstract` to let Gradle properly implement it.
- Make all the annotated filed `public` instead of `internal` as they will be easier to access for Gradle + will show up
correctly in logs/scans
- Update the Task to subclass a `Exec` that is a specificed Task
- Do not reference `project.` inside the Task body as that is breaking the Configuration Caching of Gradle
Changelog:
[Internal] [Changed] - Make the `BundleJsAndAssetsTask` Task more Gradle friendly
Reviewed By: mdvacca
Differential Revision: D30865159
fbshipit-source-id: 74d4c77f6a2b3fac944e7e0b123726e6a423ba1d
Summary:
Ideally a Gradle `Extension` should contain only properties as it's the public facing API of our
Gradle surface. Here I'm movign a couple of functions away from it. Now they're located inside their
own Util file. Moreover I've added tests and documentation to those.
Changelog:
[Internal] [Changed] - Export `detected*` functions fron `ReactAppExtension` to its own file
Reviewed By: mdvacca
Differential Revision: D30865494
fbshipit-source-id: 59925414c0eb427161691950f5b9b6495121da00
Summary:
Another small diff to setup some testing for our Gradle Plugin.
Here I exported a couple of extension functions on `File` to a separate
Utils file + I've added some tests for them.
Changelog:
[Internal] [Added] - Add tests for AndroidConfiguration
Reviewed By: mdvacca
Differential Revision: D30841339
fbshipit-source-id: fcb00d7397d1f3e2b4500e9920508c71f20c76f3
Summary:
Adding an error message when codegen doesn't recognize any modules to help users understand what's going on.
Changelog: [Internal]
Reviewed By: RSNara
Differential Revision: D30624535
fbshipit-source-id: 781f1f874a5b0c16a05191186b81c2d3892da95b
Summary:
Another small diff to setup some testing for our Gradle Plugin.
Specifically this one is also setting up a test environment where we would be able to exercies
AGP usages on top of `ProjectBuilder`. This will allow us to verify that an Android project
is configured correctly for a React Native build.
Changelog:
[Internal] [Added] - Add tests for AndroidConfiguration
Reviewed By: GijsWeterings
Differential Revision: D30839600
fbshipit-source-id: 10e3b3c0fcf5979c2a0eaf64320f87ae58093fbd
Summary:
Fix broken link
## 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/32169
Reviewed By: yungsters
Differential Revision: D30809096
Pulled By: GijsWeterings
fbshipit-source-id: b600e411c7292ba840e076d68f66cb3043887335
Summary:
This Diff is adding some really simple tests for TaskUtils.
It also adds a couple of utilities to run some sample tests (e.g. mocking the OS version)
that would come handy the more we keep on writing tests and adding functionalities to the Gradle plugin.
Changelog:
[Internal] [Changed] - Added tests for TaskUtils
Reviewed By: mdvacca
Differential Revision: D30809779
fbshipit-source-id: c401cb78e386964e429c6f459c699e6f18f54f11
Summary:
RCTRootView exposes the RCTEventDispatcher directly via the .eventDispatcher property. So, there's no need to access the bridge to access the eventDispatcher.
Created from CodeHub with https://fburl.com/edit-in-codehub
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D30753792
fbshipit-source-id: 5820d65c061e9b88382692dfc2791ed4a4841c0f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32139
Currently RN Gradle Plugin is using `kotlin-dsl` that comes will all sorts of side effects on Gradle plugins projects.
Specifically we can't specify the Kotlin version, plus it makes harder to include Java source code in a single
project.
I'm removing it in favor of Kotlin-JVM plugin. I've adapted the code to use the correct APIs.
Specifically most of the lambdas are changing the scope of the parameter (from `this` to `it`) so I had to adapt
those as well.
Changelog:
[Internal] [Changed] - Do not use `kotlin-dsl` for `react-native-gradle-plugin`
Reviewed By: yungsters
Differential Revision: D30726977
fbshipit-source-id: b10635eefdbbb496c4adddd418db6b0ab613ab59
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32140
This diff is setting up the Gradle wrapper inside packages/react-native-gradle-plugin/.
Currently the `./gradlew` file is missing so it's not possible to `cd` inside the project and build it from
there (also opening that folder inside the IDE will trigger the creation of the files I added here).
This diff is fixing. The files have been generated with the command:
```
gw -p packages/react-native-gradle-plugin wrapper --gradle-version 7.0.2 --distribution-type=all
```
Changelog:
[Internal] [Added] - Setup Gradle Wrapper inside packages/react-native-gradle-plugin/
Reviewed By: yungsters
Differential Revision: D30730145
fbshipit-source-id: a0bd6be0ac062e089b2b90a55b47987c0f4b6644
Summary:
Changes `react-native/normalize-color` to be useable from Node.js by making the following changes:
1. Rename `base.js` to `index.js` so importing is more convenient.
2. Move Flow definitions into a seprate library definition flow so `index.js` can be consumed directly.
I also made a few improvements to the actual implementation:
1. Avoid allocating `matchers` for non-strings.
2. Avoid allocating an object of all the color keywords. This will reduce memory usage (in exchange for slightly larger compiled bytecode).
Changelog:
[General][Changed] - react-native/normalize-color now supports Node.js
Reviewed By: lunaleaps
Differential Revision: D30595908
fbshipit-source-id: e6279e9ff815d8d1f489811187deabfdf53b8fbf
Summary:
Context: there are multiple issues currently exposed by Xcode 12.5 and/or M1 machine + Flipper. To unblock the new 0.66 release, let's add this workaround in the official react_native_pods.rb recipe and make RNTester and new app Podfile's call it directly.
Changelog: [iOS][Fixed] Added workaround for Xcode 12.5 / M1 machines build issues
Reviewed By: lunaleaps
Differential Revision: D30691291
fbshipit-source-id: 8b24cc60da3d620dbc90f95c77f2345e18c28212
Summary:
The original $ENTRY_FILE check was added in https://github.com/facebook/react-native/pull/29012 to help catch misconfiguration for the entry JS file. That turned out breaking some RNTester builds/tests, so https://github.com/facebook/react-native/pull/29263 was added to accommodate the fact that RNTester .xcodeproj file has its own directory hierarchy.
The 2nd PR had multiple issues:
* It is incorrect to assume that the $ENTRY_FILE always exists in the parent dir of the .xcodeproj location. This caused an issue in RC 0.66: https://github.com/react-native-community/releases/issues/249#issue-983474535
* RNTester has since moved to packages/rn-tester/ (from RNTester/), hence breaking that assumption
It turns out RNTester .xcodeproj has incorrectly misconfigured this JS bundling step (not sure since when). The original script invocation passed in the correct path for `RNTesterApp.ios.js`, but as an arg to the `react-native-xcode.sh` instead of by setting `ENTRY_FILE` env var.
So this diff does 2 things:
* Undid https://github.com/facebook/react-native/pull/29263
* Fix RNTester JS bundling invocation to set the ENTRY_FILE correctly
{F659123377}
Changelog: [iOS][Fixed] Unbreak $ENTRY_FILE handling for JS bundling
Reviewed By: lunaleaps
Differential Revision: D30690900
fbshipit-source-id: 7c5802b3eac56c0456edcd4b7478bfa4af48fc27
Summary:
Create a ScreenshotManager.podspec (codegen recipe included) and add ScreenshotManager Pod to the Podfile.
Changelog:
[Internal]
Reviewed By: fkgozali
Differential Revision: D30623054
fbshipit-source-id: be20880a53ba8a08f8b42b8d81c868c8a21960e1
Summary:
The version of this package needs to be bumped for me to release the changes from https://github.com/facebook/react-native/issues/28637 to NPM.
## Changelog
[Internal] [Added] - Bump react-native-community/eslint-config version
Pull Request resolved: https://github.com/facebook/react-native/pull/32117
Test Plan: N/A
Reviewed By: cortinico
Differential Revision: D30663708
Pulled By: yungsters
fbshipit-source-id: f433c324f12663d76e55c9395630cd642955b25e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32073
This Diff bumps the version of Gradle used to build the project to
7.0.2. Ideally we could bump to 7.2.x directly, but I'll do one minor version
at a time to exclude potential build problems.
This diff is addressing all the extra build warnings that got raised by the new version.
Changelog:
[Android][Changed] - Bumped Gradle project version to 7.0.2
Reviewed By: ShikaSD
Differential Revision: D30486612
fbshipit-source-id: 70e0f7d18e547013ca7b1d12f8dd64a633df5870
Summary:
In monorepo environment, prettier-plugin in some editor load from nearest `node_modules`. Older version of eslint-config-react-native-community includes prettier v1 in their dependencies. It cause conflict of code style inside the monorepo.
## 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] - move prettier to peerDependencies in eslint-config-react-native-community
Pull Request resolved: https://github.com/facebook/react-native/pull/28637
Test Plan: I think it would be good with no plan to test.
Reviewed By: yungsters
Differential Revision: D30648134
Pulled By: charlesbdudley
fbshipit-source-id: 6c01226d6e4cc37ddbc86be260563deb093758d0
Summary:
While not strictly necessary for rn-demo-app at this point, we do need to provide the `getModuleInstanceFromClass:` implementation to simplify the TurboModule migration process later on.
Also, removed some issues in the Xcode project that must have been introduced during a recent rebase (duplicate Embed Pods build phases).
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D30618992
fbshipit-source-id: a9b496cfa0cd34fca6389ddf829613aa13ea409d
Summary:
Ship libjsi as a standalone dynamic library. This prevents problems
with exception handling caused by duplicate typeinfo across multiple
shared libs, and reduces bundle size by removing duplicate copies of
JSI.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D30599215
fbshipit-source-id: abad1398342a5328daa825f3f684e0067cad7a96
Summary:
hyphenationStrategy must be one of one of Layout#HYPHENATION_FREQUENCY_NONE, Layout#HYPHENATION_FREQUENCY_NORMAL, Layout#HYPHENATION_FREQUENCY_FULL: (https://developer.android.com/reference/android/widget/TextView#setHyphenationFrequency(int))
Thus "high" and "balanced" are not only redundant, but actually don't do what the value indicates - Layout#BREAK_STRATEGY_BALANCED (constant value: 2) and Layout#BREAK_STRATEGY_HIGH_QUALITY (constant value: 1) are only meant to be used for android:breakStrategy
Changelog:
[Android][Changed] - Remove `"high"` and `"balanced"` as values for `android_hyphenationFrequency` on `Text`
Reviewed By: JoshuaGross
Differential Revision: D30531096
fbshipit-source-id: 1a0b6e733bb21ce6b2f104a2025a79c16de3cfea
Summary:
Changelog: [Internal]
This diff
- add `queueMicrotask` to eslint and metro so it's globally available.
- add `queueMicrotask` to the global libdef of react native so the type
is available to `global.queueMicrotask` (which is common) as well.
Reviewed By: yungsters
Differential Revision: D30158144
fbshipit-source-id: 00a62193b838745c91179ff1e983636200560690
Summary:
Currently there isn't any way to test if the Accessibility Display Options or the event listeners for them were working properly within RNTester. It turns out that because of changes to the accessibility API Apple made when they added Smart Invert AccessibilityInfo.isInvertColorsEnabled() and the associated event listener are working incorrectly. You can see this if you take a look at how RNTester (with this PR incorporated) responds to toggling Invert Colors. I've submitted a bug report to Apple, but this might have been caught earlier if this had been implemented.
## Changelog
[General] [Added] - Adding Accessibility Display Options Enabled to RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/29231
Test Plan:
1. Build iOS app
2. Navigate to the Accessibility page
3. Switch over to settings and change any of the settings at
- Settings>Accessibility>Display and Text Size>Bold Text
- Settings>Accessibility>Display and Text Size>Color Filters>Grayscale
- Settings>Accessibility>Display and Text Size>Smart Invert (or Classic Invert)
- Settings>Accessibility>Motion>Reduce Motion
- Settings>Accessibility>VoiceOver>VoiceOver
4. Switch back to the app and see the results


Modified it a bit to only show relevant statuses for the Platform
| {F656951547} | {F656951643} |
Reviewed By: TheSavior
Differential Revision: D29531642
Pulled By: lunaleaps
fbshipit-source-id: f54fb3216ef663428c23b613f0a3b10b01d7f24d
Summary:
https://github.com/facebook/react-native/commit/8a62583f794875e6dc5d1e4a24889b3b702d9f86 did some renaming inside of the react-native/polyfills project, with the jest preset updated to use the new name. The new package for polyfills has not yet been published, so the jest preset in the main branch will be looking for the new name, while the old name is provided by the currently published react-native/polyfills@1.0.0. This is not hit inside the repo, since the dependency is linked instead of using the published one.
Bump react-native/polyfills to 2.0 (breaking change), in preparation for publish.
## Changelog
[Internal][Fixed] - Bump react-native/polyfills version
Pull Request resolved: https://github.com/facebook/react-native/pull/32074
Reviewed By: lunaleaps, cortinico
Differential Revision: D30498104
Pulled By: yungsters
fbshipit-source-id: 92dcb159d76bd74cd93cfa09e2155c9c1b2c0a86
Summary:
> Always leave the campground cleaner than you found it.
Fixing:
* typo in _dismissed_
* make the subject agree with the verb
## Changelog
[Internal] [Fixed] - A typo in a comment
Pull Request resolved: https://github.com/facebook/react-native/pull/31916
Test Plan: Grammarly says it's better now.
Reviewed By: lunaleaps
Differential Revision: D29967403
Pulled By: yungsters
fbshipit-source-id: 6cb33328e99e3fceba5f19f4baaa9446340fbbcc
Summary:
Changelog: [Internal]
Disables implicit `babel.config.js` lookup in a `parse()` call that does not need any user-specified config.
Reviewed By: javache
Differential Revision: D30396331
fbshipit-source-id: 9b07c361eae53cdffc6a76ba30f1146a7af65a10
Summary:
This diff adds a default behavior for the unified logger on Android.
Added the call site in the CXXNativeModule.
Changelog: [internal]
Reviewed By: JoshuaGross
Differential Revision: D30377767
fbshipit-source-id: 000014828f2f245dc9492e3617218895d9a33536
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32042
This diff moves react_native_log out of utils to make it easier/possible to import from modules.
Changelog: [internal]
Reviewed By: JoshuaGross
Differential Revision: D30411247
fbshipit-source-id: 5482761b259600df051a88c6eff1834c882e7230
Summary:
Fix the CSS on the main Modal test
Move the warning message for the "Transparent" switch to below the switch, since warnings messages are usually under the field they're warning.
Move Presentation Style to be before Transparent, since Transparent is a modifier of "overFullScreen" Presentation Style.
Reviewed By: lunaleaps
Differential Revision: D30323087
fbshipit-source-id: b13d6c958145096da95c9888181ff457b093fb49
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32007
This Diff simplifies the codegen Gradle build.
Previously the build used to have a 2-level nesting of included build.
Turns out that the `react-native-codegen/android/build.gradle` build
is just providing a task and including an inner build that contains the codegen
Gradle plugin. I've moved such plugin to the outer build.
This will also make sure that the Gradle plugin files are properly index by the
IDE when opening the build (as nested included build are not yet supported).
Changelog:
Internal - Flatten the `react-native-codegen` Gradle included build
Reviewed By: fkgozali, ShikaSD
Differential Revision: D30227784
fbshipit-source-id: af304afeeba1926f8b7b5b47cf69889d3f808f5f