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

Grid resize better handles #6058

Merged
merged 9 commits into from
Jul 10, 2024
Merged

Grid resize better handles #6058

merged 9 commits into from
Jul 10, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Jul 10, 2024

Problem:

The resize grid strategy has some UI issues:

  1. the handles are only shown when a grid cell is selected, not the grid itself
  2. the handles are not positioned correctly relatively to the grid itself
  3. it's hard to discern precisely the resize effects

Fix:

  1. Enable the grid resizing if the grid is selected too
  2. Position the handles centered relatively to the grid rows/columns
  3. Replace the "numbered handles" with more subtle draggable circles
  4. During drag, show a striped background for the affected row or column, with the measurements centered in the striped area

Note
The handles icons are placeholders/ideas.

Before After
Kapture 2024-07-10 at 14 19 33 Kapture 2024-07-10 at 14 17 58

Copy link
Contributor

github-actions bot commented Jul 10, 2024

Try me

Copy link

relativeci bot commented Jul 10, 2024

#13316 Bundle Size — 62.62MiB (~+0.01%).

3b6200f(current) vs 6339ece master#13302(baseline)

Warning

Bundle contains 51 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#13316
     Baseline
#13302
Regression  Initial JS 45.68MiB(~+0.01%) 45.67MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 21.62% 21.58%
No change  Chunks 30 30
No change  Assets 33 33
No change  Modules 4350 4350
No change  Duplicate Modules 524 524
No change  Duplicate Code 31.71% 31.71%
No change  Packages 450 450
No change  Duplicate Packages 51 51
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#13316
     Baseline
#13302
Regression  JS 62.61MiB (~+0.01%) 62.61MiB
Improvement  HTML 11.16KiB (-0.33%) 11.2KiB

Bundle analysis reportBranch feat/resize-grid-better-handlesProject dashboard

@ruggi ruggi requested a review from bkrmendy July 10, 2024 13:37
ruggi added 2 commits July 10, 2024 17:00
# Conflicts:
#	editor/src/components/canvas/controls/grid-controls.tsx
@ruggi ruggi merged commit 9bdeed7 into master Jul 10, 2024
14 checks passed
@ruggi ruggi deleted the feat/resize-grid-better-handles branch July 10, 2024 15:15
ruggi added a commit that referenced this pull request Jul 10, 2024
Fix for a typo in the container width calculations of
#6058 which would end up
being too large.
liady pushed a commit that referenced this pull request Dec 13, 2024
**Problem:**

The resize grid strategy has some UI issues:

1. the handles are only shown when a grid cell is selected, not the grid
itself
2. the handles are not positioned correctly relatively to the grid
itself
3. it's hard to discern precisely the resize effects

**Fix:**

1. Enable the grid resizing if the grid is selected too
2. Position the handles centered relatively to the grid rows/columns
3. Replace the "numbered handles" with more subtle draggable circles
4. During drag, show a striped background for the affected row or
column, with the measurements centered in the striped area

**Note**
The handles icons are placeholders/ideas.


| Before | After |
|--------|-----------|
| ![Kapture 2024-07-10 at 14 19
33](https://github.com/concrete-utopia/utopia/assets/1081051/0b310d2d-fda5-443e-b685-299556b90ef6)
| ![Kapture 2024-07-10 at 14 17
58](https://github.com/concrete-utopia/utopia/assets/1081051/d6b005df-8e9b-4219-a5b6-8c976e85cc0a)
|
liady pushed a commit that referenced this pull request Dec 13, 2024
Fix for a typo in the container width calculations of
#6058 which would end up
being too large.
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.

3 participants