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

Resize grid cells via ruler markers #6688

Closed
ruggi opened this issue Nov 29, 2024 · 0 comments · Fixed by #6689
Closed

Resize grid cells via ruler markers #6688

ruggi opened this issue Nov 29, 2024 · 0 comments · Fixed by #6689
Assignees

Comments

@ruggi
Copy link
Contributor

ruggi commented Nov 29, 2024

No description provided.

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

It should be possible to resize grid cells using the ruler markers.

**Fix:**

When dragging a ruler marker:
1. start a new interaction for the new resize strategy variant which
detects the closest cell on a given axis
2. freeze the existing markers so they don't move until the interaction
is complete
3. show a pink snap line on the interaction target, with a label on top
indicating the pin value
4. show a live offset line following the drag position

**Notes:**
- The snap line positioning might be tweaked in the future based on what
we decide to do with "duplicate" ruler notches.
- The resize is only enabled for stretching grid items, same as we do
with the regular resize. We should (probably?) incrementally add the
ability to resize cells even if their child is not stretching when using
the rulers.

**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 #6688
liady pushed a commit that referenced this issue Dec 13, 2024
**Problem:**

It should be possible to resize grid cells using the ruler markers.

**Fix:**

When dragging a ruler marker:
1. start a new interaction for the new resize strategy variant which
detects the closest cell on a given axis
2. freeze the existing markers so they don't move until the interaction
is complete
3. show a pink snap line on the interaction target, with a label on top
indicating the pin value
4. show a live offset line following the drag position

**Notes:**
- The snap line positioning might be tweaked in the future based on what
we decide to do with "duplicate" ruler notches.
- The resize is only enabled for stretching grid items, same as we do
with the regular resize. We should (probably?) incrementally add the
ability to resize cells even if their child is not stretching when using
the rulers.

**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 #6688
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