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

Paste into grid #6254

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Paste into grid #6254

merged 2 commits into from
Aug 22, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Aug 22, 2024

Problem:

Pasting an element into a grid doesn't place the new element into the grid's placement logic.

Fix:

If the target parent is a grid, remove flow properties from the pasted element, which will be then placed at the first valid coordinates following auto logic.

In the future we might revisit this with a bit more heuristics to determine "empty" cells to place the element into, but for now the current logic should be more than enough.

Before After
Kapture 2024-08-22 at 11 30 59 Kapture 2024-08-22 at 11 29 34

Manual Tests:
I hereby swear that:

  • I opened a hydrogen project and it loaded
  • I could navigate to various routes in Preview mode

Fixes #6253

Copy link
Contributor

github-actions bot commented Aug 22, 2024

Try me

Copy link

relativeci bot commented Aug 22, 2024

#13901 Bundle Size — 62.49MiB (~+0.01%).

a46519a(current) vs 916e8b9 master#13898(baseline)

Warning

Bundle contains 70 duplicate packages – View duplicate packages

Bundle metrics  Change 3 changes Regression 1 regression
                 Current
#13901
     Baseline
#13898
Regression  Initial JS 45.63MiB(~+0.01%) 45.63MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.53% 21.5%
No change  Chunks 30 30
No change  Assets 33 33
No change  Modules 4373 4373
No change  Duplicate Modules 519 519
Change  Duplicate Code 31.64%(-0.03%) 31.65%
No change  Packages 472 472
No change  Duplicate Packages 70 70
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13901
     Baseline
#13898
Regression  JS 62.48MiB (~+0.01%) 62.48MiB
Improvement  HTML 11.05KiB (-0.33%) 11.09KiB

Bundle analysis reportBranch feat/paste-into-gridProject dashboard


Generated by RelativeCIDocumentationReport issue

@ruggi ruggi merged commit d06a14c into master Aug 22, 2024
15 checks passed
@ruggi ruggi deleted the feat/paste-into-grid branch August 22, 2024 10:36
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

Pasting an element into a grid doesn't place the new element _into_ the
grid's placement logic.

**Fix:**

If the target parent is a grid, remove flow properties from the pasted
element, which will be then placed at the first valid coordinates
following `auto` logic.

In the future we might revisit this with a bit more heuristics to
determine "empty" cells to place the element into, but for now the
current logic should be more than enough.

| Before | After |
|-------|----------|
| ![Kapture 2024-08-22 at 11 30
59](https://github.com/user-attachments/assets/16a4b479-6fa8-4962-8990-5fb1356d8537)
| ![Kapture 2024-08-22 at 11 29
34](https://github.com/user-attachments/assets/f248cb1c-453d-4051-b2c0-30257c54ee2a)
|


**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Preview mode

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

paste into grid
3 participants