Skip to content
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

Fix canvas padding controls going out of sync on undo #4336

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Oct 6, 2023

Fixes #4337

Problem:

Adjusting the padding of an element via the canvas control, and then following up with an undo makes the control size to lose sync with the actual value.

Untitled.mov

Fix:

Instead of relying on the useBoundingBox hook, perform the placement calculations inside the controls, without any perf penalty.

Screen.Recording.2023-10-06.at.3.25.33.PM.mov

Notes:

  • The diff seems large, but it's mainly just a whitespace diff due to removing a function carry

@ruggi ruggi changed the title don't use bounding box ref Fix padding controls size on undo Oct 6, 2023
@ruggi ruggi changed the title Fix padding controls size on undo Fix canvas padding controls size on undo Oct 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Try me

@relativeci
Copy link

relativeci bot commented Oct 6, 2023

Job #8482: Bundle Size — 62.83MiB (~+0.01%).

f86f44a(current) vs 5957b21 master#8478(baseline)

Warning

Bundle contains 64 duplicate packages - View duplicate packages

Bundle metrics (2 changes)
                 Current
Job #8482
     Baseline
Job #8478
Initial JS 35.09MiB(~+0.01%) 35.09MiB
Initial CSS 0B 0B
Cache Invalidation 19.39% 19.4%
Chunks 27 27
Assets 31 31
Modules 3974 3974
Duplicate Modules 425 425
Duplicate Code 30.92% 30.92%
Packages 409 409
Duplicate Packages 64 64
Bundle size by type (1 change)
                 Current
Job #8482
     Baseline
Job #8478
CSS 0B 0B
Fonts 0B 0B
HTML 11.43KiB 11.43KiB
IMG 0B 0B
JS 62.82MiB (~+0.01%) 62.81MiB
Media 0B 0B
Other 0B 0B

View job #8482 reportView fix/padding-canvas-undo branch activity

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Performance test results:
(Chart1)
(Chart2)

@ruggi ruggi changed the title Fix canvas padding controls size on undo Fix canvas padding controls going out of sync on undo Oct 6, 2023
@ruggi ruggi marked this pull request as ready for review October 6, 2023 13:29
@ruggi ruggi merged commit 7ebe63a into master Oct 6, 2023
14 checks passed
@ruggi ruggi deleted the fix/padding-canvas-undo branch October 6, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix padding control going out of sync on undo
4 participants