Skip to content
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

Merge upstream into fork #1

Merged
merged 59 commits into from
Aug 17, 2020
Merged

Merge upstream into fork #1

merged 59 commits into from
Aug 17, 2020

Conversation

HeyImChris
Copy link
Owner

@HeyImChris HeyImChris commented Aug 17, 2020

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

Periodic merging of master into fork

Changelog

[iOS/macOS] [Bug] - Merging master

Test Plan

No tests

mganandraj and others added 30 commits June 11, 2020 09:50
* Working around ndk paths containing spaces in it

* Fixing a syntax error in task definitino
* Attempting to add isVoiceOverEnabled to macOS

* Added changes for failure for TurboModules and NativeModules

* Mannaged to get static checking working

* Enabled screenReaderChanged watcher with KVC

* Forked file and cleaned up

* Finished cleaning up

* Did one last bit of clean up

* Removed console.log and returned to using TurboModules.

* added Dealloc to remove the KVO observer

* ran npx clang-format then polished a few things

* Fixed flow error

* Added new line

* Update React/Modules/MacOS/RCTAccessibilityManager.m

Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>

* Taken Set up off main thread

* Added correct comment

* Removed ifdefs since the file is no longer being used for macOS

Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
* Attempting to add isVoiceOverEnabled to macOS

* Actually completed merge

* Added Tester for SetFocus

* Enabled setFocus

* Clean up console.log

* Cleaned up newline

* merged and cleaned up comments

* Added newlines back in

* Added linting changes

* Moved props into a single line for eslint.
* Fix onSubmitEditing firing on delete/tab

`-[RCTBaseTextInputView textInputShouldReturn]` also sends a submit
event.

* Submit only on ⌘+Enter
Co-authored-by: Tom Underhill <tomun@microsoft.com>
* Switching the build pipleine to run on Ubuntu image with the latest ANdroid build tools

* Clearing the dependencies envivornment which we don't set fot he RN61 builds in master now.

* Removing V8Integration patches which is causing issues while gradle clean
…ed (#455)

* Attempting to add isVoiceOverEnabled to macOS

* removing console.log

* Removed Merge conflicts

* Resolved merge conflict

* Removed comments/notes

* Removed comments/notes

* Added Features and encorporated into test app

* Removed logging

* Fixed mistakes in PR

* Changing name to DisplayOptions

* Removing extra newlines

* Adding linting fixes

* Added Notifaction unsubscribe to dealloc

* Lowercased selector to fit obj-c convention

* uncommented unsubscription

* Added TODOs around diff

* Put ScreenReaderStatus back in it's own component

* Lint fix
Setting `blurOnSubmit` to `true` means that pressing return will blur
the field and trigger the `onSubmitEditing` event instead of inserting
a newline into the field.

-- https://reactnative.dev/docs/textinput#bluronsubmit
* Fix overflow:'hidden' github issue #399 (attempt 2)

* Update React/Views/RCTView.m

* Fix comment nit
graytmatterMS and others added 26 commits June 30, 2020 09:56
* Attempting to add isVoiceOverEnabled to macOS

* Dealt with merge conflicts

* Cleaned bad tab

* removed comments

* Enabled announceForAccessibility

* removed console.log

* Removed unrelated changes

* Removed last unrelated changes
* Fixing OS specific failure in publish task

* Adding publish verfification into the PR job

* Adding some comments.

* Removing the diagnostic logs
)

It seems that the returned string that we use to set `previousText` can
be mutated while it is waiting to be processed by RCTBridge.
* Attempting to add isVoiceOverEnabled to macOS

* Dealt with merge conflicts

* Cleaned bad tab

* Added reactAccessibilityElement resolver to ImageView

* Switched reactAccessibilityElement type to id to be consistent

* removed console.log

* removed comments

* fixed deltas

* removed deltas

* removed deltas

* added newline and matched .h definition

* id is a pointer

* Back out `id` change.

Co-authored-by: Tom Underhill <tomun@microsoft.com>
* Update RCTCxxBridge.mm

* Get react-native-macos building on xcode 12 universal

* Fix up to use NSControl's font prop for macOS
* Attempting to add isVoiceOverEnabled to macOS

* Dealt with merge conflicts

* Cleaned bad tab

* Removed comments

* Removed console.log

* fixed deltas

* Fixed TextView value so VO announces

* Ensured labels aren't read twice and added explanitory Comment

* Removed unnecessary supe call

* copied text in case of mutable string.

* Fix compile error: `[label copy]` not `[copy label]`.
Cleanup some comments and whitespace.

Co-authored-by: Tom Underhill <tomun@microsoft.com>
* Update RCTCxxBridge.mm

* Enable builds to produce fat binaries (x86_64 and arm64)
* Update scripts to publish react-native-macos-init

* Clean up merge markers

* Restored ios:macos RNTester parity except for InputAccessoryView.

* Revert "Restored ios:macos RNTester parity except for InputAccessoryView."

This reverts commit 5a67ae0.

* Remove unnecessary android builds and tar file upload.

* Fix onFocus/onBlur View events to properly bubble.

* The Text component can also be selectable={true} and needs the same focus/blur event triggering as View.

Co-authored-by: React-Native Bot <53619745+rnbot@users.noreply.github.com>
* Update scripts to publish react-native-macos-init

* Clean up merge markers

* Restored ios:macos RNTester parity except for InputAccessoryView.

* Revert "Restored ios:macos RNTester parity except for InputAccessoryView."

This reverts commit 5a67ae0.

* Remove unnecessary android builds and tar file upload.

* Fix crash in NSLayoutManager dealloc on macOS.

* Bump node version in Brewfile

* copy the NSArray before iterating of it since, removes can invalidate the iterator

* Add `brew update` steps before `brew bundle`.

* Ensure node version update

Co-authored-by: React-Native Bot <53619745+rnbot@users.noreply.github.com>
* Create feature-request template

* Rename feature-request.md to feature_request.md

* Create module_request.md
* Update RCTCxxBridge.mm

* fix new compiler error on beta 4
@HeyImChris HeyImChris merged commit e8d2d8b into HeyImChris:master Aug 17, 2020
HeyImChris pushed a commit that referenced this pull request Sep 3, 2020
* Add ScreenshotManagerTurboModule, but it is not called.

* ...

* Update AppDelegate.mm

* Fix code due to facebook API rename

* Update AppDelegate.mm

* [Pods] Expose boost headers to consumer of RCT-Folly (#1)

* Update AppDelegate.mm

* ScreenshotManagerTurboModule gets called

* reject the promise in takeScreenshot

* ...

* Put TurboModuleRegistry.get call at the right place

* ...

* Successfully took the screenshot

* Remove unnecessary code

* Fix code review comments

* Fix code review comments

* ...

* Fix code review comments

* Fix build break

* Fix build break

* Fix build break

* Update NativeScreenshotManager.js

* Fix build break

* Fix yarn lint errors

Co-authored-by: Eloy Durán <eloy.de.enige@gmail.com>
HeyImChris pushed a commit that referenced this pull request Mar 11, 2021
Summary:
While in theory we should never delete views before removing them from the hierarchy, there are some exceptions:

(1) Some mysterious cases that don't seem like bugs, but where the child still seems to keep a reference to the parent:
(2) When deleting views as part of stopSurface.

On #1: in the past we had issues when we assumed that ViewManager.getChildCount() would return an accurate count. Sometimes it's just... wrong. Here, I've found at least one case where a View still has a parent after it's removed from the View hierarchy. I assume this is undocumented Android behavior or an Android bug, but either way, there's nothing I can do about it.

On #2: there are valid cases where we want to delete a View without explicitly removing it from the View hierarchy (it will eventually be removed from the hierarchy when the Root view is unmounted, but it may still be "in" a View hierarchy when it's deleted).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D22321374

fbshipit-source-id: 9667bbe778c418f0216550638dc26ca48a58e5fa
HeyImChris pushed a commit that referenced this pull request Mar 11, 2021
Summary:
changelog: [internal]

Prevents 2 type converions:
1. int <-> size_t
2. int <-> int32_t

# Why is using size_t better when working with indexes.

## 1. Type conversion isn't for free.

Take this example

```
size_t calculate(int number) {
  return number + 1;
}
```

It generates following assembly (generated with armv8-a clang 10.0.0):

```
calculate(int):                          // calculate(int)
sub     sp, sp, microsoft#16                     // =16
str     w0, [sp, microsoft#12]
ldr     w8, [sp, microsoft#12]
add     w9, w8, #1                      // =1
mov     w8, w9
sxtw    x0, w8
add     sp, sp, microsoft#16                     // =16
ret
```

That's 9 instructions.

If we get rid of type conversion:

```
size_t calculate(size_t number) {
  return number + 1;
}
```

Assembly (generated with armv8-a clang 10.0.0):

```
calculate(unsigned long):                          // calculate(unsigned long)
sub     sp, sp, microsoft#16             // =16
str     x0, [sp, #8]
ldr     x8, [sp, #8]
add     x0, x8, #1              // =1
add     sp, sp, microsoft#16             // =16
ret
```

Compiler now produces only 7 instructions.

## Semantics

When using int for indexing, the type doesn't say much. By using `size_t`, just by looking at the type, it gives the reader more information about where it is coming from.

Reviewed By: JoshuaGross

Differential Revision: D24332248

fbshipit-source-id: 87ef982829ec14906ed9e002ea2e875fda4a0cd8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants