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

Drag and drop refactor #730

Merged
merged 7 commits into from
Aug 8, 2022
Merged

Drag and drop refactor #730

merged 7 commits into from
Aug 8, 2022

Conversation

apedroferreira
Copy link
Member

@apedroferreira apedroferreira commented Aug 3, 2022

Refactor the RenderPanel component logic in order to try to make it a bit easier to mantain. It's not perfect but it's an improvement, and I'll try to improve more things as I find them.

  • Moved most of the rendering logic to its own components where possible, inside the RenderPanel folder
  • Kept the top-level logic in its own root component
  • Got rid of some unnecessary checks/functions that I found and replaced them with simpler alternatives
  • The drag & drop + resizing logic is still in the RenderOverlay component - I played around with having a separate component for each of these, and it's possible but it was making things more complicated just for the sake of not taking up as many lines, and it didn't make too much logical sense to split this logic in separate components like that, because they apply to same div/overlay...

@render
Copy link

render bot commented Aug 3, 2022

@oliviertassinari oliviertassinari requested a deployment to drag-and-drop-fixes - toolpad-db PR #730 August 3, 2022 15:14 — with Render Abandoned
@apedroferreira apedroferreira marked this pull request as ready for review August 3, 2022 16:20
@apedroferreira apedroferreira changed the title Drag and drop refactor and small bug fixes Drag and drop refactor (and small bug fix) Aug 3, 2022
@apedroferreira apedroferreira changed the title Drag and drop refactor (and small bug fix) Drag and drop refactor Aug 3, 2022
…732)

Prevent resizing row child element over adjacent element
* Disallow creating columns in single-child rows

* Fix broken zone detection

* Improve variable name

* Improve readability and shorter variable name
@apedroferreira apedroferreira merged commit 5b007ec into master Aug 8, 2022
@apedroferreira apedroferreira deleted the drag-and-drop-fixes branch August 8, 2022 15:40
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.

2 participants