Closed Bug 1115326 Opened 10 years ago Closed 10 years ago

[Flame][Homescreen]Smart collections icon will be stuck, when we tap and long press it as soon as thought.

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.2+, b2g-v2.1 affected, b2g-v2.2 verified, b2g-master verified)

VERIFIED FIXED
2.2 S5 (6feb)
blocking-b2g 2.2+
Tracking Status
b2g-v2.1 --- affected
b2g-v2.2 --- verified
b2g-master --- verified

People

(Reporter: jihao, Assigned: cwiiis)

Details

(Whiteboard: [systemsfe])

Attachments

(3 files)

Attached video no_disappear.3gp
[1.Description]:
[Flame][v2.1&2.2][Homescreen]Smart collections icon will be stuck, when we tap and long press it as soon as thought.
Attachment: logcat_flame_1057.txt and no_disappear.3gp
Occurrence time: 10:57

[2.Testing Steps]: 
1. Go to homescreen.
2. Tap any one smart collections and long press it as quick as thought.
3. Tap Home/x button and the user will enter edit page.
4. Tap Home/Done button.

[3.Expected Result]: 
3. The smart collections icon is active.
4.Device will come back to homescreen.

[4.Actual Result]: 
3. The smart collections icon is stuck.
4. We can't come back homescreen and stay on Edit page.

[5.Reproduction build]:
Flame 2.1 Build:
Gaia-Rev        17c7ad2e4919a994f0844239b483116090412dee
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/39dfb662c82a
Build-ID        20141223001203
Version         34.0

Flame 2.2 Build:
Gaia-Rev        c2da2bafd4e809317e2ca70c9bf5c11136a32818
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/0532f2509f3f
Build-ID        20141223010202
Version         37.0a1

[6.Reproduction Frequency]: 
occasionally Recurrence,5/10
TCID: Free Test

[7.Other note]:
Tap smart collections icon or press Power button twice,we can come back to homescreen.
Attached file logcat_flame_1057.txt
Hi Christian, Could you take a look at this, the first tapping activates the smart connection, the long tapping activates the edit mode, and after dismiss the smart connection, the "Done" button in edit mode is not working, thanks
Flags: needinfo?(accounts)
blocking-b2g: --- → 2.2?
Whiteboard: [systemsfe]
blocking-b2g: 2.2? → 2.2+
Assignee: nobody → chrislord.net
Status: NEW → ASSIGNED
heh, nice find - looks like we just need to stop edit-mode being activated after launching an app.
(In reply to Chris Lord [:cwiiis] from comment #4)
> Created attachment 8555247 [details] [review]
> Don't allow entering edit mode when launching a collection

Some notes about this; unfortunately when launching a collection, you don't get the visibilitychange event - I assume because it's an activity rather than a fully-fledged app. We also didn't do our launch de-bouncing for collections. This patch fixes it by adding that (with a shorter timeout than the app de-bounce), and grid_dragdrop.js swallowing the event, but not entering edit mode if it receives a contextmenu event while an app is launching.

This does also mean that you won't be able to enter edit mode after launching an app, but I think this is fine - only the most pathological case would feel weird (pathological case = an app takes 3 seconds before the launching animation even starts and you decide you want to do some editing in that time).

The reason the timeout is shorter for collections, is that 1- they're a known quantity and should launch fast, but more 2- because you don't get the visibilitychange event, we can't know that we've actually launched or closed the collection. We could listen to the collection-close event, but I imagine there are situations where a collection can close without firing that event, so I figured a shorter timeout works well enough (1.5 seconds is more than enough time for the collection to launch, but not so long that if you launched it an immediately closed it, you could do that in under 1.5 seconds).
Comment on attachment 8555247 [details] [review]
Don't allow entering edit mode when launching a collection

Left a comment on github, but this lgtm!
Attachment #8555247 - Flags: review?(kgrandon) → review+
Comment on attachment 8555247 [details] [review]
Don't allow entering edit mode when launching a collection

Changed to use collection-launch/close signals. Not much different, but would appreciate a quick glance just in case.
Attachment #8555247 - Flags: review+ → review?(kgrandon)
Comment on attachment 8555247 [details] [review]
Don't allow entering edit mode when launching a collection

I think I like this better? Not sure, but nice job regardless!
Attachment #8555247 - Flags: review?(kgrandon) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/945776c62eee22a5541ea8d36ac916d12a42b216
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8555247 [details] [review]
Don't allow entering edit mode when launching a collection

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #):
[User impact] if declined: Homescreen can get stuck if you enter a collection and quickly long-press it before the collection appears
[Testing completed]: Manual and automated
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: None
Attachment #8555247 - Flags: approval-gaia-v2.2?
Target Milestone: --- → 2.2 S5 (6feb)
Attachment #8555247 - Flags: approval-gaia-v2.2? → approval-gaia-v2.2+
This issue is verified fixed on Flame 2.2 and Master.

Result: Tapping and long-pressing a smart collection before the app launches do not enable the edit mode.
 
Device: Flame 2.2 (319mb, full flash)
Build ID: 20150206002505
Gaia: a52999ce7f783177deb17e267bf003a53e6fde06
Gecko: 01446d5231ef
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 37.0a2 (2.2)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37

Device: Flame Master (319mb, full flash)
Build ID: 20150206010204
Gaia: 94af4b42d2ace6c9f38f31de77240604fac68af1
Gecko: 7c5f187b65bf
Gonk: e7c90613521145db090dd24147afd5ceb5703190
Version: 38.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:38.0) Gecko/38.0 Firefox/38.
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
Flags: needinfo?(accounts)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: