Closed Bug 817259 Opened 12 years ago Closed 12 years ago

ftuStarting not removed from screen.class

Categories

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

defect
Not set
normal

Tracking

(b2g18 fixed)

RESOLVED FIXED
Tracking Status
b2g18 --- fixed

People

(Reporter: myk, Assigned: myk)

References

()

Details

Attachments

(1 file)

There are four conditions under which the FTU is skipped, but the ftuStarting class is only removed from the screen for one of them, which causes visual (and behavioral?) glitches when the FTU is skipped for one of the other reasons.

(I found this because Firefox OS Simulator unsets ftu.manifestURL in order to skip the FTU when B2G is run in the Simulator, which causes those glitches to appear, since ftuStarting never gets removed in that case.)

ftuStarting should be removed from the screen if the FTU is skipped for any reason.  Here's a patch that does that.
Attachment #687364 - Flags: review?(etienne)
Comment on attachment 687364 [details] [diff] [review]
patch v1: removes ftuStarting if FTU is skipped for any reason

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

Thanks for the fix!

::: apps/system/js/window_manager.js
@@ +779,4 @@
>    // reference to the app and launch it.
>    function retrieveFTU() {
>      window.asyncStorage.getItem('ftu.enabled', function getItem(launchFTU) {
> +      document.getElementById('screen').classList.add('ftuStarting');

Probably no harm in keeping this line in place...
Attachment #687364 - Flags: review?(etienne) → review+
Comment on attachment 687364 [details] [diff] [review]
patch v1: removes ftuStarting if FTU is skipped for any reason

Potential developer blocker, safe change.
Attachment #687364 - Flags: approval-gaia-master?(21)
As FTU has been developed mostly by Borja and Fernando, I'd suggest they review this patch and further patches for FTU
Comment on attachment 687364 [details] [diff] [review]
patch v1: removes ftuStarting if FTU is skipped for any reason

This is not really a patch for FTU, it's a flaw in the logic that determines whether or not to start the FTU, and almost none of that code is written by Borja and Fernando.  See the blame for lines 778-810 in window_manager.js <https://github.com/mozilla-b2g/gaia/blame/master/apps/system/js/window_manager.js> for the details.

Nevertheless, Borja did write the one line of code in that block that caused the regression, so requesting feedback from him on this fix.

Borja: note that moving that line isn't strictly necessary, as Etienne notes in comment 1.  However, it does align the addition of ftuStarting with its removal, making it so the class is added in all of the four cases in which it's also removed early because the FTU doesn't end up starting.
Attachment #687364 - Flags: feedback?(fbsc)
(In reply to Myk Melez [:myk] [@mykmelez] from comment #4)
> However, it does align the addition of ftuStarting with its
> removal, making it so the class is added in all of the four cases in which
> it's also removed early because the FTU doesn't end up starting.

Good point, now I like it, please keep it this way :)
Comment on attachment 687364 [details] [diff] [review]
patch v1: removes ftuStarting if FTU is skipped for any reason

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

I have seen a very annoying bug where there is no status bar and I have been told this is the root cause. a+.
Attachment #687364 - Flags: approval-gaia-master?(21) → approval-gaia-master+
I don't have commit privileges to the Gaia repository.  Could someone merge pull 6770 <https://github.com/mozilla-b2g/gaia/pull/6770> on my behalf?
https://github.com/mozilla-b2g/gaia/commit/b0e12772116ba00c78a9727b59059712198f62e3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment #687364 - Flags: feedback?(fbsc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: