Closed Bug 1032829 Opened 8 years ago Closed 8 years ago

Smart Collection stop beeing added once the collection app has returned |false| (no user choice)


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

Not set


(blocking-b2g:2.0+, b2g-v2.0 verified, b2g-v2.1 verified)

2.0 S5 (4july)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- verified
b2g-v2.1 --- verified


(Reporter: vingtetun, Assigned: vingtetun)



(Whiteboard: [systemsfe])


(6 files, 1 obsolete file)

Step to reproduce:
 1. Long press on any empty part of the homescreen
 2. Choose 'Add Smart Collection'
 3. Once the list is displayd hit 'OK' without having choose any

 Repeat 1. and 2.

 4. Choose a collection this time

Actual result:
 - Nothing happens

Expected result:
 - The smart collection is added to the homescreen
Sounds definitively a blocker.
blocking-b2g: --- → 2.0?
Attached patch bug1032829.patch (obsolete) — Splinter Review
Assignee: nobody → 21
Attachment #8448745 - Flags: review?(kgrandon)
Blocks: 1015336
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking?]
Whiteboard: [systemsfe]
blocking-b2g: 2.0? → 2.0+
QA Whiteboard: [VH-FL-blocking-][VH-FC-blocking?] → [VH-FL-blocking-][VH-FC-blocking+]
Target Milestone: --- → 2.0 S5 (4july)
Comment on attachment 8448745 [details] [diff] [review]

Review of attachment 8448745 [details] [diff] [review]:

We need to call processPending, or update the state. Defaulting to an array is the easiest thing to do here. R+ assuming you do that.

::: apps/verticalhome/js/sources/collection.js
@@ +138,5 @@
>            this.inCreateActivity = false;
> +
> +          var ids = e.detail.ids;
> +          if (e.detail.ids === false) {
> +            break;

I am fairly positive that we want to call this.processPending() here. This should safeguard us against the super rare case where other sources can potentially create collections at the same time. I think we can potentially get into a strange case if we do not do this.

The problem is that we could continue to buffer collections into pendingCollections, and insertPosition is still defined. If calling processPending() breaks things, then we should fix that, or simply perform the necessary reset steps here. We could also potentially just default e.detail.ids to an array.
Attachment #8448745 - Flags: review?(kgrandon)
Attached patch bug1032829.patchSplinter Review
Kevin, is it what you are looking for ?
Attachment #8448745 - Attachment is obsolete: true
Attachment #8448792 - Flags: review?(kgrandon)
Comment on attachment 8448792 [details] [diff] [review]

Review of attachment 8448792 [details] [diff] [review]:

I didn't test it, but assuming this works yes, I think this is more safe. Thanks!
Attachment #8448792 - Flags: review?(kgrandon) → review+
Blocks: 1030700
This issue has been successfully verified on Flame v2.1&2.0.
See attachment: verified_1.png,verified_2.png and verified_3.png.
Reproduce rate: 0/5

1. Long press on any empty part of the homescreen
2. Choose 'Add Smart Collection'.
**See attch:verified_0.png and verified_1.png.
3. Once the list is displayd hit 'OK' without having choose any.
**There is no new collection added to homescreen
4. Repeat Step 1&2.
5. Choose a or more collections.
**The smart collection is added to the homescreen.See attch:verified_2.png and verified_3.png.

Flame 2.0 build:
Gaia-Rev        8d1e868864c8a8f1e037685f0656d1da70d08c06
Build-ID        20141204000228
Version         32.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141204.040425
FW-Date         Thu Dec  4 04:04:36 EST 2014
Bootloader      L1TC00011880

Flame 2.1 build:
Gaia-Rev        5655269098c7e82254e56933f1af05b4abe2a2f3
Build-ID        20141204001201
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  eng.cltbld.20141204.034958
FW-Date         Thu Dec  4 03:50:09 EST 2014
Bootloader      L1TC00011880
You need to log in before you can comment on or make changes to this bug.