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

Freeze grid template during child move #6201

Merged
merged 2 commits into from
Aug 7, 2024
Merged

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Aug 7, 2024

Problem:

Moving grid elements if the template is somewhat dynamic will result in the grid elements likely jumping around because their template changes constantly.

Fix:

Freeze the template during the interaction, by using the calculated dimensions, and restore it once the interaction completes.

In the example below, one column is made min-content with some fixed-sized elements inside.

Before After
Kapture 2024-08-07 at 15 37 27 Kapture 2024-08-07 at 15 36 21

Fixes #6200

@ruggi ruggi changed the title freeze grid template Freeze grid template during child move Aug 7, 2024
Copy link
Contributor

github-actions bot commented Aug 7, 2024

Try me

Copy link

relativeci bot commented Aug 7, 2024

#13719 Bundle Size — 62.69MiB (~+0.01%).

7f56715(current) vs 6339ece master#13718(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#13719
     Baseline
#13718
Regression  Initial JS 45.78MiB(~+0.01%) 45.78MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.68% 22.81%
No change  Chunks 30 30
No change  Assets 33 33
No change  Modules 4379 4379
No change  Duplicate Modules 523 523
No change  Duplicate Code 31.62% 31.62%
No change  Packages 469 469
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13719
     Baseline
#13718
Regression  JS 62.68MiB (~+0.01%) 62.68MiB
Improvement  HTML 11.16KiB (-0.33%) 11.2KiB

Bundle analysis reportBranch feat/freeze-grid-move-cellProject dashboard

@ruggi ruggi merged commit 846c1ff into master Aug 7, 2024
15 checks passed
@ruggi ruggi deleted the feat/freeze-grid-move-cell branch August 7, 2024 15:53
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

Moving grid elements if the template is somewhat dynamic will result in
the grid elements likely jumping around because their template changes
constantly.

**Fix:**

Freeze the template during the interaction, by using the calculated
dimensions, and restore it once the interaction completes.

In the example below, one column is made `min-content` with some
fixed-sized elements inside.

| Before | After |
|-------|-------------|
| ![Kapture 2024-08-07 at 15 37
27](https://github.com/user-attachments/assets/da2d824a-ad02-494a-8ff6-7cc03e3b5c95)
| ![Kapture 2024-08-07 at 15 36
21](https://github.com/user-attachments/assets/283a5fc0-69b9-41e3-85d2-51be14279585)
|

Fixes #6200
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.

freeze grid template during cell move
3 participants