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

switch from react-sortable-hoc to https://dndkit.com/ #6196

Closed
2 tasks
williamstein opened this issue Nov 1, 2022 · 4 comments
Closed
2 tasks

switch from react-sortable-hoc to https://dndkit.com/ #6196

williamstein opened this issue Nov 1, 2022 · 4 comments

Comments

@williamstein
Copy link
Contributor

According to clauderic/react-sortable-hoc#844
the react-sortable-hoc component is dead. It doesn't support react 18, and my attempts to build it from source failed.

This is a blocker for upgrading to react 18, which is in turn a blocker for upgrading to next 13 (see https://beta.nextjs.org/docs/upgrade-guide), which requires react 18.

I think react-sortable-hoc is just used in two places:

  • the task list
  • tabs in a project

So this probably isn't too difficult of a task.

@williamstein
Copy link
Contributor Author

We actually use the very popular react-draggable already for the frame borders and also all dragging in the whiteboard. I wonder if we can redo our use of react-sortable-hoc using react-draggable?

@williamstein
Copy link
Contributor Author

Upon further inspection, maybe the whiteboard should instead use dnd-kit, since it's really impressive. This could make it easy to add some more features like "snap to grid" as well.

@williamstein
Copy link
Contributor Author

@williamstein
Copy link
Contributor Author

This is now fully done here: #6330

This even includes bug fixes (e.g., for drag-n-drop for tasks) and rewriting all the old "Bootstrap" tab stuff using Antd (which is way more accessible). It also implements new tab control for CRM.

That said, I'm worried a lot about the UI changing too much, and some things are possibly annoying. I'm considering maybe implementing a mode where all file tabs have the same size, which is not the case now, to get behavior more like it used to be (like chrome tabs).

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

No branches or pull requests

1 participant