Commit Graph

15 Commits

Author SHA1 Message Date
Semen Zhydenko 8ffc16c6e7 Typos in code
Summary:
To fix typos

No testing required, changed only internal things names

No

addtionalStyles -> additionalStyles
occured -> occurred
recomendedType -> recommendedType
markDirtyAndPropogate -> markDirtyAndPropagate
targetting -> targeting
RCTApplyTranformationAccordingLayoutDirection -> RCTApplyTransformationAccordingLayoutDirection (tranform -> transform)
Closes https://github.com/facebook/react-native/pull/17587

Differential Revision: D6832696

Pulled By: shergin

fbshipit-source-id: 452287e5ce82df5c6b87126cb21889b7bd9d73c1
2018-01-29 19:17:33 -08:00
Valentin Shergin 193a2bd4cd Tweaking -[RCTSurface synchronouslyWaitForStage:]
Summary: Waiting for layout is now available on main thread.

Reviewed By: mmmulani

Differential Revision: D6719836

fbshipit-source-id: ef655095e999df5f77e69c5931459cce1aaeb1f0
2018-01-16 12:32:13 -08:00
Valentin Shergin 06ebaf2205 Missing moving pieces of RCTSurfaceHostingView
Summary: Now it actually works.

Reviewed By: mmmulani

Differential Revision: D6701105

fbshipit-source-id: 16f3f4e319f874f9a08867b784d13aad4fa22aeb
2018-01-11 18:57:31 -08:00
Valentin Shergin c3139d798a Fixed crash happenned on deallocating RCTSurface
Summary:
Essentially, we had `dispatch_async` inside `delloc` method which tried to retain `self`, which is disallowed operation in ObjC runtime.
However, we don't need to notify anything `surface`-related in `_stop` because it always is called from `dealloc`.

Reviewed By: mmmulani

Differential Revision: D6665631

fbshipit-source-id: ed0d192946f3323f4f54ecb99b30e56e0942f174
2018-01-07 22:22:45 -08:00
Valentin Shergin 176a578238 '-[RCTSurfaceRootShadowView sizeThatFitsMinimumSize:]' was removed
Summary: Because we already support this for all kinds of shadow views!

Reviewed By: mmmulani

Differential Revision: D6665636

fbshipit-source-id: ceee7e4952ede4bbe54aedde5545587a1d13ea5a
2018-01-07 18:31:20 -08:00
Valentin Shergin b2a251948f Proper usage CGFLOAT_MAX vs INFINITY inside RCTSurface
Summary: See `RCTShadowView+Layout.m` for more info about differences between CGFLOAT_MAX and INFINITY in Yoga and UIKit.

Reviewed By: mmmulani

Differential Revision: D6665635

fbshipit-source-id: 270ba5366c3dfe78e38474de5380d7d5d251e628
2018-01-07 18:31:20 -08:00
Michael Schneider d3b41e0da3 Set minHeight instead of minWidth for calculating the layout in RCTSurfaceRootShadowView
Summary:
Fix calculating layout in `RCTSurfaceRootShadowView` as the `minWidth` is set doubled in `calculateLayoutWithMinimumSize:maximumSize:`.

cc shergin
Closes https://github.com/facebook/react-native/pull/17203

Differential Revision: D6642437

Pulled By: shergin

fbshipit-source-id: 3483c952c9ecf0132182a156b7b916eb1e975424
2017-12-28 10:40:28 -08:00
Michael Schneider d021dd25da Fix typo in RCTSurfaceHostingView
Summary:
Fix typo in RCTSurfaceHostingView (minumumSize -> minimumSize)
Closes https://github.com/facebook/react-native/pull/17235

Differential Revision: D6585719

Pulled By: hramos

fbshipit-source-id: bfb18015f48bc8ab161945d09125c27d29738ede
2017-12-15 17:32:24 -08:00
Valentin Shergin 4d37cf0fbc RCTSurface: RCTSurfaceHostingView, interop layer beteween UIKit and RCTSurface
Summary: UIView subclass which providers interoperability between UIKit and Surface regarding layout and life-cycle.

Reviewed By: rsnara

Differential Revision: D6465922

fbshipit-source-id: 2a7cfb70119d460bc22968d1aa780833bf47d7f6
2017-12-04 13:48:27 -08:00
Valentin Shergin ba6075120a RCTSurface: Stopping the app on surface object deallocation
Reviewed By: rsnara

Differential Revision: D6431628

fbshipit-source-id: 2b3fd39d77a1108516f00727dd21f648c2bf41b1
2017-12-03 20:16:36 -08:00
Valentin Shergin 43b2509320 RCTSurface: activityIndicatorViewFactory was removed from RCTSurfaceView
Summary: Apparently we don't need this at this level. This will be implemented as part of RCTSufraceHostingView.

Reviewed By: rsnara

Differential Revision: D6367071

fbshipit-source-id: 71a2361b8a0c6594c63602165ce5e054de62630d
2017-12-03 20:16:36 -08:00
Valentin Shergin e9e0cd7ab8 RCTSurface: Couple helper functions for Stage
Summary: We need this trivial funcs to unify spinner appearance logic.

Reviewed By: rsnara

Differential Revision: D6367072

fbshipit-source-id: 70e288bc1fed5911828a5f6deaa829597bf8ebff
2017-12-03 20:16:35 -08:00
Valentin Shergin da17b237e1 RCTSurface: Use async dispatch to register root shadow view
Summary: We don't really need sync dispatch here. We only need sequential execution of our UIManager blocks.

Reviewed By: rsnara

Differential Revision: D6367069

fbshipit-source-id: cc675aafd6c762506048bcf65c24e54080b013a5
2017-12-03 20:16:35 -08:00
Valentin Shergin 081f7d14ad RCTSurface: Fixed problem in stage propagation
Summary: We previously incorrectly communicated to the delegate changed fragment instead of compound value.

Reviewed By: rsnara

Differential Revision: D6367070

fbshipit-source-id: 373a7c14a79a4727a7e8f61178dea3ca16ea1f40
2017-12-03 20:16:35 -08:00
Valentin Shergin 7df58e23a3 Introducing RCTSurface, new experimental thread-safe interop layer
Summary:
RCTSurface instance represents React Native-powered piece of a user interface
which can be a full-screen app, separate modal view controller,
or even small widget. It is called "Surface".

The RCTSurface instance is completely thread-safe by design;
it can be created on any thread, and any its method can be called from
any thread (if the opposite is not mentioned explicitly).
The primary goals of the RCTSurface are:
 - ability to measure and layout the surface in a thread-safe and synchronous manner;
 - ability to create a UIView instance on demand (later);
 - ability to communicate the current stage of the surface granularly.

Differential Revision: D6202576

fbshipit-source-id: 8e644c87fcaad2b6a9c9304b58384d7192747556
2017-11-07 16:16:56 -08:00