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

Editor - Resizing elements inside page rows #645

Merged
merged 32 commits into from
Jul 27, 2022

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented Jul 8, 2022

Related issues: #101 and #359

Add ability to resize node elements inside page rows, in the editor:

Screen.Recording.2022-07-19.at.19.46.13.mov
  • allow dragging sides of elements to resize them
  • show grid overlay while dragging - snap to grid columns to make it easier for users to build a good-looking layout
  • show resize preview while dragging - changing the styles in the DOM directly, using a CSS transform scale
  • control grid layout inside rows through a prop set directly in the runtime - use the layout namespace in page row children to control the value of that prop
  • includes some necessary small adjustments to some editor components too

closes #681

@render
Copy link

render bot commented Jul 8, 2022

@oliviertassinari oliviertassinari requested a deployment to editor-element-resizing - toolpad-db PR #645 July 8, 2022 18:11 — with Render Abandoned
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 11, 2022
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 11, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 12, 2022
@render
Copy link

render bot commented Jul 18, 2022

@oliviertassinari oliviertassinari requested a deployment to editor-element-resizing - toolpad-db PR #645 July 18, 2022 18:32 — with Render Abandoned
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 19, 2022
@apedroferreira apedroferreira marked this pull request as ready for review July 19, 2022 18:33
@apedroferreira apedroferreira changed the title Editor element resizing Editor - element resizing inside page rows Jul 19, 2022
@apedroferreira apedroferreira changed the title Editor - element resizing inside page rows Editor - Resizing elements inside page rows Jul 19, 2022
@@ -1058,6 +1142,16 @@ export default function RenderPanel({ className }: RenderPanelProps) {
lastContainerChild.parentProp,
parent.parentIndex,
);

if (isPageColumn(parent)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll probably improve this function later to not have to repeat as much logic- should be done separately though as it relates to the whole editor and not just resizing

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 25, 2022
@render
Copy link

render bot commented Jul 25, 2022

@oliviertassinari oliviertassinari requested a deployment to editor-element-resizing - toolpad-db PR #645 July 25, 2022 13:25 — with Render Abandoned
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 25, 2022
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 lgtm

@apedroferreira apedroferreira merged commit 2d06db6 into master Jul 27, 2022
@apedroferreira apedroferreira deleted the editor-element-resizing branch July 27, 2022 15:19
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.

Input label gets cut off
3 participants