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

Fixes issue with on android with TextInput focus inside ScrollView #17892

Closed
wants to merge 467 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
467 commits
Select commit Hold shift + click to select a range
6fc4163
Clean up FabricUIManagerViewHierarchyTest
ayc1 Mar 7, 2018
d52569c
check for GET and Head in send request
samsafay Mar 7, 2018
d7b5b2e
Allow Inspector to handle 2 renderers
fkgozali Mar 7, 2018
c129457
Typing ViewProp, ImageProp
elicwhite Mar 7, 2018
321ba06
Type TextStyleProp
elicwhite Mar 7, 2018
135637c
Merging tests for flattenStyle
elicwhite Mar 7, 2018
b58e377
Remove Unused Exports from StyleSheetTypes
elicwhite Mar 7, 2018
ec88489
Fixing bugs in link and unlink
rozele Mar 7, 2018
cade297
iOS Surface: properly reset some internal states when JS reloads
fkgozali Mar 7, 2018
ee26d9b
Make StyleSheet.create type private
elicwhite Mar 7, 2018
49ffc9f
Rename StyleProp to DangerouslyImpreciseStyleProp
elicwhite Mar 7, 2018
a3c07c9
StyleObj -> DangerouslyImpreciseStyleProp
elicwhite Mar 7, 2018
3c23645
Bump metro@0.29.0
rafeca Mar 7, 2018
cf89a2c
Move __StyleProp to StyleSheet
elicwhite Mar 8, 2018
23e0f86
Mark more ObjC methods called from RN as dynamic
tgrlnc Mar 8, 2018
7bf3b20
iOS: create C++ <-> ObjC++ connector for FabricUIManager to do UI ope…
fkgozali Mar 8, 2018
a162dc8
Fix RefreshControl's dependency on AndroidSwipeRefreshLayout
ayc1 Mar 8, 2018
596bcb6
Initialize ReactChoreographer before creating the TimingModule
ayc1 Mar 8, 2018
8cdc7d3
Don't assume the SourceCode native module exists
ayc1 Mar 8, 2018
89757ed
Add eslint-plugin-react-native Yarn package and enable no-inline-styl…
SnowCoderAlex Mar 8, 2018
5f497ca
Convert constant with build flags to function
Mar 8, 2018
d89517d
Remove usage of Internal StyleSheet type
elicwhite Mar 8, 2018
852084a
Remove usage of Styles type
elicwhite Mar 8, 2018
5b32358
Prettier
elicwhite Mar 8, 2018
4895c64
Rename Style to DangerouslyImpreciseStyle
elicwhite Mar 8, 2018
f2ad77f
Update additional license headers
hramos Mar 8, 2018
ecd3d95
Ignore yarn.lock and package-lock.json in oss
hramos Mar 8, 2018
49396aa
Fix typing of View refs
elicwhite Mar 8, 2018
dbdf43b
propTypes are optional for native components
elicwhite Mar 8, 2018
214da52
AccessibilityLabel is optional
elicwhite Mar 8, 2018
34f8e7f
`fabric/debug` module and `DebugStringConvertible` class
fkgozali Mar 9, 2018
3c86701
`fabric/core` module and `Sealable` class
fkgozali Mar 9, 2018
118521c
RN: Prettify Systrace
yungsters Mar 9, 2018
a8c4b63
RN: Delete Systrace for RelayClassic
yungsters Mar 9, 2018
3e141cb
RN: Delete Systrace.swizzleJSON
yungsters Mar 9, 2018
8803ab2
Fix race condition when there're two flags next to each other
alexeylang Mar 9, 2018
20fcf47
Make fetchSegment native hook name consistent with __ prefix
fromcelticpark Mar 9, 2018
a7558d5
Clone ReactShadowNode when Yoga clones a YogaNode during layout
mdvacca Mar 9, 2018
e31781b
Add extra debug information to ReactShadowNodes objects
mdvacca Mar 9, 2018
c883d4e
Add "newProps" map into ReactShadowNode
mdvacca Mar 9, 2018
2520c64
Fixing Assorted View Flow Types
elicwhite Mar 9, 2018
f1316ca
Making values optional in ViewPropTypes
elicwhite Mar 9, 2018
a48b4d5
Add Sonar support to Oculus Twilight Android
Mar 9, 2018
25b8ec8
Adding FlowFixMe when switching between Component and Ref
elicwhite Mar 9, 2018
216c8ec
AndroidInfoModule now also returns Android ID
L33tcodex0r Mar 9, 2018
b6b80f6
Type VirtualizedList's ref
elicwhite Mar 9, 2018
3e9a371
Mock ReactNative.NativeComponent native methods in jest
elicwhite Mar 9, 2018
c9d7562
Clear cache to resolve iOS, tvOS workflow
hramos Mar 9, 2018
5035af8
Tightening types for View and VirtualizedList
elicwhite Mar 9, 2018
274d6ce
Bump metro@0.30.0
rafeca Mar 10, 2018
1ff1e57
Add existing Android checks to Circle.
hramos Mar 10, 2018
26734a8
Migrating View to be a Flow Typed ES6 class
elicwhite Mar 10, 2018
adabae2
Upgrade to Flow v0.67
nmote Mar 10, 2018
e057322
Fix Android Sanity Buck version check
hramos Mar 11, 2018
cd8128b
Move Text PropTypes to it's own file
elicwhite Mar 11, 2018
3fd82d3
Fixing misuses of the Text type
elicwhite Mar 11, 2018
01fffa2
RN: Remove DebugEnvironment from OSS
yungsters Mar 11, 2018
450e562
export CompositeAnimation type
zjj010104 Mar 11, 2018
19dd9a2
Use -fdata-sections in mode/opt
amirlivneh Mar 12, 2018
84affbd
Loosen Platform check to allow better code sharing for out-of-tree pl…
Mar 12, 2018
3002c4e
Fix tvOS react-native init release build (#18288)
douglowder Mar 12, 2018
9c8c597
Don't truncate in the middle of an emoji
Vince0613 Mar 12, 2018
1dde989
Add support for springDamping in SpringInterpolator
axe-fb Mar 12, 2018
0459e4f
Support Image resizeMode=repeat on Android
motiz88 Mar 12, 2018
ab92c00
Convert Text to ES6 Class
elicwhite Mar 13, 2018
7a1c618
Change newly imported file to MIT license
hramos Mar 13, 2018
aa323d4
Use MIT license
hramos Mar 13, 2018
c136c54
Refactor RCTInputAccessoryView view hierarchy and names
Mar 13, 2018
ca898f4
Add docs for Swift usage to RCTBridgeModule.h
ejmartin504 Mar 13, 2018
41acb0a
Fix clang-6 compile error (virtual destructor)
Mar 13, 2018
9737774
Fix crash in Sapienz bot for Interpolator type
axe-fb Mar 14, 2018
db061ea
Don't wrap ListEmptyComponent in an extra view
janicduplessis Mar 14, 2018
8466db0
Revert #17927
Mar 14, 2018
af4a363
Remove the usage of YGUndefined in the default values of Border in YG…
priteshrnandgaonkar Mar 14, 2018
9f7e703
Changed the return type of YGResolveValue
priteshrnandgaonkar Mar 14, 2018
5b3d595
Change the type of flex to YGFloatOptional
priteshrnandgaonkar Mar 14, 2018
3274e9f
Change the type of flexGrow to YGFloatOptional
priteshrnandgaonkar Mar 14, 2018
e3af150
Change the type of flexShrink to YGFloatOptional
priteshrnandgaonkar Mar 14, 2018
f3ef8f8
Remove the use of YGUndefined for flex-basis
priteshrnandgaonkar Mar 14, 2018
321b107
Expose layout diffing flag to java
priteshrnandgaonkar Mar 14, 2018
a01ae8b
Bump metro@0.30.1
rafeca Mar 14, 2018
4f8328b
React sync for revisions ab4280b...ad9544f
hramos Mar 14, 2018
bec97dc
Expose native show message method in header
Mar 14, 2018
3a2bdf5
Move Fabric JSC bindings to oss
ayc1 Mar 14, 2018
7ce943e
Adds _lineHeight = NAN; to RCTTextAttributes
aparedes Mar 14, 2018
6765699
Move Image PropTypes to a new file
elicwhite Mar 14, 2018
8bac869
Create Flow Props for Image
elicwhite Mar 14, 2018
28c9c68
Adding documentation to new StyleSheet Flow Types
elicwhite Mar 14, 2018
c595509
Add number-pad keyboardType
khaeransori Mar 14, 2018
304db5c
Add MIT license to Fabric
ayc1 Mar 14, 2018
d678058
Add Fabric integration test
ayc1 Mar 14, 2018
22004db
React sync for revisions ad9544f...ced176e
Mar 15, 2018
6b1dc71
Refactor resolvePlugins out to prepare for babel 7
Mar 15, 2018
040642d
Fix setter and getter of margin, position, border and padding
priteshrnandgaonkar Mar 15, 2018
da2d410
Fix getters and setters if min and max Dimension
priteshrnandgaonkar Mar 15, 2018
c989ea8
Extract NativeExtensionsProvider definition
Mar 15, 2018
8e85bf8
Gatekeeper for Native Extensions
Mar 15, 2018
139d554
Replace js Dimensions with shadow view in InputAccessoryViewExample
Mar 15, 2018
ce92b85
Fixed a typo and added a test case
priteshrnandgaonkar Mar 15, 2018
9102ff9
Moved YGFloatOptional from C struct to C++ struct
priteshrnandgaonkar Mar 15, 2018
f376fe3
Remove @xplat cell syntax in open source
hramos Mar 15, 2018
b02b167
Bump metro@0.30.2
rafeca Mar 16, 2018
dbd4759
Local cli/android/normalize project name
Titozzz Mar 16, 2018
076b1ce
Prevent show a hidden status bar when opening modals, fix #7474
t4deu Mar 16, 2018
6f6084d
Explicitly set path to yarn
hramos Mar 16, 2018
6426735
Simplify templates
hramos Mar 16, 2018
353c070
Add a way to dismiss PopupMenu elements
miguelsm Mar 16, 2018
c2fd54f
Enable obfuscation in ProGuard rules by default
fractalwrench Mar 17, 2018
6f588b3
Fix Android job
hramos Mar 17, 2018
541485c
Add inverted prop in SectionListExample
kyo504 Mar 18, 2018
1c53471
iOS OSS: fixed RNTester - missing RCTInputAccessoryShadowView.* in .x…
fkgozali Mar 18, 2018
d16772a
Sealable: fixed semantic; atomic type for the flag variable
shergin Mar 19, 2018
c623455
Abstract classes for ShadowNode and Props
shergin Mar 19, 2018
608d1fb
`fabric/graphics` module: all about graphics
shergin Mar 19, 2018
840638c
Introducing `ComponentDescriptor`
shergin Mar 19, 2018
811d5bf
Introducing LayoutableShadowNode
shergin Mar 19, 2018
6b0960c
Introducing `ConcreteShadowNode`
shergin Mar 19, 2018
965e60b
`fabric/view` module
shergin Mar 19, 2018
c2ad59a
`fabric/uimanager` module
shergin Mar 19, 2018
4cda0df
Switching to the new FabricUIManager and all new shadow tree infra
shergin Mar 19, 2018
378da73
DebugStringConvertibleOptions: Formating
shergin Mar 19, 2018
263d04d
Added nestedScrollEnabled prop to scroll view for android
tuncaulubilge Mar 19, 2018
f42b589
iOS C++: Add ICxxExceptionManager to access RCTExceptionsManager nati…
fkgozali Mar 19, 2018
53a0470
iOS JSC: Use ICxxExceptionManager to report exception
fkgozali Mar 19, 2018
def789c
Wrong height when TextInput has an empty string
reyalpsirc Mar 19, 2018
c732429
Make access to SourceCode Native Extension lazy
Mar 19, 2018
15bc6d1
Added console warning to InputAccessoryView
Mar 19, 2018
12c208c
Create a new instrumentation test that does not enforce rendering a s…
ayc1 Mar 19, 2018
9d45de6
Properly tear down the reachabilityRef in RCTNetInfo
Mar 19, 2018
41db09d
Remove @xplat cell syntax in open source, part 2
hramos Mar 19, 2018
ff70ecf
Fixed <TextInput> bug with autocapitalization
Mar 19, 2018
12535ae
Fix clang-6 strictness surrounding virtual destructors
Mar 19, 2018
75a7359
RCTObjcExecutor: fix initializer-list initialization order build warn…
fbartho Mar 19, 2018
aaaa946
Fabric: Equality operators for geometry types
shergin Mar 19, 2018
a5a3456
Fabric: Proper return value of `LayoutableShadowNode::setLayoutMetric…
shergin Mar 19, 2018
ff288b7
Fabric: Complete implementation of `layoutMetricsFromYogaNode`
shergin Mar 19, 2018
39383d1
Fabric: Improved YogaLayoutableShadowNode printing
shergin Mar 19, 2018
b808bfd
Fabric: Introducting `ShadowNode.sourceNode`, the node used in copy-c…
shergin Mar 19, 2018
e2462e9
iOS: set the default measure size correctly for RCTSurfaceHostingView
fkgozali Mar 20, 2018
0930fef
Disable YogaNode cloning in Android
mdvacca Mar 20, 2018
b43afcd
Change cloning mechanism for mutableCopyWithNewChildren method
mdvacca Mar 20, 2018
3f84a0a
Extend ReactShadowNode in order to have a reference to the ReactShado…
mdvacca Mar 20, 2018
7d3de10
Implement Fabric Reconciler
mdvacca Mar 20, 2018
cc3d45d
Add logging to debug Fabric diffing algorithm
mdvacca Mar 20, 2018
5347ecf
Fix removal of ReactShadowNode
mdvacca Mar 20, 2018
0d924dd
Upgrade to Flow v0.68.0
samwgoldman Mar 20, 2018
785c8f7
Use native as the source of truth to decide if a test should use Fabric
ayc1 Mar 20, 2018
c49afb1
Add debug logs to FabricUIManager
ayc1 Mar 20, 2018
f136ae1
Add test for FabricText
ayc1 Mar 20, 2018
af42829
Fix TextRenderingTestCase
ayc1 Mar 20, 2018
aabd5d1
Use map instead of array
cwdick Mar 20, 2018
fa7c322
Depend on local version of babel-plugin-react-transform
Mar 20, 2018
f6bcd73
feat: Remove platform check in requireNativeComponent to support addi…
jhampton Mar 20, 2018
ad6938c
Revert D7319513: Depend on local version of babel-plugin-react-transform
Mar 20, 2018
6f339b6
Deprecate postProcessModules config param
rafeca Mar 20, 2018
15f0a7b
Add getRunModuleStatement config param to configure the require() sta…
rafeca Mar 20, 2018
ddfcaf9
Drop fb{android|objc} prefixed keys for oss builds
Mar 20, 2018
ea92f47
While linking plugin ask for params only once
Mar 20, 2018
38fe8c2
moved ReactFabricInternals outside of shims
fkgozali Mar 20, 2018
3b36a6b
React sync for revisions ced176e...9d484ed
hramos Mar 21, 2018
f68e041
Move TypeForStyleKey from StyleSheetTypes to StyleSheet
elicwhite Mar 21, 2018
a0388f4
Move ViewStyle, TextStyle, ImageStyle from StyleSheetTypes to StyleSheet
elicwhite Mar 21, 2018
a3f1ca8
Bump metro@0.31.0
rafeca Mar 21, 2018
657c1a4
Add more debug logs to FabricReconciler
ayc1 Mar 21, 2018
b961ac3
Depend on local version of babel-plugin-react-transform
Mar 21, 2018
0594a10
Removed unnecessary `intrinsicContentSize` implementation from `RCTSu…
shergin Mar 21, 2018
909861f
Fixed race condition in RCTUIManager's mounting process
shergin Mar 21, 2018
c194c18
Fixed performance regression in `ShadowView`s layout process
shergin Mar 21, 2018
d50cefb
Moving remaining Style types from StyleSheetTypes to StyleSheet
elicwhite Mar 21, 2018
cf036db
Updates Yoga to handle being in a Xcode framework project
orta Mar 21, 2018
c0d27de
Fix removal of virtual nodes in FabricReconciler
ayc1 Mar 21, 2018
0b085a8
Pass-by-reference in YGNode::setStyle() ::setChildren() ::setLayout()
Mar 21, 2018
ed0ba1b
Pass some constructor argumetns by const-reference
Mar 21, 2018
cb3103c
Mark more member functions as const
Mar 21, 2018
f015900
fixed debug string formatting for structure
fkgozali Mar 21, 2018
6ae38fe
Added sample iOS unit test setup for fabric/debug target
fkgozali Mar 21, 2018
96daf67
Fix OSS Android test failure
Mar 22, 2018
47910f0
Set measure function after YogaNode has been copied
ayc1 Mar 22, 2018
8e065ba
Update fresco to v1.8.1
AndrewJack Mar 22, 2018
ff1444e
Add fresco proguard rules
AndrewJack Mar 22, 2018
10c95a2
fixed contacts for the test target
fkgozali Mar 22, 2018
15fa225
fix ReadableNativeMap.toHashMap() for nested maps and arrays
esamelson Mar 22, 2018
cf642c9
Mark global variable as extern "C"
smeenai Mar 22, 2018
0376baf
Revert D7343566: [RN] Fixed race condition in RCTUIManager's mounting…
shergin Mar 23, 2018
046d4ce
Assert root node isn't null in createView
ayc1 Mar 23, 2018
cbb7c7c
Pass fabric flag from native to JS
ayc1 Mar 23, 2018
dd479a9
Pass invertStickyHeaders to ScrollView
dannycochran Mar 23, 2018
8c0070c
iOS: added fabric/core primitives tests
fkgozali Mar 23, 2018
e254474
iOS: added fabric/core ShadowNode tests
fkgozali Mar 23, 2018
408a5f2
iOS: added fabric/core ComponentDescriptor tests
fkgozali Mar 23, 2018
1acef45
iOS: added placeholder test setup for fabric graphics/uimanager/view …
fkgozali Mar 24, 2018
228f5c8
use correct delegate queue in RCTRSWebSocket
jhgg Mar 25, 2018
2cc75f7
Add YGNodeSetChildren(), YGNodeTraversePreOrder()
Mar 25, 2018
8b9b3f6
Correct AnimatedValueXY URL
gusgard Mar 26, 2018
85e33aa
Prevents android crash due to unsupported ellipsize mode
t4deu Mar 26, 2018
226bff3
Android: include error types in getCurrentPosition error
dulmandakh Mar 26, 2018
ca20fcd
Use afterEvaluate to make gradle bundle task work with configureondemand
janicduplessis Mar 26, 2018
53782ea
Fabric: Source shadow node is now stored as a weak pointer
shergin Mar 26, 2018
1bb6db3
Fabric: Removed unused copy constructor YogaLayoutableShadowNode()
shergin Mar 26, 2018
8f9212b
Fabric: Fixed lost YogaNode's context in YogaLayoutableShadowNode
shergin Mar 26, 2018
ee0cc6b
Fabric: Implementing cloneAndReplaceChild() for ViewShadowNode
shergin Mar 26, 2018
5642514
Fabric: Detailed looging in FabricUIManager
shergin Mar 26, 2018
53dfbcc
Fabric: Fixed bug in node management in FabricUIManager
shergin Mar 26, 2018
6f17e3b
Fabric: Introducing `TreeMutationInstruction`
shergin Mar 26, 2018
cb7a7f3
Fabric: Deleted virtual default destructor from Props
shergin Mar 26, 2018
99e9c6e
Fabric: Collecting and printing ShadowNode's revision/generation
shergin Mar 26, 2018
2ff8b70
Replace android_library with fb_android_library.
ttsugriy Mar 26, 2018
de1040f
Cache apt dependencies in test_android
hramos Mar 27, 2018
f5207ba
Fix blob response parsing for empty body on iOS
janicduplessis Mar 27, 2018
0150a0c
Add nativeLoggingHook to JSIExecutor
Mar 27, 2018
45abbf3
Support multiple Fabric ReactRootView running at the same time
mdvacca Mar 27, 2018
56971bb
RN: Fix rounded Image Background (Android)
himabindugadupudi Mar 27, 2018
2ebd55f
Upgrade Jest to 23.0.0-alpha.4
Mar 27, 2018
15b25d8
Cache C++ downloads
hramos Mar 27, 2018
e3941a1
Native Animated - Support border radius
janicduplessis Mar 27, 2018
979c01e
Build yoga in OSS
hramos Mar 27, 2018
f96d7ae
Bridged FBPullToRefresh to JS
Mar 28, 2018
fd4bc72
Add custom RefreshControl support to VirtualizedList
Mar 28, 2018
9c80506
Refactor RootShadowNodeRegistry to make it ThreadSafe
mdvacca Mar 28, 2018
bd134ce
Increase timeouts to 15, 10
Mar 28, 2018
88ba7eb
Fix "function statements" in strict mode builds
Mar 28, 2018
7cbb222
Remove class-loading experiment for View Managers.
Mar 28, 2018
b531612
Collect unit test results in test_android job
hramos Mar 28, 2018
e88f128
Refactor ReactShadowNode.SetRootNode() -> ReactShadowNode.setRootTag()
mdvacca Mar 29, 2018
ff2260b
Add `JByteBuffer::rewind()`
davidaurelio Mar 29, 2018
f3ef227
Upgrade to Flow v0.69.0
gabelevi Mar 29, 2018
24b5721
Fix `ByteBuffer.h`
davidaurelio Mar 29, 2018
6be7b39
Update okio
davidaurelio Mar 29, 2018
9bdc310
Update Android Docker images
hramos Mar 29, 2018
ee0c69d
Keep nativeIDs immutable in ReactFindViewUtil
axe-fb Mar 29, 2018
1020ac9
OSS: add gradle wrapper helper to prepare offline gradle caches
fkgozali Mar 30, 2018
550339c
Add `JReadableByteChannel`
davidaurelio Mar 30, 2018
1f27098
Fabric: Proper Yoga node dirting in YogaLayoutableShadowNode
shergin Mar 30, 2018
4906f8d
Add an implementation of Animated.subtract
avendiart Mar 31, 2018
d58ba82
Avoid app crashing when a StackOverflowError is thrown when rendering…
mdvacca Apr 1, 2018
aff5a75
Refactor cloning of YogaNode
mdvacca Apr 2, 2018
29ff30c
Rename YogaNode.parent -> YogaNode.owner
mdvacca Apr 2, 2018
5be4ff0
Extend Yoga to be able clone Yoga Node with new children
mdvacca Apr 2, 2018
8a99241
Re-enable Yoga cloning in React Shadow Node
mdvacca Apr 2, 2018
d4fb87b
Add iOS 10 textContentType for TextInput
cbrevik Apr 2, 2018
201e74f
Fix tvOS build breakage in RCTAnimation Xcode project
douglowder Apr 3, 2018
976712a
Replace RN exception handling override with new version
pakoito Apr 3, 2018
e5a4d59
Remove the usage of YGUndefined for kYGValueAuto and fix setter and g…
priteshrnandgaonkar Apr 3, 2018
bcd12f1
Change the type of aspect Ratio to YGFloatOptional
priteshrnandgaonkar Apr 3, 2018
63c073d
Move equaltiy function from utils to an operator on YGFloatOptional
priteshrnandgaonkar Apr 3, 2018
f84f4fd
Changed the return type of YGResolveValueMargin to YGFloatOptional
priteshrnandgaonkar Apr 3, 2018
7469458
fix(RCTImageLoader): Adds `requiresMainQueueSetup` to fix v0.52
iRoachie Apr 3, 2018
cdfc346
Fix wrong root path in RNTester gradle config
sunnylqm Apr 4, 2018
591fab1
Update ScrollView.js
mistenkt Feb 7, 2018
7e90226
Merge branch 'master' of github.com:mistenkt/react-native
mistenkt Apr 4, 2018
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
Prev Previous commit
Next Next commit
iOS: create C++ <-> ObjC++ connector for FabricUIManager to do UI ope…
…rations

Reviewed By: shergin

Differential Revision: D7162911

fbshipit-source-id: 3e303020dafdccc51f52c3359a7054dc8a787978
  • Loading branch information
fkgozali authored and facebook-github-bot committed Mar 8, 2018
commit 7bf3b20837726ff43c2d7ed8a0d5012f3a1e1e7a
46 changes: 46 additions & 0 deletions React/Fabric/RCTFabricPlatformUIOperationManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import <memory>

#include <fabric/IFabricPlatformUIOperationManager.h>

@class RCTFabricPlatformUIOperationManager;

namespace facebook {
namespace react {

/**
* Connector class (from C++ to ObjC++) to allow FabricUIManager to invoke native UI operations/updates.
* UIKit-related impl doesn't live here, but this class gets passed to the FabricUIManager C++ impl directly.
*/
class RCTFabricPlatformUIOperationManagerConnector : public IFabricPlatformUIOperationManager {
public:
RCTFabricPlatformUIOperationManagerConnector();
~RCTFabricPlatformUIOperationManagerConnector();

void performUIOperation();

private:
void *self_;
RCTFabricPlatformUIOperationManager *manager_;
};

} // namespace react
} // namespace facebook

/**
* Actual ObjC++ implementation of the UI operations.
*/
@interface RCTFabricPlatformUIOperationManager : NSObject

- (void)performUIOperation;

@end
48 changes: 48 additions & 0 deletions React/Fabric/RCTFabricPlatformUIOperationManager.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import "RCTFabricPlatformUIOperationManager.h"

namespace facebook {
namespace react {

RCTFabricPlatformUIOperationManagerConnector::RCTFabricPlatformUIOperationManagerConnector() {
self_ = (__bridge_retained void *)[RCTFabricPlatformUIOperationManager new];
manager_ = (__bridge RCTFabricPlatformUIOperationManager *)self_;
}

RCTFabricPlatformUIOperationManagerConnector::~RCTFabricPlatformUIOperationManagerConnector() {
CFRelease(self_);
self_ = NULL;
manager_ = NULL;
}

void RCTFabricPlatformUIOperationManagerConnector::performUIOperation() {
[manager_ performUIOperation];
}

} // namespace react
} // namespace facebook

// -----------------------------------------------------------------------------
// Start of ObjC++ impl
// Access UIKit here.
// -----------------------------------------------------------------------------
@implementation RCTFabricPlatformUIOperationManager

- (void)dealloc
{
NSLog(@"RCTFabricPlatformUIOperationManager: dealloc()");
}

- (void)performUIOperation
{
// TODO
NSLog(@"RCTFabricPlatformUIOperationManager: performUIOperation()");
}

@end
5 changes: 2 additions & 3 deletions React/Fabric/RCTFabricUIManagerWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ namespace react {

class FabricUIManager;

}
}
} // namespace react
} // namespace facebook

using namespace facebook::react;

Expand All @@ -28,7 +28,6 @@ using namespace facebook::react;
*/
@interface RCTFabricUIManagerWrapper : NSObject <RCTInvalidating>

- (instancetype)initWithManager:(std::shared_ptr<FabricUIManager>)manager;
- (std::shared_ptr<FabricUIManager>)manager;

@end
Expand Down
8 changes: 6 additions & 2 deletions React/Fabric/RCTFabricUIManagerWrapper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,21 @@

#include <fabric/FabricUIManager.h>

#import "RCTFabricPlatformUIOperationManager.h"

// This file contains experimental placeholders, nothing is finalized.
@implementation RCTFabricUIManagerWrapper
{
std::shared_ptr<FabricUIManager> _manager;
std::shared_ptr<IFabricPlatformUIOperationManager> _platformUIOperationManager;
}

- (instancetype)initWithManager:(std::shared_ptr<FabricUIManager>)manager
- (instancetype)init
{
self = [super init];
if (self) {
_manager = manager;
_platformUIOperationManager = std::make_shared<RCTFabricPlatformUIOperationManagerConnector>();
_manager = std::make_shared<FabricUIManager>(_platformUIOperationManager);
}
return self;
}
Expand Down
16 changes: 13 additions & 3 deletions ReactCommon/fabric/FabricUIManager.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
// Copyright 2004-present Facebook. All Rights Reserved.
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#include "FabricUIManager.h"

#include "IFabricPlatformUIOperationManager.h"
#include "ShadowNode.h"

namespace facebook {
namespace react {

FabricUIManager::FabricUIManager() {}
FabricUIManager::FabricUIManager(const std::shared_ptr<IFabricPlatformUIOperationManager> &platformUIOperationManager) :
platformUIOperationManager_(platformUIOperationManager) {};

ShadowNodeRef FabricUIManager::createNode(int reactTag, std::string viewName, int rootTag, folly::dynamic props, void *instanceHandle) {
platformUIOperationManager_->performUIOperation();
return std::make_shared<ShadowNode>(reactTag, viewName, rootTag, props, instanceHandle);
}

Expand Down Expand Up @@ -41,4 +50,5 @@ void FabricUIManager::appendChildToSet(const ShadowNodeSetRef &childSet, const S
void FabricUIManager::completeRoot(int rootTag, const ShadowNodeSetRef &childSet) {
}

}}
} // namespace react
} // namespace facebook
17 changes: 13 additions & 4 deletions ReactCommon/fabric/FabricUIManager.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Copyright 2004-present Facebook. All Rights Reserved.
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

Expand All @@ -10,14 +15,15 @@ namespace facebook {
namespace react {

class ShadowNode;
class IFabricPlatformUIOperationManager;

typedef std::shared_ptr<const ShadowNode> ShadowNodeRef;
typedef folly::fbvector<const ShadowNodeRef> ShadowNodeSet;
typedef std::shared_ptr<const ShadowNodeSet> ShadowNodeSetRef;

class FabricUIManager {
public:
FabricUIManager();
FabricUIManager(const std::shared_ptr<IFabricPlatformUIOperationManager> &platformUIOperationManager);

ShadowNodeRef createNode(int reactTag, std::string viewName, int rootTag, folly::dynamic props, void *instanceHandle);
ShadowNodeRef cloneNode(const ShadowNodeRef &node);
Expand All @@ -28,7 +34,10 @@ class FabricUIManager {
ShadowNodeSetRef createChildSet(int rootTag);
void appendChildToSet(const ShadowNodeSetRef &childSet, const ShadowNodeRef &childNode);
void completeRoot(int rootTag, const ShadowNodeSetRef &childSet);
};

}}
private:
std::shared_ptr<IFabricPlatformUIOperationManager> platformUIOperationManager_;
};

} // namespace react
} // namespace facebook
23 changes: 23 additions & 0 deletions ReactCommon/fabric/IFabricPlatformUIOperationManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

namespace facebook {
namespace react {

/**
* An interface for FabricUIManager to perform platform-specific UI operations, like updating native UIView's in iOS.
*/
class IFabricPlatformUIOperationManager {
public:
// TODO: add meaningful methods
virtual void performUIOperation() = 0;
};

} // namespace react
} // namespace facebook
7 changes: 6 additions & 1 deletion ReactCommon/fabric/ShadowNode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Copyright 2004-present Facebook. All Rights Reserved.
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#include "ShadowNode.h"

Expand Down
7 changes: 6 additions & 1 deletion ReactCommon/fabric/ShadowNode.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Copyright 2004-present Facebook. All Rights Reserved.
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#pragma once

Expand Down