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

Nest item under others above it by dragging right. #52

Closed
WriterStat opened this issue Apr 2, 2019 · 11 comments
Closed

Nest item under others above it by dragging right. #52

WriterStat opened this issue Apr 2, 2019 · 11 comments

Comments

@WriterStat
Copy link

Hi! Checking this out.

I noticed that if an item is already below other items in a group. Then dragging it right does not nest it under the item above it. Possible/How? Thx!

Example:

item1
item2
item3

drag item3 right

item1
item2
-> item3

dragging item3 right does not nest it under the above item, item2

Currently you have to drag it on top of a group of items above it.

And if it's already the bottom item, then it's not something a user might quickly understand to do. They may just try to drag it to the right. Since it's already below that item.

How can I do? Thx!

@camohub
Copy link
Owner

camohub commented Apr 2, 2019

I dont understand you. If I drag any item to the right it emmediately creates a nested item. If I drag item left it changes an order on the top level of the list. Try insertZonePlus option.

@WriterStat
Copy link
Author

Hi, thanks for the quick response and the fine software. Will try to explain.

On the demo page at http://camohub.github.io/jquery-sortable-lists/
Go to the demo of Insert zone plus lower down the page:

Drag Item 2 directly to the right it does not become a nested item of Item 1. It bounces back.
Drag Item 4 directly to the right it does not become a nested item of Item 3. It bounces back.

For Item 2 to nest in Item 1.

  • You have to drag Item 2 up on top of Item 1 until an area opens up for it.

For Item 4 to nest in Item 3.

  • You have to drag Item 4 up on top of Item 3 until an area opens up for it.

Give it a try, drag item 4 only to the right.

Is there a way to have it nest with the item above it on just right drag only? Much Thx.

Same with left drag only?

@camohub
Copy link
Owner

camohub commented Apr 3, 2019

Yes it is correct. It is sensitive to the mouse cursor. Its position determines what happens.

@WriterStat
Copy link
Author

Dragging it to the right as I said doesn't nest it, is there a way that it could? thx.

@WriterStat
Copy link
Author

Example: when an item is dragged right. Nest it in the item just above it.

Dragging right means you want to nest it in the item above it as a sub.

Dragging left means you want to remove it from the current parent item and nest it in the next above parent of that item, if there is a parent.

Unless there isn't a parent and then it becomes parent-less and is placed below the parent item it was taken from. Or above it if you move the cursor above the item you just removed it from.

Possible? thx.

@camohub
Copy link
Owner

camohub commented Apr 3, 2019

Dragging right means you want to nest it in the item above it as a sub?
And what if you want to nest it in the item below instead of above item?

Dragging left means you want to remove it from the current parent item and nest it in the next above parent of that item, if there is a parent?
Still the same problem. What about below items? There is above and below. And also nest or not nest.

Left/right is not enough to handle all the states.

@WriterStat
Copy link
Author

Both bullet points and file trees always nest natively to the one above as their default when you tab the item right and when you drag right. It's part of their nature how they are designed.

To nest in something below your item, you always have to mouse drag the item below something, because well it's below it.

So just dragging right should tab it right and under for the item above it. It's just another case to add to the others.

No need to remove other cases.

Dragging left is also another case to be added. Much like dragging right is. It's just another case where it instead removes the item from the current parent and places it in the parent above it, above the item it was in. Or if no parent then it is parent-less. Moved above the item it was in.

The default placing is always up on drag right or left. Unless you drag it to a more specific spot in the list. Dragging right places it up under the item above it. Dragging left places it up under the parent above it..

Anyhow it sounds like there isn't a current way. I just needed to know if there was a way currently.

Still fine software.

@WriterStat
Copy link
Author

Take a look at:

https://frontend-collective.github.io/react-sortable-tree/

Drag an item either right or left to see. Anyhow I figured it would be an add.

I don't currently use React, but the right or left dragging of items is the above case. Just another case to be added.

@camohub
Copy link
Owner

camohub commented Apr 4, 2019

So just dragging right should tab it right and under for the item above it

I don't agree with this premises.

There is a way. But nobody want to pay for it.

@WriterStat
Copy link
Author

Many bullet lists/draggable tree lists have this. Could be a good shortcut addition for the bullet lists you show in the demo.

Better to say no it doesn't do that, instead of yes. Then we as a dev can decide to add to the code or not. In this case for now you can't drag an item directly to the right to nest it under the item directly above it. Or drag it directly to the left to move it from the current bullet list parent.

The only reason to ever drag an item to the right is to nest it as a sub item to the one above it.

Knowing helps us decide if we want to add to it or use it.

Best,

@camohub
Copy link
Owner

camohub commented Apr 5, 2019

Ok have a nice day.

@camohub camohub closed this as completed Apr 5, 2019
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

No branches or pull requests

2 participants