argyleink / argyleink/gui-challenges
[Switch] The `dragEnd()` function needs to make sure the switch is in an allowed position
- Dominant language
- HTML
- Stars
- 3k
- Forks
- 389
- PR merge metrics
- No merged PRs in 30d
Description
The `dragEnd()` function, triggered by `pointerup`, needs to make sure the switch is in an allowed position. Currently it is possible to drag the switch, then without releasing the finger drag outside of the switch so that the switch is in an "in-between" visual state, and then release the finger. https://github.com/argyleink/gui-challenges/blob/fd7753b97a630717ecbc4e3201641fc8ffa1ba12/switch/index.js#L37

Contributor guide
No contributing guide indexed for this repository
Research direction
Start in switch/index.js at the linked dragEnd() function and trace how pointerup leaves the switch in an in-between visual state when the pointer moves outside it. Reproduce the drag-outside-and-release case in the switch demo, then verify the switch always ends in an allowed position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100