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 parent grid container template from props #6680

Closed
ruggi opened this issue Nov 26, 2024 · 0 comments · Fixed by #6681
Closed

Fix parent grid container template from props #6680

ruggi opened this issue Nov 26, 2024 · 0 comments · Fixed by #6681
Assignees

Comments

@ruggi
Copy link
Contributor

ruggi commented Nov 26, 2024

No description provided.

@ruggi ruggi self-assigned this Nov 26, 2024
ruggi added a commit that referenced this issue Nov 26, 2024
**Problem:**

The `parentContainerGridPropertiesFromProps` in the special size
measurements is incorrectly calcluated off of the computed style of the
parent. This results, among other issues, into the template being
serialized to its computed values whenever
`gridMoveStrategiesExtraCommands` is applied inside strategies (e.g.
right after moving a grid item).

**Fix:**

Try to use the parent element style directly when parsing.

| Before | After |
|--------|------------|
|
https://github.com/user-attachments/assets/3a3a62b4-c030-422d-bd69-d80e52a76ef5
|
https://github.com/user-attachments/assets/ffbc2c3e-e7b3-4812-b9b4-71d096030b94
|



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

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

Fixes #6680
liady pushed a commit that referenced this issue Dec 13, 2024
**Problem:**

The `parentContainerGridPropertiesFromProps` in the special size
measurements is incorrectly calcluated off of the computed style of the
parent. This results, among other issues, into the template being
serialized to its computed values whenever
`gridMoveStrategiesExtraCommands` is applied inside strategies (e.g.
right after moving a grid item).

**Fix:**

Try to use the parent element style directly when parsing.

| Before | After |
|--------|------------|
|
https://github.com/user-attachments/assets/3a3a62b4-c030-422d-bd69-d80e52a76ef5
|
https://github.com/user-attachments/assets/ffbc2c3e-e7b3-4812-b9b4-71d096030b94
|



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

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

Fixes #6680
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