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

Closed
ruggi opened this issue Aug 22, 2024 · 0 comments · Fixed by #6254
Closed

paste into grid #6253

ruggi opened this issue Aug 22, 2024 · 0 comments · Fixed by #6254
Assignees

Comments

@ruggi
Copy link
Contributor

ruggi commented Aug 22, 2024

No description provided.

@ruggi ruggi self-assigned this Aug 22, 2024
@ruggi ruggi mentioned this issue Aug 22, 2024
2 tasks
@ruggi ruggi closed this as completed in d06a14c Aug 22, 2024
liady pushed a commit that referenced this issue 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 a pull request may close this issue.

1 participant