-
Notifications
You must be signed in to change notification settings - Fork 385
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 dragging rotated blocks without selecting them #2252
Comments
@swissspidy I'm thinking of picking this up soon, let me know if you already had a potential approach figured out for this. Couldn't find information about it from the previous issues at this moment so I'm assuming that not :) |
@miina No potential approach in mind, but it might sense to first solve the issue of dragging blocks by clicking anywhere, without the block mover. Getting rid of the block mover (with |
@swissspidy Is the requirement of being able to drag blocks by clicking anywhere logged somewhere? I remember that this was under discussion and the conclusion was that it didn't make sense since otherwise selecting text within a block, for example for making it italic/bold, or for copying etc., would be complicated. Additionally, the cursor style would be confusing -- should it hint clicking or dragging if both actions are available. Basically, the conclusion was that it could be quite confusing UX. Let me know if there has been an alternative discussion out of GitHub meanwhile. |
How about being able to drag from any of the borders instead of anywhere? Like it is in Google Slides for example. |
Also, I'm thinking that perhaps we should keep the rotation while the block is selected -- especially now when the usage of Top Toolbar is enforced it shouldn't be an issue anymore, previously the settings buttons rotated as well and that was quite confusing, however, now that issue is removed. This would also be similar behavior to Google Slides, keeping the block rotated. Leaving the block rotated gives a better preview of how it actually looks like and removes all the additional movement of a block + makes it much more straightforward to drag/rotate, etc. Thoughts? |
Yeah that was the intention, and yes I remember the discussion. I think the goal is to make it more similar to other apps like Instagram, where you can just drag anywhere, and if you want to select some text, you would first tap on it (i.e. select the block) and then perform the action. This was also the feedback provided by Paul, and I remember @amedina created a card on the project board for it, but I cannot seem to find it anymore.
No objections there. Removing the rotation there was more of a workaround for the status quo than anything else. Fixing this would also be relevant for #2211. But let's hear the others before jumping straight into this :-) |
What would happen if the user would like to copy some text from a block (selecting part of the text), or selecting part of the Text to mark it italic/bold -- this would basically be impossible then and result in dragging instead? Not sure if hijacking the whole block area by dragging is the best way to go 🤷♀ Edit: Perhaps this would make sense in mobile only.
Yep, agreed. I started looking into positioning the clone correctly when dragging a rotated block but that'll be required in any approach. |
@swissspidy We could actually implement the removal of the drag handle in a separate issue based on the future discussion, I'll open an issue for that (#2275), couldn't find it right now. Within this issue, we could just implement the tasks stated in the description -- dragging rotated blocks + not having to select a block. I'll also look into #2181 to remove everything except for the drag handle already from the block, otherwise, it might be confusing if the currently existing arrows are rotated. |
Testing instructions
|
Reopening because of issues with the resizing of rotated blocks. Demo: https://cloudup.com/c_nacwQlmHq
|
As for the resizing, we use Gutenberg's Perhaps we can somehow incorporate the rotation angle into the Others projects like https://github.com/mockingbot/react-resizable-rotatable-draggable demonstrate that this should be possible. |
Instructions for testing:
Note that there are two known issues:
|
Verified in QA |
As a follow-up to #2014 and #1974, we should revisit allowing drag & drop of rotated blocks without the need to select them first.
This way, one can more easily position them on the right side of the screen.
The text was updated successfully, but these errors were encountered: