argyleink / argyleink/gui-challenges

[Switch] The `dragEnd()` function needs to make sure the switch is in an allowed position

Open
#54 6 comments 0 reactions 0 assignees View on GitHub
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

![image](https://user-images.githubusercontent.com/145676/129221609-ff7c8135-2eed-4479-8fa3-6f1a6995dc11.png)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.