-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Improve visual editor UX #466
Conversation
Your Render PR Server URL is https://toolpad-pr-466.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-ca7qerpg7hp7rgt1p1jg. |
dd38ce0
to
e3f98cf
Compare
Your Render PR Server URL is https://toolpad-pr-466.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-caaviv4gqg44u0360gvg. |
9512ff1
to
bb5242c
Compare
61d1855
to
a56ff9e
Compare
@Janpot I've made all the changes and added all the fixes we talked about yesterday, hopefully it's better now. |
9e30a6c
to
066cf6c
Compare
The space between two elements is not behaving the best Screen.Recording.2022-06-08.at.20.12.51.mov |
i see what happened there, you dragged to the space between two elements which means you were hovering over the parent, and you dropped the new element in the parent, which adds an element as the last element in the parent... i can try to handle situations like this but will have to change to logic to somehow not consider exactly the element you're hovering over - and be able to see which elements are close to the cursor in some way |
i guess i can create some kind of subsystem inside containers that works like the slots that were implemented previously |
I think a misconception that this implementation makes is that slots go on the edges of the components. Components are laid out in a structure that can have a configurable gap. If the slot goes on the edge, that makes it so there are two slots in between two consecutive children. I think a better mental model would be that the layout components (rows, columns) divide the page in rectangles that the user components (button, input, table,...) occupy. Insert slots appear on the edges of these rectangles. For the drag&drop algorithm, these rectangles don't have spacing, the spacing only applies to the components that occupy the grid. |
d470ef2
to
719a410
Compare
4ffa4ac
to
445845e
Compare
445845e
to
504315a
Compare
@Janpot this might be mergeable now, i thing the UX is feeling alright in general, lmk if you find any more issues! |
When dropping a component, the default alignment on the left felt better than the central alignment. |
it's an easy change, we just need to decide if we want this current behavior or if we want new elements to take up the minimum width possible. this current approach is similar to Makeswift. |
a47f5b8
to
056131c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Great work! Let's merge this and continue polishing in follow-up PRs
https://www.notion.so/mui-org/App-Editor-Enhancements-070bf8ba0e2145a2aaaf50d67a24983e
Related to #101
This is an improvement proposal for our drag & drop. It may not be perfect yet but I feel like it's an improvement and a step in the right direction.
There might still be uncaught bugs or small UX issues, but overall seems fine from what has been tested. The rest can be fixed and improved after receiving feedback.
Refactored drag & drop with several features:
Video example:
Screen.Recording.2022-06-08.at.18.33.12.mov
@Janpot I tried to be careful but let me know if I deleted something I shouldn't, or if some of the new utility methods I created would be better in some other place.