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

Allow resizing of elements beyond adjacement elements in editor #736

Open
2 tasks done
apedroferreira opened this issue Aug 4, 2022 · 4 comments
Open
2 tasks done
Labels

Comments

@apedroferreira
Copy link
Member

apedroferreira commented Aug 4, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

In the editor, make it possible to extend/resize an element horizontally beyond the element next to it, and adjust the size of every element under the resized area accordingly once the resizing is complete.
Resizing elements has been constrained to the element next to the resized element in #732 to prevent bugs, but that's not the ideal behavior.

See discussion in this PR for context and implementation ideas: #732

Fixing this issue might also involve:

  • changing the way resize previews look so that this type of resizing is always visually intuitive, and does not reflect changes in just one element but all the affected elements
  • Extra (possibly related to resize preview visual changes): the resizing behavior should be started not by dragging an element's left or right edge, but by dragging from the horizontal space between two elements.

Examples 🌈

Taken from #732 (comment)

Screen.Recording.2022-08-04.at.16.50.49.mov

Motivation 🔦

  • Giving users more freedom to resize elements as they wish
  • Getting rid of the possibly strange resizing behavior where dragging the right edge of an element is practically the same as dragging the left edge of the element to the right of it
  • Allowing more drag-handle space for future possible features such as changing internal spacing or size for a specific component.
@apedroferreira
Copy link
Member Author

apedroferreira commented Aug 4, 2022

Actually this might be doable without changing the visual look of the preview, and by always highlighting the element to the right of the border...
If I take this I will try that first to see how it feels before trying any bigger changes.

@Janpot
Copy link
Member

Janpot commented Aug 5, 2022

https://grid.layoutit.com/ has yet another behavior, it just clamps the fr of a column at 0.1, and keeps increasing the fr of the resizing column. This method is probably easier to implement as you don't need to store and restore the initial widths. Drawback is that dragging the column doesn't precisely follow the cursor anymore once it goes beyond available size of the first sibling (as can also be seen in the video below). The vscode resizing UX is much better IMO.

Screen.Recording.2022-08-05.at.09.19.02.mov

@oliviertassinari oliviertassinari added feature: App Editor and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 5, 2022
@oliviertassinari
Copy link
Member

@apedroferreira I have removed the "status: needs triage" from this issue and others that you have created. The label is configured to be added by default, so that we can identify issues created by the community (an external contributor can't change labels).

@apedroferreira
Copy link
Member Author

@apedroferreira I have removed the "status: needs triage" from this issue and others that you have created. The label is configured to be added by default, so that we can identify issues created by the community (an external contributor can't change labels).

got it, thanks, i didnt know that

@prakhargupta1 prakhargupta1 added this to the backlog milestone Aug 17, 2022
@prakhargupta1 prakhargupta1 removed this from the Backlog milestone Aug 29, 2022
@prakhargupta1 prakhargupta1 added the scope: toolpad-studio Abbreviated to "studio" label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants