Closed Bug 998906 Opened 10 years ago Closed 10 years ago

[Music] display an overlay when music is empty in picker mode

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

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

VERIFIED FIXED
2.1 S2 (15aug)
blocking-b2g -
Tracking Status
b2g-v2.0 --- verified
b2g-v2.1 --- verified

People

(Reporter: dkuo, Assigned: dkuo)

References

Details

(Keywords: regression)

Attachments

(4 files)

I was pinged on IRC by ranjith and thanks to him/her, we know when there is no song in music app's picker mode, no overlay was displayed and the empty list might confuses our users, we should fix this.
Hi Dominic,

Need your feedback on the proposed patch.
Attachment #8410029 - Flags: feedback?(dkuo)
Comment on attachment 8410029 [details] [diff] [review]
proposedpatch.patch

Review of attachment 8410029 [details] [diff] [review]:
-----------------------------------------------------------------

ranjith, apologize for being late to feedback this, I think the patch is good but need some adjustment, and after I look on it, I realized it's actually a regression, but it's great you found it and fixing it! after you modified the patch, feel free to ask review from me again, thanks!

::: apps/music/js/music.js
@@ +1242,5 @@
> +              }
> +              else {
> +                showOverlay('empty');
> +              }
> +            }

The check point of the enumeration is correct, but probably only check when the record is null, which means the enumeration is finished. Also, you should use showCorrectOverlay() to display the correct overlay, which does the same thing as your code here, and I think we can just copy/move the showCorrectOverlay() from update() to here then it should does its work.
Attachment #8410029 - Flags: feedback?(dkuo) → feedback+
Keywords: regression
(In reply to Dominic Kuo [:dkuo] from comment #2)
> Comment on attachment 8410029 [details] [diff] [review]
> proposedpatch.patch
> 
> Review of attachment 8410029 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ranjith, apologize for being late to feedback this, I think the patch is
> good but need some adjustment, and after I look on it, I realized it's
> actually a regression, but it's great you found it and fixing it! after you
> modified the patch, feel free to ask review from me again, thanks!
> 
> ::: apps/music/js/music.js
> @@ +1242,5 @@
> > +              }
> > +              else {
> > +                showOverlay('empty');
> > +              }
> > +            }
> 
> The check point of the enumeration is correct, but probably only check when
> the record is null, which means the enumeration is finished. Also, you
> should use showCorrectOverlay() to display the correct overlay, which does
> the same thing as your code here, and I think we can just copy/move the
> showCorrectOverlay() from update() to here then it should does its work.

Thanks for providing feedback,I think you have suggested two modification.

1. Check only when record is null, It means I need to move my check condition out of this 
    "if (this.dataSource.length === LIST_BATCH_SIZE || !record) " ?  I can do that .
2. I need to replace showOverlay() with showCorrectOverlay(), as you know this function shows overlay based on knownSongs.length.But knownSongs is not updated after enumeration, its done in showCurrentView() in this function we don't have callback support to show the current view. Due to this 
reason I was forced to call showOverlay().I will be very happy to see  any better approach from you.
ranjith, as we discussed on IRC, the calling sequence of how we check the dataSource/knownSongs was correct, but because the ListView cleaned the dataSource before every new enumeration, the knownSongs will point to the previous array, so we should set the length to 0 instead of assigning a new empty array to it, please check this patch and see if it works, and thanks for working on this!
(In reply to Dominic Kuo [:dkuo] from comment #4)
> Created attachment 8417215 [details] [review]
> patch - use showCorrectOverlay() to display the overlay
> 
> ranjith, as we discussed on IRC, the calling sequence of how we check the
> dataSource/knownSongs was correct, but because the ListView cleaned the
> dataSource before every new enumeration, the knownSongs will point to the
> previous array, so we should set the length to 0 instead of assigning a new
> empty array to it, please check this patch and see if it works, and thanks
> for working on this!


I have tested the patch it works fine.
I think you can take care of landing patch.
Update:

I am working on the integration tests for the patch and apologize for slow response to this bug.
Hi Dominic,

I have posted some of my comments on the PR can you address them ?
Flags: needinfo?(dkuo)
Hi ranjith, I haven't get time to revisit the patch, but I think you are correct about the dataSource, I should be able to address the issue next Monday and will let you know here, sorry about the slow response! (leaving the needinfo in case I forget this again...)
Remanding you about this issue.
Comment on attachment 8417215 [details] [review]
patch - use showCorrectOverlay() to display the overlay

Okay, I think I have added the necessary tests for this issue and ready for review, Jim, would you please review this? thanks.
Attachment #8417215 - Flags: review?(squibblyflabbetydoo)
Flags: needinfo?(dkuo)
Comment on attachment 8417215 [details] [review]
patch - use showCorrectOverlay() to display the overlay

Tests pass, and this looks reasonable, so r=me!
Attachment #8417215 - Flags: review?(squibblyflabbetydoo) → review+
Thanks Jim.

master: 67f0e561b524f1e80468e9536a65cd7db6fcb8cb
Assignee: nobody → dkuo
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Hi Jim

Please uplift these to v2.0 as well.

Thanks!
Flags: needinfo?(squibblyflabbetydoo)
I think we need approval to land this on v2.0, please read the rules in:
https://wiki.mozilla.org/Release_Management/B2G_Landing

I will request it in the next comment if people want this to be uplifted.
Flags: needinfo?(squibblyflabbetydoo)
Comment on attachment 8417215 [details] [review]
patch - use showCorrectOverlay() to display the overlay

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): regression.
[User impact] if declined: there is no info for the user if they don't have any songs when picking audio files from the Music app.
[Testing completed]: yes, with new integration tests added.
[Risk to taking this patch] (and alternatives if risky): low.
[String changes made]: none.
Attachment #8417215 - Flags: approval-gaia-v2.0?
Flags: in-testsuite+
Comment on attachment 8417215 [details] [review]
patch - use showCorrectOverlay() to display the overlay

I would not really block on this issue and we are past our deadline to approve non-blocking patches on 2.0 but making an exception here mainly as this is regression (so we may have a oem/carrier partner raise this in certification) and given the low risk.

Also adding verifyme for QA to help with verification here once this lands.
Attachment #8417215 - Flags: approval-gaia-v2.0? → approval-gaia-v2.0+
Thanks bajaj and Ryan!
[Blocking Requested - why for this release]:
I find the issue in 1.4,can we also launch the patch in 1.4?
blocking-b2g: --- → 1.4?
Flags: needinfo?(dkuo)
NI Wayne for 1.4 triage. Thanks!
Flags: needinfo?(wchang)
(In reply to jingmei.zhang from comment #21)
> [Blocking Requested - why for this release]:
> I find the issue in 1.4,can we also launch the patch in 1.4?

Release management should/will triage this, thanks.
Flags: needinfo?(dkuo)
I don't see this as a 1.4 blocker as it is already released, there is minimum to no user impact.
blocking-b2g: 1.4? → -
Flags: needinfo?(wchang)
This issue has been verified successfully on Flame2.0&2.1.
Reproducing rate: 0/5
See attachment: Verify_Flame_Music.mp4

STRs:
  Precondition:Thre is no music file in device.
1. Launch message,create a new SMS.
2. Tap attachment button, select "Music".
**It will switch to "Select a track" view.
3. Check this view.

Actual Result:
3. There is an overlay(Add songs to get started) in this view.

Flame2.0 build version:
Gaia-Rev        8d1e868864c8a8f1e037685f0656d1da70d08c06
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/c756bd8bf3c3
Build-ID        20141202000201
Version         32.0

Flame2.1 build version:
Gaia-Rev        ccb49abe412c978a4045f0c75abff534372716c4
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/18fb67530b22
Build-ID        20141202001201
Version         34.0
Status: RESOLVED → VERIFIED
Attached video Verify_Flame_Music.MP4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: