-
Notifications
You must be signed in to change notification settings - Fork 14
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
Break ViewStyle into LayoutStyle and NodeStyle #974
Conversation
7d58d94
to
a45e299
Compare
Snapshot diff report vs base branch: main |
a45e299
to
3d0cc13
Compare
designcompose/src/main/java/com/android/designcompose/squoosh/SquooshAnimate.kt
Show resolved
Hide resolved
Looks like a good clean up, and helps moving the layout communication to protobuf by making the layout style explicit. I'm going to be offline for the rest of today and for tomorrow, so if it's possible, it would be nice to land #972 first. I realized in working on some other animation bugs that I need to make a large change to SquooshAnimate -- currently it works by mutating the two trees (view tree with all animations at start state, view tree with all animations at end state) into a single tree that can be morphed between the start and end states (with different "controls" for different animations). This is flawed because both of the incoming trees are destroyed to make the morphable tree, and the morphable tree can't be laid out anymore. It would be better to simply make the view trees immutable after creating them, and then have SquooshAnimate construct a third tree from the two input trees -- perhaps the third tree has backlinks to the before/after trees, so that those trees can have new layout passes done, and the morphable tree can simply read the new layout values? Anyway, all of that is to say, I haven't started on serious deeper animation changes yet, but there will be a bigger refactor coming to SquooshAnimate, too. |
…truct Split up the ViewStyle struct into LayoutStyle and NodeStyle. LayoutStyle has all fields necessary for performing layout. NodeStyle has everything else. This change is to prepare for the switch from serde to protobufs.
3d0cc13
to
e1d91ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty straightforward, all checks pass, no screenshot changes so I think it's good to go
Will do.
…On Wed, Apr 10, 2024 at 4:10 PM Robert Lin ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In crates/figma_import/src/toolkit_style.rs
<#974 (comment)>
:
> @@ -549,8 +662,6 @@ pub struct ViewStyle {
pub blend_mode: BlendMode,
pub display_type: Display,
@timothyfroehlich <https://github.com/timothyfroehlich> can you delete
display_type in your protobuf changes? I would make that small change
now, but it would mean having to regenerate all of the serialized files
again. That is still a bit tedious as I have to do helloworld, tutorial,
and then all of the figma files that we have tests for manually, before
running ./gradlew fetchAndUpdateFigmaFiles. It would be great to have
that command or something similar update everything automatically.
—
Reply to this email directly, view it on GitHub
<#974 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMM2SUFJ2XMM4S5LKAX72TY4WTFFAVCNFSM6AAAAABF7NGYVGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSOJSGY4DCNJVGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Tim Froehlich
Test Engineer for DesignCompose and AAOS
Located in Austin TX, US Central Time
balance/froeht
|
Split up the ViewStyle struct into LayoutStyle and NodeStyle. LayoutStyle has all fields necessary for performing layout. NodeStyle has everything else. This change is to prepare for the switch from serde to protobufs.