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

Use drag handles for list control drag/drop #431

Closed
erquhart opened this issue May 25, 2017 · 6 comments · Fixed by #708 · May be fixed by B3EF/netlify-cms#36
Closed

Use drag handles for list control drag/drop #431

erquhart opened this issue May 25, 2017 · 6 comments · Fixed by #708 · May be fixed by B3EF/netlify-cms#36
Milestone

Comments

@erquhart
Copy link
Contributor

erquhart commented May 25, 2017

- Do you want to request a feature or report a bug?

bug

- What is the current behavior?

Each object in a list control can be dragged from any point. When attempting to select text inside of a list control, you'll often drag the entire object of controls instead.

- If the current behavior is a bug, please provide the steps to reproduce.

  • Open the editor for a CMS entry that utilizes the list widget (list widget must contain a text field
  • Hit the "+ new" button in the list widget to create a new list item
  • Enter text in a text field for the newly created item
  • Attempt to select entered text using a mouse or touchpad

- What is the expected behavior?

  • Text should be selected without activating drag mode on the list item

- Requirements

  • Limit drag mode activation to a drag handle area (a handle is already depicted at the top of each list item in the UI, but it's just styling).
  • When a list item is collapsed, the entire item should still be treated as a drag handle.
@andreasvirkus
Copy link

Is this at a good first contribution label level? I'd like to take a crack at this to get my foot in the door on contributing to this repo.

@erquhart
Copy link
Contributor Author

Hey @andreasvirkus, that'd be awesome! I don't imagine it'd be too difficult - it should be supported by the drag/drop library we're using, but I haven't looked into it. Definitely take a crack at it, you can post questions in Gitter if you run into issues.

@erquhart erquhart added this to the 1.0 milestone Jun 28, 2017
@andreasvirkus
Copy link

I hit a small road block with the react-sortable lib we use. It's easy to disable dragging for all children of the draggable, fixing the initial bug described. But I've found no way to re-enable it for a specific child element afterwards.

I also asked for help under the lib's issues, but haven't received any feedback yet. I reached out to Daniel (owner) on his e-mail, but if that doesn't amount to anything, would it be ok for me to try out a different lib react-draggable? They've got the drag handles in their example as well so it's definitely a feature they support.

@erquhart
Copy link
Contributor Author

@andreasvirkus I'm not against using a different lib - for our purposes, this one seems the most promising: https://github.com/clauderic/react-sortable-hoc

@andreasvirkus
Copy link

@erquhart Good find, will dive into it tonight!

@erquhart
Copy link
Contributor Author

erquhart commented Jul 6, 2017

@andreasvirkus just a heads up, @Benaiah seems to have included this in some recent work that required this fix: #468. If you're up for reviewing, it'd be a great help! I can also point you toward another issue if you don't already have one mind - just reach out on Gitter :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants