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

TASK: Make options in a mutliselectbox draggable #1148

Merged
merged 10 commits into from Oct 21, 2017

Conversation

johannessteu
Copy link
Contributor

Fixes #774

@johannessteu
Copy link
Contributor Author

What i did:

  • add dnd to mutliselectbox component
  • therefore i introduced a state to make the "hover" effect visiable and the options will reorder if you hover another option
  • it's based on the dnd demo/docs

This is how it looks like right now
http://recordit.co/1hMP6XsvVD

What i'm unsure about:

  • is it possible to import the dndTypes from the neos-ui package? Should we add the dependency here or just create a new type const? Right now i just use a string wich needs to be adjusted. But i'm not 100% sure about how to solve this
  • naming?!
  • should we move the new RenderableOption Component in a seperate file? Do we/could we need it for other components as well?

@dimaip
Copy link
Contributor

dimaip commented Oct 17, 2017

Would be great to add some visual clue (affordance as those UX freaks call it) that the list items are draggable. Our editors never knew you could actually sort those lists before I told them...
Maybe option A or C?

@dimaip
Copy link
Contributor

dimaip commented Oct 17, 2017

Would be great to restrict the drag motion to Y axis and within the bounds of the component, but I know it's know easy with html5 dnd api, is it?

@dimaip
Copy link
Contributor

dimaip commented Oct 17, 2017

Can you show the new screenshot?

Also interesting what GH does on hover:
image

@johannessteu
Copy link
Contributor Author

http://recordit.co/ynUfLULi6f

Yeah, i do like the 2nd icon as well. But we have different icons for the nodetypes

@johannessteu
Copy link
Contributor Author

We could also maybe "disable" all other options with another grey color to trigger a more active state on the current item. I don't think that we have enough space for another icon next to the nodetype icons.

@dimaip
Copy link
Contributor

dimaip commented Oct 18, 2017

Maybe use the up and down arrow instead of the 4-way pointing arrow, since you can only move it up and down?
Also would be excellent if you could make so that node would not get duplicated on dragging. I know it's not super easy to do with html5 dnd api, but react-dnd should provide some helpers for that I think.

@johannessteu
Copy link
Contributor Author

I tend actualy to this 3 stripes icon do indicate it's a draggabel list, just like GH does. I'll check the dragging issue as well

@johannessteu
Copy link
Contributor Author

Updated it @dimaip http://recordit.co/M8tbLNFrYK

Copy link
Contributor

@dimaip dimaip left a comment

Choose a reason for hiding this comment

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

Looks good to me now, thanks!

@dimaip dimaip merged commit fd6d0d8 into neos:master Oct 21, 2017
@dimaip
Copy link
Contributor

dimaip commented Oct 21, 2017

You rock!

@johannessteu johannessteu deleted the sortable-select-options branch June 26, 2018 09:01
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.

None yet

2 participants