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

Touch support #165

Merged
merged 38 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
554225a
cleanup of existing code
alexreardon Oct 31, 2017
9e7f4ea
progress
alexreardon Nov 2, 2017
3442173
moving to sensor based approach
alexreardon Nov 3, 2017
771b7b9
sensors sort of working
alexreardon Nov 3, 2017
e5f0574
wip
alexreardon Nov 3, 2017
1aeb0f8
progress
alexreardon Nov 3, 2017
b9d1a70
adding initial touch sensor
alexreardon Nov 6, 2017
362e254
things are looking pretty good
alexreardon Nov 6, 2017
4a95ae1
linting and starting on docs
alexreardon Nov 6, 2017
6ef1726
progress
alexreardon Nov 6, 2017
92dddda
adding a little vibration on lift for fun
alexreardon Nov 6, 2017
4cbb645
progress
alexreardon Nov 7, 2017
7f3ebbd
fixing existing drag handle tests
alexreardon Nov 7, 2017
b0f2fe0
adding basic spec for touch
alexreardon Nov 8, 2017
ca0509c
refactoring lift code. removing onKeyLift
alexreardon Nov 8, 2017
00d0abe
refactoring lift function
alexreardon Nov 8, 2017
4a99808
adding tests for touch
alexreardon Nov 8, 2017
bc407d8
managed to convince jsdom to let me publish touch events
alexreardon Nov 9, 2017
77149a4
progress
alexreardon Nov 9, 2017
b90f4cd
attempt to scroll will now start a drag
alexreardon Nov 9, 2017
7964dff
adding docs
alexreardon Nov 9, 2017
a972526
baking in base touch styles for easy use
alexreardon Nov 10, 2017
ff2fa5a
click blocking for touch dragging when there is no movement
alexreardon Nov 10, 2017
fda6885
refinements and tests
alexreardon Nov 10, 2017
8288ba2
all drag handle tests passing
alexreardon Nov 10, 2017
8be1877
cleanup. fixing ie11
alexreardon Nov 10, 2017
1d8530e
fixing draggable tests
alexreardon Nov 10, 2017
25820eb
updating snapshots
alexreardon Nov 10, 2017
1953c7e
more tests
alexreardon Nov 12, 2017
23ab537
removing old type
alexreardon Nov 12, 2017
785fc20
keypress now cancels touch drag
alexreardon Nov 12, 2017
5c8c19e
adding to docs
alexreardon Nov 12, 2017
9a53537
adding new style types to readme
alexreardon Nov 12, 2017
ef98aee
moving things around in docs
alexreardon Nov 12, 2017
7da67f0
improving docs
alexreardon Nov 13, 2017
081b968
being more defence regarding touchstart
alexreardon Nov 13, 2017
c5b3130
cleaning up docs
alexreardon Nov 14, 2017
8c3b580
Merge remote-tracking branch 'origin/master' into touch-support
alexreardon Nov 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@
<!--
If raising a feature request please be sure to have a search
through other open and closed issues tagged with 'new feature'

https://github.com/atlassian/react-beautiful-dnd/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aclosed%20is%3Aissue%20
-->

<!-- If raising a bug -->
### Expected behaviour

### Actual behaviour
### Expected behavior

### Actual behavior

### Steps to reproduce

### Browser version
<!--
Keep in mind our supported browser matrix https://confluence.atlassian.com/cloud/supported-browsers-744721663.html

<!--
Keep in mind our supported browser matrix https://confluence.atlassian.com/cloud/supported-browsers-744721663.html
If you raise a bug that is not in a supported version we will not be fixing it
-->

### Demo

<!--
Please provide a webpack bin to show the issue. Here is a boilerplate to help you get started:
https://www.webpackbin.com/bins/-Kr9aE9jnUeWlphY8wsw
Expand All @@ -31,7 +36,7 @@ If it is a visual bug, a video or a gif would be helpful also.
Issues without demo's may not be investigated
-->

<!--
<!--
Note: stale issues will be removed
When a maintainer asks a question about an issue and it is not responded to within a reasonable timeframe then the issue will be closed. We don't want this to happen - but we also do not want to accumulate stale issues
--->
265 changes: 208 additions & 57 deletions README.md

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions src/view/drag-handle/drag-handle-types.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import type { Position, Direction } from '../../types';

export type DragTypes = 'KEYBOARD' | 'MOUSE';
import type { Position, Direction, HTMLElement } from '../../types';

export type Callbacks = {|
onLift: (point: Position) => void,
onKeyLift: () => void,
onLift: ({ client: Position, isScrollAllowed: boolean }) => void,
onMove: (point: Position) => void,
onWindowScroll: (diff: Position) => void,
onMoveForward: () => void,
Expand All @@ -18,6 +15,8 @@ export type Callbacks = {|
export type Provided = {|
onMouseDown: (event: MouseEvent) => void,
onKeyDown: (event: KeyboardEvent) => void,
onTouchStart: (event: TouchEvent) => void,
onTouchMove: (event: TouchEvent) => void,

// Conditionally block clicks
onClick: (event: MouseEvent) => void,
Expand All @@ -43,10 +42,7 @@ export type Props = {|
// the direction of the current droppable
direction: ?Direction,
callbacks: Callbacks,
// get the ref of the draggable
getDraggableRef: () => ?HTMLElement,
children: (?Provided) => void,
|}

// Custom event format for force press inputs
export type MouseForceChangedEvent = MouseEvent & {
webkitForce?: number,
}
Loading