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

VERIFIED FIXED

Status

Firefox for Android Graveyard
General
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: mfinkle, Assigned: mfinkle)

Tracking

({perf, uiwanted})

Trunk
perf, uiwanted

Details

(Whiteboard: [mobilestartupshrink])

Attachments

(6 attachments, 6 obsolete attachments)

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]
(Assignee)

Updated

7 years ago
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.
Created attachment 566167 [details] [diff] [review]
Remove add-on recommendations from about:home

I did the icon myself. Need Ian to come up with some prettier.
Assignee: nobody → lucasr.at.mozilla
Attachment #566167 - Flags: review?(mark.finkle)
Created attachment 566168 [details]
Screenshot
Created attachment 566169 [details] [diff] [review]
Remove add-on recommendations from about:home

Remove the now unnecessary CSS bits.
Attachment #566167 - Attachment is obsolete: true
Attachment #566167 - Flags: review?(mark.finkle)
Attachment #566169 - Flags: review?(mark.finkle)
Created attachment 566191 [details] [diff] [review]
alternate - part 1

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
Created attachment 566192 [details] [diff] [review]
alternate - part 2

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.
Created attachment 566194 [details]
screenshot- alternate (no cache, just show button)

Show the UI with no cache file, just the button (applies to alt patches 1 and 2)
Created attachment 566196 [details]
screenshot- alternate (has cache, show button and add-ons)

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 :-)
Created attachment 566245 [details]
Mockup of addons menu tweak

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.
Created attachment 566423 [details]
screenshot- alternate (no cache, just show button)

Updated screenshot
Assignee: lucasr.at.mozilla → mark.finkle
Attachment #566194 - Attachment is obsolete: true
Created attachment 566424 [details]
screenshot- alternate (has cache, show button and add-ons)

Updated screenshot
Attachment #566196 - Attachment is obsolete: true
Created attachment 566425 [details] [diff] [review]
alternate - part 1 (v2)

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)
Created attachment 566426 [details] [diff] [review]
alternate - part 2 (v2)

Updated. Removed an unused arg
Attachment #566192 - Attachment is obsolete: true
Attachment #566426 - Flags: review?(lucasr.at.mozilla)

Updated

7 years ago
Attachment #566425 - Flags: review?(lucasr.at.mozilla) → review+

Updated

7 years ago
Attachment #566426 - Flags: review?(lucasr.at.mozilla) → review+
(Assignee)

Updated

7 years ago
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
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Attachment #566425 - Attachment is patch: true

Comment 20

7 years ago
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
(Assignee)

Updated

7 years ago
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.