Summary: This diff fixes the compilation error: "implicit instantiation of undefined template std::hash" when using TextAttributes in Android
Reviewed By: shergin
Differential Revision: D9849407
fbshipit-source-id: 7fcb94b1d4f7715d8037ecbf302d8f345e99e9fd
Summary: This diff introduces a way to convert TextAttributes object to dynamic objects
Reviewed By: shergin
Differential Revision: D9800636
fbshipit-source-id: 592f1cb60a00d3beaecee221259e8914731049d4
Summary: We will need that to manage collections of attributed strings.
Reviewed By: mdvacca
Differential Revision: D9803351
fbshipit-source-id: 0ea9719f97ed30ff6dfe17b6dbebf448afe228b3
Summary:
The source of truth has already moved, so now we just need to fix references
This diff is mostly the result of running:
```
$ tools/mobile-unification/loadmod --fixup xplat/configurations/buck/apple/flag_defs.bzl tools/build_defs/apple/
```
Then I committed with `hg commit -I xplat/`
The controller you requested could not be found.
Differential Revision: D9772194
fbshipit-source-id: 93d23ae8e1c62440c7876cad965d963bde960db9
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary:
I was watching a classic magnificent talk about modern C++ by Herb Sutter and I was totally sold on double down on using `auto` in our codebase. Surprisingly, 95% of the code base already follows Herb's guidence; I just changed the last 5% to make it consistent.
All those changes must work *exactly* like it was before.
The talk: https://youtu.be/xnqTKD8uD64?t=28m25s
Reviewed By: mdvacca
Differential Revision: D9753301
fbshipit-source-id: 9629aa485a5d6e51806cc96306c297284d4f90b8
Summary:
@public
Empty (nullptr) color should be treated as `Clear` color ({0, 0, 0, 0} - black, fully tranparent), so `colorComponentsFromColor()` was changed to accomodate this (previously it crashed).
Reviewed By: rsnara
Differential Revision: D9631865
fbshipit-source-id: e211f34a89e9f5f86d9fca2789c7163db4feaab1
Summary:
@public
EdgeInsets and CornerInsets are now just qualifications of those generics:
using EdgeInsets = RectangleEdges<Float>;
using CornerInsets = RectangleCorners<Float>;
We will need more concrete types like that in the future diffs.
Reviewed By: mdvacca
Differential Revision: D9614428
fbshipit-source-id: e4d48a11d9083958c3ada68e6368afb150c64f6b
Summary:
@public
Trivial. Those operations are very useful in layout algorithms.
Reviewed By: mdvacca
Differential Revision: D9403566
fbshipit-source-id: e76967aaaac3a36bf6d3e7a468b5ae7769a4dcac
Summary: Unused loads hurt readability and take time to process.
Reviewed By: hramos
Differential Revision: D9494120
fbshipit-source-id: 455b56efadab1cb976344cffcb427772bfda2f71
Summary: This diff fixes the color conversions for Android
Reviewed By: shergin
Differential Revision: D9093561
fbshipit-source-id: a17e61c58be511bd463dc0b21b632dc24066b8b6
Summary:
@public
On Android, a color can be represented as 32 bits integer, so there is no need to instantiate complex color objects and then pass them as shared pointers. Hense instead of using shared_ptr, we use a simple wrapper class which provides a pointer-like interface.
Reviewed By: mdvacca
Differential Revision: D8742014
fbshipit-source-id: 14109b61fd84a34989538a15bc6fe4e2a8ce83a6
Summary:
@public
This compiles but this does not work.
To make it actually work we have to implement all missing functions in `Color.cpp` and co.
Reviewed By: fkgozali
Differential Revision: D8655537
fbshipit-source-id: 564fb7131445af81cf05407239dc6ba870cf6b83
Summary:
@public
Otherwise, it can mess with implementation for `int`s and causes some errors where `float` implementation was requested but `int` was applied.
Reviewed By: mdvacca
Differential Revision: D8601752
fbshipit-source-id: cfe51b7785ff29ee4ad88f0f1cbfed335557d5ef
Summary:
@public
For now we only support trivial uniformed (all sides are equal) border rendering (which can be direclty mapped to CALayer features).
Support of the more complex and fancy borders is comming soon.
Reviewed By: mdvacca
Differential Revision: D8528923
fbshipit-source-id: 0883cdc2b855fc63d399e1a93010f259f0628f48
Summary: In case if it's just a number, it is treated as unified insets now.
Reviewed By: mdvacca
Differential Revision: D8473510
fbshipit-source-id: 1034377bc3e4abe55778c2f182360345419f00d5
Summary: CornerInsets is something like EdgeInsets but about corners instead of edges.
Reviewed By: fkgozali
Differential Revision: D8344062
fbshipit-source-id: 9bf7a8696fba96e3124cb15e8e84093c1f4f8747
Summary: We will need this for several components, first of all for ScrollView.
Reviewed By: fkgozali
Differential Revision: D7958246
fbshipit-source-id: 364b939abe8f0734376448149bbdc735abd00189
Summary: Trivial. We will need them soon at least for ScrollView.
Reviewed By: fkgozali
Differential Revision: D7958244
fbshipit-source-id: ce92c6e6181181ac17d817292af18ffa46a4d975
Summary:
Same as previous one.
Adopting template-generated `convertRawProp` and `debugStringConvertibleItem` functions in `graphics` module.
Note, to do so we have to change signatures of some conversions functions to make them more overloading-friendly.
Reviewed By: fkgozali
Differential Revision: D7958252
fbshipit-source-id: 0f33a2e6aad60befacee31486acdb9b6114d3e07
Summary:
No macros in product code.
(Not all callsites are converted yet.)
Reviewed By: mdvacca
Differential Revision: D7797561
fbshipit-source-id: da899421bf99669a0e0a2b83df6004daf14355c2
Summary:
I was shamed by Sebastian's sebmarkbage concerns (totally unrelated to this topic) about introducing another level of indirection into the system and decided to change my original plan not to support text attributes for the <Paragraph> component.
So, now <Paragraph> shares <View>, <Text> and <Paragraph> itself capabilities. That reduces the minimum amount of required components for trivial text fragment from three (Paragraph, Text, RawText) to two (Paragraph and RawText).
Special thanks for C++ for supporting multiple inheritance.
Reviewed By: mdvacca
Differential Revision: D7785889
fbshipit-source-id: dd9f2e2650bfbfd76d7d4b538adaf409f9429df3
Summary:
YogaLayoutableShadowNode::enableMeasurement() connects Yoga's measuring API and Fabric measuring API.
`enableMeasurement` should be called for leaf Yoga nodes with custom content which should be measured manually during layout.
Reviewed By: mdvacca
Differential Revision: D7738574
fbshipit-source-id: ffe883905c4809290d4d973ad29dc5f0e1ec7573
Summary: Trivial. We have a special data structure for it, why do not use it here?
Reviewed By: mdvacca
Differential Revision: D7738577
fbshipit-source-id: 750aa649b06f17d27906d44df07172a907cde2e5
Summary: Quite trivial. We need this to debug print LayoutMetrics.
Reviewed By: fkgozali
Differential Revision: D7607417
fbshipit-source-id: f4fa52ad04be9757545a8ac627db184f171288e5
Summary: Trivial. Those nits prevent cause compilation errors in some configurations.
Reviewed By: fkgozali
Differential Revision: D7467794
fbshipit-source-id: cbda285748374fd941a0b1ca6718d702ca2d6d82