-
Notifications
You must be signed in to change notification settings - Fork 0
Touch and hold to drag #36
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Touch and hold to drag works well on the "Konzeptbäume" view. Coincidentally, also drag to scroll works as one would expect on mobile. However, touch and hold to drag does not work reliably on the "Anfragen" and "Formulare" views.
a3bdf23
to
8083f18
Compare
@@ -2,7 +2,6 @@ | |||
"parser": "@typescript-eslint/parser", | |||
"extends": [ | |||
"react-app", | |||
"plugin:@typescript-eslint/recommended", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was too strict. The "react-app" config is strict enough.
"react-dnd": "^9.4.0", | ||
"react-dnd-cjs": "^9.4.0", | ||
"react-dnd-html5-backend": "^9.4.0", | ||
"react-dnd-html5-backend-cjs": "^9.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The *-cjs
-packages were never imported anywhere. I could not see a reason to keep them. Hope this does not break anything. Would be nice if there was a test for whatever these should have fixed...
"@storybook/addon-links": "^5.3.19", | ||
"@storybook/addons": "^5.3.19", | ||
"@storybook/preset-create-react-app": "^3.1.4", | ||
"@storybook/react": "^5.3.19", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were in twice. Oopsy.
@@ -36,12 +42,19 @@ const PreviewItem = styled("div")` | |||
// Consider upgrading react-dnd BUT somehow try to keep IE11 compatibility | |||
//@ts-ignore | |||
|
|||
const generatePreview = (type, item, style) => { | |||
const DragPreview = () => { | |||
const { item, style, display } = usePreview(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the hook api now after updating react-dnd-multi-backend
6e5645b
to
6e044b0
Compare
Enable touch and hold to drag. Coincidentally, drag to scroll on mobile also works.
fix #36, fix #25
Make start script also start the mock backend for easier dev setup. Fixes #1264.