Closed timothyfroehlich closed 4 weeks ago
Snapshot diff report vs base branch: main Last updated: Mon Apr 15 14:50:52 PDT 2024, Sha: 8024ec78fa54c9777219c6e85f8609d4f60d628e No differences detected
Not sure why there is both a styles.rs
and types.rs
?
Not sure why there is both a
styles.rs
andtypes.rs
?
Personal preference for smaller files. "Styles" was the best name I could think of for the enums, which is what they correspond to in Taffy. I would have called it layout_styles.rs
but that's too close to layout_style
.
Not sure why there is both a
styles.rs
andtypes.rs
?Personal preference for smaller files. "Styles" was the best name I could think of for the enums, which is what they correspond to in Taffy. I would have called it
layout_styles.rs
but that's too close tolayout_style
.
Sure but what goes in one vs the other? Like I don't get why Dimension
is in one but JustifyContent
is in the other.
Not sure why there is both a
styles.rs
andtypes.rs
?Personal preference for smaller files. "Styles" was the best name I could think of for the enums, which is what they correspond to in Taffy. I would have called it
layout_styles.rs
but that's too close tolayout_style
.Sure but what goes in one vs the other? Like I don't get why
Dimension
is in one butJustifyContent
is in the other.
Because Dimension
is a basic type and gives you positioning and JustifyContent
is just one way you can lay out the content, just like AlignItems
and so on.
It could be a bit more clear to rename types.rs
to geometry.rs
, I suppose.
Gave this a test and seems fine, so I'm good with it.
As a result of this change the
figma_import
crate now depends on thelayout
crate, instead of thelayout
crate depending onfigma_import
.As a result, the
layout
crate now has no dependencies within the workspace.layout
's tests had to be moved tofigma_import
due to the tests heavy reliance onfigma_import
.