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

Feat/grid drag initial delta #6037

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Feat/grid drag initial delta #6037

merged 4 commits into from
Jul 3, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Jul 3, 2024

Problem:

When dragging a cell from a non-root cell, very non-ergonomic jumping around happens.

Fix:

When calculating the target movement destination cell, accommodate for the delta between the cell the mouse started the interaction over and the root cell the element occupies.

Since this adds some math to the strategy helper code, I took this occasion for refactoring that part of the spiky code to make it easier to read and to maintain (with comments \0/ !)

Before:

Screen.Recording.2024-07-03.at.15.17.18.mov

After:

Screen.Recording.2024-07-03.at.15.18.49.mov

Copy link
Contributor

github-actions bot commented Jul 3, 2024

Try me

Copy link

relativeci bot commented Jul 3, 2024

#13255 Bundle Size — 62.51MiB (~+0.01%).

aef5e7d(current) vs 6339ece master#13252(baseline)

Warning

Bundle contains 51 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#13255
     Baseline
#13252
Regression  Initial JS 45.56MiB(~+0.01%) 45.56MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.62% 21.59%
No change  Chunks 30 30
No change  Assets 33 33
No change  Modules 4322 4322
No change  Duplicate Modules 524 524
No change  Duplicate Code 31.74% 31.74%
No change  Packages 450 450
No change  Duplicate Packages 51 51
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13255
     Baseline
#13252
Regression  JS 62.5MiB (~+0.01%) 62.49MiB
Improvement  HTML 11.16KiB (-0.33%) 11.2KiB

Bundle analysis reportBranch feat/grid-drag-initial-deltaProject dashboard

@ruggi ruggi merged commit 4eba85d into master Jul 3, 2024
13 checks passed
@ruggi ruggi deleted the feat/grid-drag-initial-delta branch July 3, 2024 14:34
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

When dragging a cell from a non-root cell, very non-ergonomic jumping
around happens.

**Fix:**

When calculating the target movement destination cell, accommodate for
the delta between the cell the mouse started the interaction over and
the root cell the element occupies.

Since this adds some math to the strategy helper code, I took this
occasion for refactoring that part of the spiky code to make it easier
to read and to maintain (with comments \0/ !)

Before:


https://github.com/concrete-utopia/utopia/assets/1081051/daa3d63e-e403-4fe1-9977-7b5d1f172c18

After:


https://github.com/concrete-utopia/utopia/assets/1081051/ca8fd82d-1c92-4008-989e-a4f37f6f6e27
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.

3 participants