Граф коммитов

26594 Коммитов

Автор SHA1 Сообщение Дата
Saad Najmi 90a371a413
Remove more stale folders/files/changes (#1337)
* Delete more stuff

* Remove some stale looking SDX platform scripts

* Remove remnant of `acceptsKeyboardFocus`

* Add back some missing newlines
2022-08-08 12:22:38 -07:00
Saad Najmi fdcec4d55b
Match package.json dependencies with RN Core + prettier (#1333)
* update package.json files and yarn lock

* yarn prettier --fix

* Fix remaining yarn lint issues

* Fix integration CI
2022-08-05 16:46:51 -07:00
Saad Najmi 9421f1a5d0
Remove stale files and folders from the root of our repo (#1328)
* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (#11)

* Deprecated api (#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* remove pull yml

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
2022-08-05 11:16:51 -07:00
Saad Najmi 3b1f575937
Ensure we pass `--frozen-lockfile` (#1329) 2022-08-05 09:14:54 -07:00
Christoph Purrer 0f665ba655
Remove TextInput setting insertionPointColor (#1321) 2022-08-05 09:45:41 -04:00
rasaha91 e960741886
Merge pull request #1323 from rasaha91/cherry-pick-ndk-fixes
Cherry pick ndk fixes
2022-08-04 16:36:45 -07:00
Christoph Purrer e6482e0c24
Revert "Alleviate excessive layout jittering when resizing window (#439)" (#1318)
This change reverts https://github.com/microsoft/react-native-macos/issues/459 - but still tries to address the original issues:
- https://github.com/microsoft/react-native-macos/issues/422
- https://github.com/microsoft/react-native-macos/issues/322

This also addresses an issue when programmatically resizing windows where the RCTRootContentView may end up at the wrong size because an in-flight layout gets resolved after the resize on the main thread.
We now keep sync dispatch on the shadow queue for live resizing windows (to prevent tearing) but also dispatch async (as done on iOS) so the latest new size is sure to win.
The block has a check to bail if the size doesn't change, so this isn't a perf drain running the block twice.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-08-04 08:35:54 -07:00
rasaha91 c83c522236 Merge pull request #1319 from rasaha91/fix-incorrect-version
set version before build
2022-08-02 19:49:04 -07:00
rasaha91 0ed3d385c2 Merge pull request #1315 from rasaha91/hardcode-ndk
Hardcode ndk
2022-08-02 19:42:21 -07:00
Shawn Dempsey 2bcaeb1894
[RN][macos] Enable Hermes for RNTester (#1308)
Summary:
**Context**

On Core RN, Hermes for iOS can be enabled by setting a flag in the Podfile
https://reactnative.dev/docs/hermes#ios

| Since React Native 0.64, Hermes also runs on iOS. To enable Hermes for iOS, edit your ios/Podfile file and make the change illustrated below:
```
   use_react_native!(
     :path => config[:reactNativePath],
     # to enable hermes on iOS, change `false` to `true` and then install pods
     # By default, Hermes is disabled on Old Architecture, and enabled on New Architecture.
     # You can enable/disable it manually by replacing `flags[:hermes_enabled]` with `true` or `false`.
     :hermes_enabled => true
   )
```
In the RNTester Podfile, Hermes is enabled using envvar:
https://github.com/facebook/react-native/blob/main/packages/rn-tester/Podfile#L27
```
  # Hermes is now enabled by default.
  # The following line will only disable Hermes if the USE_HERMES envvar is SET to a value other than 1 (e.g. USE_HERMES=0).
  hermes_enabled = !ENV.has_key?('USE_HERMES') || ENV['USE_HERMES'] == '1'
```
Build command: `USE_HERMES=1 bundle exec pod install`

This will install the Hermes runtime Pod (not build it from scratch) & thus enable the `RCT_USE_HERMES` macro.

https://www.internalfb.com/code/fbsource/[9f57823a75a40d3f8559c8f1b7ae0add8e95d6dc]/xplat/js/react-native-github/packages/rn-tester/RNTester/AppDelegate.mm?lines=10-16

---

The documentation for enabling Hermes on RN Desktop macOS are outdated:
https://microsoft.github.io/react-native-windows/docs/hermes#hermes-on-macos

> Install the npm package yarn add 'hermes-engine-darwin@^0.4.3'

* `hermes-engine-darwin` is no longer required

> Add (or uncomment) the following pod dependencies to your macOS target in your Podfile:
pod 'React-Core/Hermes', :path => '../node_modules/react-native-macos/'
pod 'hermes', :path => '../node_modules/hermes-engine-darwin'
pod 'libevent', :podspec => '../node_modules/react-native-macos/third-party-podspecs/libevent.podspec'

* Setting `USE_HERMES=1` during `pod install= replaces all of this

> Copy
Run pod install
Be sure to set your target's deployment target to at least 10.14 before running pod install

* `USE_HERMES=1 bundle exec pod install --verbose`

---

On RN Desktop, the Hermes flag was [set to false](https://github.com/microsoft/react-native-macos/pull/780) due to M1 build reasons which have since been resolved.
- https://github.com/microsoft/react-native-macos/issues/952
- https://github.com/microsoft/react-native-macos/issues/781

Curiously, the `RNTester-macOS` target AppDelegate was never updated to import & use Hermes when  `RCT_USE_HERMES` was `true`. Only the `RNTester` for mobile had the correct Hermes usage.

**RNTester-macOS:** https://github.com/microsoft/react-native-macos/blob/main/packages/rn-tester/RNTester-macOS/AppDelegate.mm

**RNTester:** https://github.com/microsoft/react-native-macos/blob/main/packages/rn-tester/RNTester/AppDelegate.mm

**Change**

* Remove `pods(:hermes_enabled => true)` in favor of passing `USE_HERMES=1` to `pod install` (This is how it's done on RNTester iOS)
* Copy Hermes support to `RNTester-macOS` AppDelegate

Test Plan: **Install from scratch**

Differential Revision: https://phabricator.intern.facebook.com/D38277077

Co-authored-by: Shawn Dempsey <shawndempsey@fb.com>
2022-08-02 14:42:29 -07:00
rasaha91 4a3b4bf8e1
Merge pull request #1316 from rasaha91/cherry-pick-pool-change
Cherry-pick changes to agent pools from 0.68-stable to main
2022-08-02 11:06:08 -07:00
rasaha91 7ad1816158 Merge pull request #1313 from rasaha91/switch-pool
switch to large pool for faster PR times
2022-08-01 22:34:25 -07:00
Christoph Purrer bea60b79b6
Fix nested Text components not inheriting foreground color from parent (#1283)
This seems to due RN Mac commits that fix text colors for dark mode:
- 8ed55a866a
- 731a535dca

It works on iOS, web .... so it should behave the same on macOS as well

Co-authored-by: Liron Yahdav <lyahdav@fb.com>
2022-07-29 16:52:55 -07:00
Adam Gleitman 2a9e517029
Merge pull request #1310 from amgleitman/office-publish-120-minutes
Increase Office publish timeout to 120 minutes
2022-07-29 15:58:02 -07:00
Adam Gleitman 4096fc3abf Increase Office publish timeout to 120 minutes 2022-07-29 15:24:44 -07:00
msftbot[bot] 39d6b7b8e5
Add `.github/fabricbot.json` (#1225)
Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com>
2022-07-28 22:03:57 -07:00
rasaha91 33b3060fd7
Merge pull request #1302 from rasaha91/cherry-pick-nuget-fixes
Cherry pick nuget fixes
2022-07-28 22:03:10 -07:00
Christoph Purrer 825d334e8b
Fix enableFocusRing also enabled for multiline textFields (#1301) 2022-07-28 09:25:12 -04:00
rasaha91 dfebc17736 Merge pull request #1297 from rasaha91/error-nuget
Escape semi-colon in bash command
2022-07-27 23:52:55 -07:00
rasaha91 8ed7f2934d Merge pull request #1294 from rasaha91/fix-nuget
update paths to binaries
2022-07-27 23:52:31 -07:00
chiuam ea192044d5
Textinput range fix (#1296) 2022-07-27 17:25:59 -04:00
Christoph Purrer bc183b64c0
Single line TextInput fixes (#1284) 2022-07-27 10:17:46 -04:00
Christoph Purrer e9f8381acf
Pass grammarCheck to text input views for Mac (#1293) 2022-07-27 09:21:52 -04:00
Christoph Purrer d69fa5b435
Don't send events when clicking on scrollbars (#1281)
This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-26 10:16:32 -07:00
Christoph Purrer 6f2f11fc5f
Fix text replacement not working in multiline TextInput (#1286)
This bug was due to some code in multiline TextInput which disabled all text checking types by default.
We now match the system default instead.

Co-authored-by: Liron Yahdav <lyahdav@fb.com>
2022-07-26 10:15:28 -07:00
Christoph Purrer 1c38432e9d
Fix spellCheck and autoCorrect props (#1292)
Summary: This fixes `autoCorrect` to correctly map to `automaticSpellingCorrectionEnabled`, and `spellCheck` to map to `continuousSpellCheckingEnabled`.

Note: automaticTextReplacementEnabled is a different feature than automaticSpellingCorrectionEnabled
https://developer.apple.com/documentation/appkit/nstextview/1449210-automatictextreplacementenabled
https://developer.apple.com/documentation/appkit/nstextview/1449254-isautomaticspellingcorrectionena

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-26 10:12:59 -07:00
Christoph Purrer 31634e5017
Fix RCTDevLoadingView never actually closing (#1280)
This fixes a copy/paste mistake where the loading panel is being shown after it fades out instead of being closed. This manifested as app exposé showing a transparent window and these panels showing up in the UI debugger (thus leaking).

Confirmed the loading panels actually now go away and app exposé behaves reasonably now.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-25 15:55:57 -07:00
Christoph Purrer f384479eed
Fix event.locationX/Y to be in view's coordinate space (#1288)
This fixes an issue on macOS where the `locationX`/`Y` properties would incorrectly match `pageX`/`Y` unlike iOS (see lines 218/219 in the same file) and other platforms.

Confirmed `locationX`/`Y` is now correctly reported in the view's coordinate space.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-25 15:53:22 -07:00
chiuam 9639637560
Turn on focus ring for multiline textinput (#1276) 2022-07-22 18:25:04 -04:00
Christoph Purrer b6f1220306
Fix missing autorelease pool in RCTPlatformDisplayLink (#1277)
This fixes leaking `_RCTTimer` instances. The runloop does not push/pop autorelease pools for you with `CFRunLoopPerformBlock`. A similar autorelease pool is setup for the same reason in `RCTMessageThread`.

Confirmed expected number of `_RCTTimer` instances in Xcode memory graph.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-22 14:47:53 -07:00
Christoph Purrer 90bb91ab08
Allow scrollResponderZoomTo() on macOS (#1265)
Already works on macOS (as it does on iOS).
Doesn't work on Android or Windows

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-22 11:57:08 -07:00
Christoph Purrer b1e6b9783a
Add undo/redo support for TextInput (#1274)
Setting `allowsUndo = YES` and having the `NSTextView` delegate return a stable `NSUndoManager` mostly makes undo/redo work, but we also needed to register an undo action whenever the input contents was changed to something unexpected by JS.

This also breaks undo coalescing in a couple key places to make the input behave naturally like other apps.

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-22 10:59:14 -07:00
Adam Gleitman 46da582b92
Merge pull request #1266 from christophpurrer/avoidRTCUnsafeExecuteOnMainQueueSync
Avoid RCTUnsafeExecuteOnMainQueueSync from RCTUIManager
2022-07-22 10:44:20 -07:00
Christoph Purrer f6b4c1e712
Fix VoiceOver for single-line TextInput (#1271)
This adds the appropriate override for AppKit (`setAccessibilityElement:`) so that the `NSTextField` will not get set to be accessible, since its cell instead is already accessible and performs the correct VoiceOver behaviors.

VoiceOver now reads as you type in a single-line `TextInput`

Co-authored-by: Scott Kyle <skyle@fb.com>
2022-07-22 08:44:53 -07:00
Scott Kyle 371ef593de Avoid RCTUnsafeExecuteOnMainQueueSync from RCTUIManager
These calls are only needed for a temporary Fabric workaround and would result in a deadlock since we also call `RCTUnsafeExecuteOnUIManagerQueueSync` from the main thread during window resize.

This is needed for now in Fabric only to call the temporary `componentViewName_DO_NOT_USE_THIS_IS_BROKEN` workaround on views, which we don't have on desktop since we're a way off from using Fabric (and hopefully this workaround will be gone then).

It was originally added here ffc7ec992c

At Meta we have disabled these lines since May 2021 to fix crashes in production.
2022-07-22 07:33:31 -07:00
Saad Najmi e689f08baa
Update FlatList.js (#1270) 2022-07-21 19:58:40 -07:00
Saad Najmi eefd4a8e04
Flatlist keyboard navigation: Mouse can move selection (#1267)
* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (#11)

* Deprecated api (#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* mouse selection works too

* remove pull.yml

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
2022-07-21 17:02:42 -07:00
Saad Najmi 84c08634ea
Keyboard navigation in Flatlist (#1258)
* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (#11)

* Deprecated api (#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (#852)

* Ignore javadoc failure

* Bringing few more changes from 0.63-stable

* Fixing a patch in engine selection

* Fixing a patch in nuget spec

* Fixing the output directory of nuget pack

* Packaging dependencies in the nuget

* Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (#755) (#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* fix mouse evetns on pressable

* delete extra yml from this branch

* Add macOS tags

* reorder props to have onMouseEnter/onMouseLeave always be before onPress

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* Grammar fixes. (#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* wip

* wip

* more wip

* Home/End/OptionUp/OptionDown work

* ensureItemAtIndexIsVisible works

* Home/End work

* Initial cleanup for PR

* More cleanup

* More cleanup

* Make it a real prop

* No need for client code

* Don't move keyboard focus with selection

* Update tags

* Fix flow errors

* Update colors, make ScrollView focusable

* prettier

* undo change

* Fix flow errors

* Clean up code + handle page up/down with new prop

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
2022-07-19 15:13:32 -07:00
Adam Gleitman 573eab0706
Merge pull request #1261 from amgleitman/remove-old-string_decoder
Remove old versions of `string_decoder`
2022-07-18 17:56:10 -07:00
Adam Gleitman 365b747bfa Upgrade webpack in msggen 2022-07-18 14:48:56 -07:00
Adam Gleitman c734833a38 Force resolve readable-stream to 4.0.0 in bots/ 2022-07-18 14:48:40 -07:00
Adam Gleitman 788ec2edc5
Merge pull request #1257 from amgleitman/ocmock-pod
Import OCMock for RNTester macOS as a pod
2022-07-15 15:57:20 -07:00
Adam Gleitman dce4ae21c3
Merge pull request #1259 from amgleitman/more-component-governance
Update beachball to 2.25.0
2022-07-14 14:59:32 -07:00
Adam Gleitman 42da663aa7 Use OCMock pod on iOS as well 2022-07-14 14:51:41 -07:00
Adam Gleitman 5bdce4d2fa Use OCMock 3.9.1 2022-07-14 13:03:38 -07:00
Adam Gleitman 6240005adf Remove a resolution of workspace-tools that we don't need anymore 2022-07-13 19:15:04 -07:00
Adam Gleitman c5fd7a1f20 Upgrade beachball to 2.25.0 2022-07-13 19:13:23 -07:00
Adam Gleitman b76a2a4445 Import OCMock for RNTester macOS as a pod 2022-07-13 10:55:04 -07:00
rasaha91 1498fe595a
Merge pull request #1256 from rasaha91/cherry-pick-0.68-fixes
Cherry pick 0.68 fixes for rn-tester publishing
2022-07-12 15:22:51 -07:00
Adam Gleitman e7edc026f3
Merge pull request #1252 from amgleitman/force-readable-stream-4.0.0
Resolve readable-stream to 4.0.0
2022-07-12 13:33:58 -07:00