Closed Bug 689692 Opened 9 years ago Closed 8 years ago

Remove 'Recommended Add-ons' section on about:home

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

(Keywords: perf, uiwanted, Whiteboard: [mobilestartupshrink])

Attachments

(6 files, 6 obsolete files)

The home page (about:home) loads two sections from JSON files: Tabs from last time; and Recommended Add-ons

On phones with slow file systems, reading the data from these two files can make the pageload appear to hang. I saw this on several Galaxy S and Droid Pro phones.

The recommended add-ons section has a throbber spinning too. Throbbers are not free either.

In an effort to reduce reading from files and hanging the about:home load, I want to remove the 'Recommended Add-ons' section completely and replace it with a simple 'Get Add-ons' button. When tapped, the button would open the Add-ons Manager, moving the 'Get Add-ons' section into view.
Keywords: perf, uiwanted
OS: Linux → All
Hardware: x86 → All
Whiteboard: [mobilestartupshrink]
Duplicate of this bug: 693391
> The home page (about:home) loads two sections from JSON files: Tabs from last time; and Recommended 
> Add-ons

I'm pretty surprised this is coming from a file.  It hangs for many seconds before showing anything.  But maybe it's competing with other I/O?
(In reply to Justin Lebar [:jlebar] from comment #2)
> > The home page (about:home) loads two sections from JSON files: Tabs from last time; and Recommended 
> > Add-ons
> 
> I'm pretty surprised this is coming from a file.  It hangs for many seconds
> before showing anything.  But maybe it's competing with other I/O?

If the cache file does not exist, we wait 6 seconds after the page load and then pull from AMO, saving the data to a file. Once the file exists, we pull from it.

Some phones, like the Samsung Galaxy S and old Galaxy Tab, have very slow file systems.
I did the icon myself. Need Ian to come up with some prettier.
Assignee: nobody → lucasr.at.mozilla
Attachment #566167 - Flags: review?(mark.finkle)
Attached image Screenshot
Remove the now unnecessary CSS bits.
Attachment #566167 - Attachment is obsolete: true
Attachment #566167 - Flags: review?(mark.finkle)
Attachment #566169 - Flags: review?(mark.finkle)
Attached patch alternate - part 1 (obsolete) — Splinter Review
I had started this too and went a bit differently.

This alternate patch re-themes the look a little. The main removal here is the animated throbber, which did two things:
* Chewed up some resources by being animated
* Made people think the page was not loaded since a throbber was spinning
Attached patch alternate - part 2 (obsolete) — Splinter Review
This patch builds on the first part. It removes the code that starts an AMO pull of add-on data if no cache file is found. As long as no cache exists, the UI just looks like a button. Once a cache is created, and it will be sometime after starting the app as part of an AMO update check, the UI will load from the cace and show some add-ons.
Show the UI with no cache file, just the button (applies to alt patches 1 and 2)
If we have a cache, shows the button and the add-ons. (applies to part 1 and part 2)
Comment on attachment 566169 [details] [diff] [review]
Remove add-on recommendations from about:home

Let's get Madhava to weigh in here. We might want to use the "button" text and ">" from my patch. We might also want to keep this for tablets, which will have their own impl of about:home.

If we don't want to keep this for tablets, you could also remove the code that makes the "recommended-addons.json" cache, found here:
http://mxr.mozilla.org/mozilla-central/source/mobile/components/AddonUpdateService.js#160

And remove the code to clear the cache after an add-on install, found here:
http://mxr.mozilla.org/mozilla-central/source/mobile/chrome/content/extensions.js#1106
FWIW, I actually prefer Mark's solution than mine :-)
I like Mark's solution, too. 

Let's just tweak the visual design a bit, so that the add-ons list is the same width as the header, and tweak the button to look more like a header when there are items underneath.
Updated screenshot
Assignee: lucasr.at.mozilla → mark.finkle
Attachment #566194 - Attachment is obsolete: true
Updated screenshot
Attachment #566196 - Attachment is obsolete: true
This might be useful if the new Java app has a home screen. Updated to Ian's request.
Attachment #566191 - Attachment is obsolete: true
Attachment #566425 - Flags: review?(lucasr.at.mozilla)
Updated. Removed an unused arg
Attachment #566192 - Attachment is obsolete: true
Attachment #566426 - Flags: review?(lucasr.at.mozilla)
Attachment #566425 - Flags: review?(lucasr.at.mozilla) → review+
Attachment #566426 - Flags: review?(lucasr.at.mozilla) → review+
Duplicate of this bug: 694004
https://hg.mozilla.org/mozilla-central/rev/b2f573afd17e
https://hg.mozilla.org/mozilla-central/rev/1ce312b50d30

Notes for QA (and others): This code will not remove the add-ons section completely. It means that most of the time you will just see: screenshot- alternate (no cache, just show button)

We are very lazy about building the recommended add-ons cache. Depending on how you open and close Firefox, it might take several runs to get the cache built. When it is built, you'll see: screenshot- alternate (has cache, show button and add-ons)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Attachment #566425 - Attachment is patch: true
Retested bug with:
Mozilla/5.0(Android; Linux armv7l; rv:10.0a1) Gecko/20111014 Firefox/10.0a1 Fennec/10.0a1
Device: Motorola DROID 2 (Android 2.3)

"Add-ons for your Nightly" button is displayed in about:home. ("Recommended Add-ons" is no longer displayed.)

Marking bug as verified.
Status: RESOLVED → VERIFIED
Attachment #566169 - Attachment is obsolete: true
Attachment #566169 - Flags: review?(mark.finkle)
You need to log in before you can comment on or make changes to this bug.