Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8640f54
Moving the android specific changes to patch files and reverting them…
mganandraj Feb 27, 2020
64c6dd7
Apply patches immediately after cloning
mganandraj Feb 28, 2020
d7221f2
Fixing the webpack config for the bundle to run correctly
mganandraj Feb 28, 2020
8fd8658
Removing an unwanted hunk from folly makefile hwich might be causing …
mganandraj Feb 28, 2020
4cba06f
Reverting src/main/jni/third-party/folly/Android.mk hoping for the be…
mganandraj Feb 28, 2020
209ce35
Fixing the patch scripts
mganandraj Feb 28, 2020
cf97ca0
Fixing a patch file with integrity failure.. and tightening the error…
mganandraj Feb 29, 2020
416b966
Adding more diagnostics
mganandraj Feb 29, 2020
c0aa7a6
More diagnostics
mganandraj Feb 29, 2020
f07774f
Fixing line splitting of patch and source files while patching
mganandraj Feb 29, 2020
5a38612
Cleaning up the diagnostics.. Patching should work this time.
mganandraj Feb 29, 2020
11d0bed
Reverting the change needed for MAC/iOS
mganandraj Mar 2, 2020
beca141
More diagnostics printed out ..
mganandraj Mar 3, 2020
609edd4
Fixing MAC/iOS build
mganandraj Mar 6, 2020
781d26e
yarn test -u
mganandraj Mar 10, 2020
3099adc
Update .eslintignore
mganandraj Mar 10, 2020
68486b9
Fixing a couple of linking errors in JS'
mganandraj Mar 11, 2020
29dfd72
Adding prettierignore and making some fixes to the patches
mganandraj Mar 11, 2020
b8e0103
More fixes to the path
mganandraj Mar 11, 2020
a2434af
Making required changes in Apple PR/Publish build pipelines to valiat…
mganandraj Mar 17, 2020
f5b683b
A fix in the patch application condition
mganandraj Mar 17, 2020
ee30a48
More fixes in the patch application condition
mganandraj Mar 17, 2020
e85c6bc
Another attempt to fix the patching condition
mganandraj Mar 17, 2020
0d05f61
Yet Another attempt to fix the patching condition
mganandraj Mar 17, 2020
cb73763
Yet Another attempt to fix the patching condition.. forcing the param…
mganandraj Mar 17, 2020
cc6c2e8
Yet Another attempt to fix the patching condition.. forcing the param…
mganandraj Mar 17, 2020
7643440
Making patches work on non-windows.. and more fixes for the condition…
mganandraj Mar 18, 2020
45e3241
Diagnostics for debugging conditions
mganandraj Mar 18, 2020
223738d
Diagnostics for debugging conditions 2
mganandraj Mar 18, 2020
1e9a606
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
24eb685
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
5729565
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
3bb43cd
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
ddf8f9f
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
155a699
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
026a5f7
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
92aa5d5
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
c2e4c3b
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
2efa88a
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
b7da71c
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
8c62993
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
0bbadba
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
3e0d58c
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
8317956
Diagnostics for debugging conditions 3
mganandraj Mar 18, 2020
c945b30
Workaround
mganandraj Mar 18, 2020
7452aa6
Workaround
mganandraj Mar 18, 2020
1bed50b
Workaround
mganandraj Mar 18, 2020
1803133
Workaround
mganandraj Mar 18, 2020
1eac566
Fixing Apple build failure with patch applied ..
mganandraj Mar 18, 2020
ce448cf
Refactoring the patch application to template
mganandraj Mar 18, 2020
7a92e16
Fixing the template file relative URL when referenced from another te…
mganandraj Mar 18, 2020
d4c0b56
Fixing a mistake introduced while refactoring the patch creating steps.
mganandraj Mar 18, 2020
9add875
Fixing some formatting
mganandraj Mar 18, 2020
0f5205d
Fixing some formatting
mganandraj Mar 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .ado/android-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- template: templates/apple-droid-node-patching.yml
parameters:
apply_office_patches: true

- task: UseNode@1
inputs:
version: '10.x'

# Install NuGet v4.6.4+
- task: NuGetToolInstaller@1
inputs:
Expand Down
27 changes: 27 additions & 0 deletions .ado/apple-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ pr:
jobs:
- job: JavaScriptRNPR
displayName: JavaScript React Native PR
strategy:
matrix:
office:
apply_office_patches: 'true'
public:
apply_office_patches: 'false'
pool:
vmImage: macOS-10.14
demands: ['xcode', 'sh', 'npm']
steps:
- template: templates/apple-job-javascript.yml
parameters:
apply_office_patches: $(apply_office_patches)

- job: AppleRNPR
displayName: Apple React Native PR
Expand All @@ -27,6 +35,7 @@ jobs:
xcode_destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8'
xcode_actions_debug: 'build test'
xcode_actions_release: 'build'
apply_office_patches: 'false'
# Microsoft- We don't use tvOS, so don't bother maintaining the infra
# tvos:
# packager_platform: 'ios'
Expand All @@ -40,6 +49,23 @@ jobs:
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions_debug: 'build test'
xcode_actions_release: 'build'
apply_office_patches: 'false'
ios-office:
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_destination: 'platform=iOS Simulator,OS=latest,name=iPhone 8'
xcode_actions_debug: 'build test'
xcode_actions_release: 'build'
apply_office_patches: 'true'
macos-office:
packager_platform: 'macos'
xcode_sdk: macosx
xcode_scheme: 'RNTester-macOS'
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions_debug: 'build test'
xcode_actions_release: 'build'
apply_office_patches: 'true'
pool:
vmImage: macOS-10.14
demands: ['xcode', 'sh', 'npm']
Expand All @@ -55,3 +81,4 @@ jobs:
xcode_actions_debug: $(xcode_actions_debug)
xcode_actions_release: $(xcode_actions_release)
xcode_destination: $(xcode_destination)
apply_office_patches: $(apply_office_patches)
50 changes: 50 additions & 0 deletions .ado/publish-npmjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This file defines the build steps to publish a release
name: $(Date:yyyyMMdd).$(Rev:.r)

trigger:
batch: true
branches:
include:
- master
- fabric
paths:
exclude:
- package.json

pr: none

jobs:
- job: RNGithubPublish
displayName: React-Native GitHub Publish
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- task: CmdLine@2
displayName: npm install
inputs:
script: npm install

- task: CmdLine@2
displayName: Bump package version
inputs:
script: node .ado/bumpFileVersions.js

- task: CmdLine@2
displayName: "Prepare package.json for npm publishing as react-native-macos"
inputs:
script: node .ado/renamePackageToMac.js

- task: Npm@1
displayName: "Publish react-native-macos to npmjs.org"
inputs:
command: 'publish'
publishEndpoint: 'npmjs'
15 changes: 4 additions & 11 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- template: templates/apple-droid-node-patching.yml
parameters:
apply_office_patches: true

# Install NuGet v4.6.4+
- task: NuGetToolInstaller@1
inputs:
Expand Down Expand Up @@ -139,14 +143,3 @@ jobs:
inputs:
PathtoPublish: '$(Build.StagingDirectory)\final'
ArtifactName: 'ReactNative-Final'

- task: CmdLine@2
displayName: "Prepare package.json for npm publishing as react-native-macos"
inputs:
script: node .ado/renamePackageToMac.js

- task: Npm@1
displayName: "Publish react-native-macos to npmjs.org"
inputs:
command: 'publish'
publishEndpoint: 'npmjs'
8 changes: 8 additions & 0 deletions .ado/templates/apple-droid-node-patching.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
parameters:
apply_office_patches: ''

steps:
- task: CmdLine@2
displayName: Apply Android specific patches for Office consumption
inputs:
script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) BuildAndThirdPartyFixes DialogModule UIEditText UIScroll UITextFont Accessibility OfficeRNHost SecurityFixes V8Integration AnnotationProcessing --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches-droid-office-grouped --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
7 changes: 7 additions & 0 deletions .ado/templates/apple-job-javascript.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
apply_office_patches: ''

steps:
- script: 'brew bundle'
displayName: 'brew bundle'
Expand All @@ -7,6 +10,10 @@ steps:

- template: apple-xcode-select.yml

- template: apple-droid-node-patching.yml
parameters:
apply_office_patches: $(apply_office_patches)

- script: 'yarn install'
displayName: 'yarn install'

Expand Down
5 changes: 5 additions & 0 deletions .ado/templates/apple-job-react-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
xcode_actions_debug: ''
xcode_actions_release: ''
xcode_destination: ''
apply_office_patches: ''

steps:
# Clean DerivedData
Expand All @@ -22,6 +23,10 @@ steps:
# Task Group: XCode select proper version
- template: apple-xcode-select.yml

- template: apple-droid-node-patching.yml
parameters:
apply_office_patches: $(apply_office_patches)

- task: CmdLine@2
displayName: yarn install
inputs:
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ packages/*/node_modules
pr-inactivity-bookmarklet.js
question-bookmarklet.js
flow/
bots/node_modules
bots/node_modules
android-patches/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ project.xcworkspace/*
/RNTester/android/app/gradlew
/RNTester/android/app/gradlew.bat
/ReactAndroid/build/
/build_deps/
/ReactAndroid/packages/

# Buck
.buckd
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android-patches/
25 changes: 3 additions & 22 deletions Libraries/Components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ const TextInput = createReactClass({
rejectResponderTermination={true}
accessible={props.accessible}
accessibilityLabel={props.accessibilityLabel}
accessibilityHint={props.accessibilityHint} // TODO(OSS Candidate ISS#2710739)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this prop in the macOS fork. Please restore. The comment can be changed to TODO(macOS ISS#2323203)

accessibilityHint={props.accessibilityHint} // TODO(macOS ISS#2323203)
accessibilityRole={props.accessibilityRole}
accessibilityStates={props.accessibilityStates}
nativeID={this.props.nativeID}
Expand Down Expand Up @@ -1256,8 +1256,8 @@ const TextInput = createReactClass({
onPress={this._onPress}
accessible={this.props.accessible}
accessibilityLabel={this.props.accessibilityLabel}
accessibilityHint={this.props.accessibilityHint} // TODO(OSS Candidate ISS#2710739)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this prop in the macOS fork. Please restore. The comment can be changed to TODO(macOS ISS#2323203)

accessibilityRole={this.props.accessibilityRole}
accessibilityHint={this.props.accessibilityHint} // TODO(macOS ISS#2323203)
accessibilityStates={this.props.accessibilityStates}
nativeID={this.props.nativeID}
testID={this.props.testID}>
Expand All @@ -1267,15 +1267,6 @@ const TextInput = createReactClass({
},

_onFocus: function(event: FocusEvent) {
// [TODO(android ISS)
// Set the focused TextInput field info in TextInputState.
// Delaying this to onFocus native event ensures that -
// 1. The state is updated only after the native code completes setting focus on the view
// 2. In case the focus is moving from one TextInput(A) to another TextInput(B), the state of
// A needs to be updated (blurred) before info about B is updated in TestInputState.
TextInputState.setFocusedTextInput(
ReactNative.findNodeHandle(this._inputRef),
); // ]TODO(android ISS)
if (this.props.onFocus) {
this.props.onFocus(event);
}
Expand Down Expand Up @@ -1371,17 +1362,7 @@ const TextInput = createReactClass({
_onBlur: function(event: BlurEvent) {
// This is a hack to fix https://fburl.com/toehyir8
// @todo(rsnara) Figure out why this is necessary.
// this.blur();
// [TODO(android ISS) removed: this.blur();
// Set the focused TextInput field info in TextInputState.
// Delaying this to onBlur native event ensures that -
// 1. The state is updated only after the native code completes clearing focus on the view
// 2. In case the focus is moving from one TextInput(A) to another TextInput(B), the state of
// A needs to be updated (blurred) before info about B is updated in TestInputState.
TextInputState.clearFocusedTextInput(
ReactNative.findNodeHandle(this._inputRef),
); // ]TODO(android ISS)

this.blur();
if (this.props.onBlur) {
this.props.onBlur(event);
}
Expand Down
27 changes: 1 addition & 26 deletions Libraries/Components/TextInput/TextInputState.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function currentlyFocusedField(): ?number {
*/
function focusTextInput(textFieldID: ?number) {
if (currentlyFocusedID !== textFieldID && textFieldID !== null) {
// TODO(android ISS) removed: currentlyFocusedID = textFieldID;
currentlyFocusedID = textFieldID;
if (
Platform.OS === 'ios' ||
Platform.OS === 'macos' /* TODO(macOS ISS#2323203) */
Expand Down Expand Up @@ -76,29 +76,6 @@ function blurTextInput(textFieldID: ?number) {
}
}
}

/** [TODO(android ISS)
* @param {number} TextInputID id of the text field that has received focus
* Should be called after the view has received focus and fired the onFocus event
* noop if the focused text field is same
*/
function setFocusedTextInput(textFieldID: ?number) {
if (currentlyFocusedID !== textFieldID && textFieldID !== null) {
currentlyFocusedID = textFieldID;
}
}

/**
* @param {number} TextInputID id of the text field whose focus has to be cleared
* Should be called after the view has cleared focus and fired the onFocus event
* noop if the focused text field is not same
*/
function clearFocusedTextInput(textFieldID: ?number) {
if (currentlyFocusedID === textFieldID && textFieldID !== null) {
currentlyFocusedID = null;
}
} // ]TODO(android ISS)

function registerInput(textFieldID: number) {
inputs.add(textFieldID);
}
Expand All @@ -113,8 +90,6 @@ function isTextInput(textFieldID: number) {

module.exports = {
currentlyFocusedField,
setFocusedTextInput, // TODO(android ISS)
clearFocusedTextInput, // TODO(android ISS)
focusTextInput,
blurTextInput,
registerInput,
Expand Down
1 change: 0 additions & 1 deletion React/CxxBridge/RCTCxxBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ - (void)_initializeBridgeLocked:(std::shared_ptr<JSExecutorFactory>)executorFact
// This is async, but any calls into JS are blocked by the m_syncReady CV in Instance
_reactInstance->initializeBridge(
std::make_unique<RCTInstanceCallback>(self),
nullptr, // use default executor delegate // TODO(OSS Candidate ISS#2710739)
executorFactory,
_jsMessageThread,
[self _buildModuleRegistryUnlocked]);
Expand Down
13 changes: 0 additions & 13 deletions ReactAndroid/NuGet.Config

This file was deleted.

Loading