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

Sequential selection feat #73

Merged
merged 3 commits into from
Sep 7, 2019

Conversation

jczacharia
Copy link
Member

The PR adds the feature: Allow only sequential selection of items when sequentialSelection: true of the timeline's configuration options.

Demo: https://next.plnkr.co/edit/2EUet6TcIoHGcH6G

@yotamberk
Copy link
Member

yotamberk commented Aug 31, 2019

I don't understand this feature. Can you please elaborate?

@jczacharia
Copy link
Member Author

@yotamberk This feature does not allow the user to select multiple items that are not sequential. This is a use case for when the user should not have time gaps in the items they select.

In the demo, turn sequentialSelection to false, then select an item all the way to the left, then hold ctrl and select an item all the way to the right. Notice that only those two are selected.

Then turn sequentialSelection to true. Do the same thing. Notice how all the items in between are selected now, e.g. no gaps.

@yotamberk
Copy link
Member

Ok, I understand now.
It makes more sense to me that the holding of Ctrl button is non sequential while the holding of Shift button is sequential. It works in either way. Do you really think this feature is needed?
I feel that this feature is more specific for the ctrl button being held

@jczacharia
Copy link
Member Author

I have a use case where the user should not be allowed to have gaps in the items they select.
I think it's a good idea to have this feature in case other projects have this same use case.

@yotamberk
Copy link
Member

yotamberk commented Aug 31, 2019

I have a use case where the user should not be allowed to have gaps in the items they select.

Please explain.
It still doesn;t explain the difference between what this feature supplies to what is currently supplied via shift and ctrl.

@jczacharia
Copy link
Member Author

Each item represents a task but my API only allows a user to take actions on a group of tasks where each task happens right after another. If a user were to try to take action on a group of tasks that are not next to each other, my API wouldn't process the request. So the user could go without this feature but would get confused when nothing happens to try to process non-sequential tasks. This is more of a user experience design with only processing one block of tasks at a time.

mojoaxel
mojoaxel previously approved these changes Sep 3, 2019
Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

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

I think this PR is really hard to understand!
I played around with your Demo using shift and ctrl. I think this is a nice addition. Probably this will not be used often but for some power user it might be an important addition.

@jczacharia Nice work! Example, docs, everything very nice! 🥇

Copy link
Member

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

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

I agree with @mojoaxel . This is not a clear feature and it will probably be very rarely used, but I will approve it for the odd times people do want to need this feature.
Good work! Really!

@yotamberk yotamberk merged commit d35e6ce into visjs:master Sep 7, 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

Successfully merging this pull request may close these issues.

3 participants