* 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
* 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>
* 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>