Commit Graph

7 Commits

Author SHA1 Message Date
Valentin Shergin 9570d7d490 Fabric: Unifying usage of `auto`s
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
2018-09-10 16:50:02 -07:00
Valentin Shergin 97bc0c03ba Fabric: `fromDynamic` for float numbers was moved to `core` module
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
2018-06-26 11:48:12 -07:00
Valentin Shergin d92601be05 Fabric: Improved parsing EdgeInsets and CornerInsets styles
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
2018-06-17 21:46:22 -07:00
Valentin Shergin e311fbb797 Fabric: CornerInsets: Graphical primitive for rect-corner-specific values
Summary: CornerInsets is something like EdgeInsets but about corners instead of edges.

Reviewed By: fkgozali

Differential Revision: D8344062

fbshipit-source-id: 9bf7a8696fba96e3124cb15e8e84093c1f4f8747
2018-06-15 11:47:39 -07:00
Valentin Shergin f180300606 Fabric: Support for object notation in dynamic-to-Point/Size/Edges converstions
Summary: Trivial.

Reviewed By: fkgozali

Differential Revision: D8086650

fbshipit-source-id: 0850c799811f7cda2dd6786aada6222dcc28a3e4
2018-05-21 20:03:59 -07:00
Valentin Shergin 30d08ea8a4 Fabric: `EdgeInsets` from `dynamic` conversion
Summary: We will need this for several components, first of all for ScrollView.

Reviewed By: fkgozali

Differential Revision: D7958246

fbshipit-source-id: 364b939abe8f0734376448149bbdc735abd00189
2018-05-15 23:58:59 -07:00
Valentin Shergin 9f85873c9f Fabric: New props treatment in `graphics` module
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
2018-05-14 16:03:49 -07:00