Skip to content

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

Merged
merged 2 commits into from
Jul 29, 2020
Merged

Conversation

levino
Copy link
Member

@levino levino commented Jul 27, 2020

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.

@levino levino marked this pull request as draft July 27, 2020 14:07
@levino levino changed the title Touch and hold Touch and hold to drag Jul 27, 2020
Copy link
Contributor

@jakobkolb jakobkolb left a 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.

@levino levino force-pushed the feature/issue-24-touch-and-hold-to-drag branch from a3bdf23 to 8083f18 Compare July 29, 2020 07:14
@@ -2,7 +2,6 @@
"parser": "@typescript-eslint/parser",
"extends": [
"react-app",
"plugin:@typescript-eslint/recommended",
Copy link
Member Author

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",
Copy link
Member Author

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",
Copy link
Member Author

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();
Copy link
Member Author

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

@levino levino force-pushed the feature/issue-24-touch-and-hold-to-drag branch from 6e5645b to 6e044b0 Compare July 29, 2020 08:59
@levino levino marked this pull request as ready for review July 29, 2020 09:00
@mergify mergify bot merged commit cb58f00 into master Jul 29, 2020
@mergify mergify bot deleted the feature/issue-24-touch-and-hold-to-drag branch July 29, 2020 09:05
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.

2 participants