[Stingray] Enqueue card swapping request during swapping

RESOLVED FIXED

Status

Firefox OS
Gaia::TV::Home
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: dwi2, Assigned: dwi2)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ft:conndevices][partner-interest])

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
This is a follow-up of bug 1130701. 
When user hit left/right key too frequently in edit mode, we will ignore those event if we are busy in processing card swapping.

However, instead of ignoring this event, we should further improve user experience by enqueuing event and process them when card manager is no longer busy.
(Assignee)

Updated

4 years ago
Blocks: 1105935
(Assignee)

Updated

3 years ago
Assignee: nobody → tzhuang
Created attachment 8583582 [details] [review]
[gaia] dwi2:bug1130964 > mozilla-b2g:master
(Assignee)

Comment 2

3 years ago
Comment on attachment 8583582 [details] [review]
[gaia] dwi2:bug1130964 > mozilla-b2g:master

Hi Rex,

Please help to review this patch. Thanks

We introduce a 'swapQueue' in edit.js now. It enqueues all 'onMove' actions in it. And we start consuming these 'onMove' when there is no ongoing animation. 

Also, we let scrollable to emit 'nodeTransformEnd' event to notify when animation ends, which is actually based on 'transmissionend' event. However, 'transmissionend' event could be cancelled in some circumstance, we also have a _swapTimer to handle the case when 'nodeTransformEnd' ('transmissionend') is not emitted.
Attachment #8583582 - Flags: review?(rexboy)
Comment on attachment 8583582 [details] [review]
[gaia] dwi2:bug1130964 > mozilla-b2g:master

Looks good to me.
Attachment #8583582 - Flags: review?(rexboy) → review+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [ft:conndevices] → [ft:conndevices][partner-interest]
You need to log in before you can comment on or make changes to this bug.