Closed Bug 1339520 Opened 9 years ago Closed 9 years ago

Improve topsites reload behaviour

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect, P1)

defect

Tracking

(firefox54 fixed)

RESOLVED FIXED
Firefox 54
Tracking Status
firefox54 --- fixed

People

(Reporter: ahunt, Assigned: ahunt)

Details

(Whiteboard: [MobileAS])

Attachments

(2 files)

If a page finishes loading, the history table is changed, and that currently results in Topsites reloading (both in old and AS topsites). That also means that the topsites pager returns to page 0. I'm wondering if: 1. Do we really need to reload topsites (in most cases, the ordering doesn't change - we do however need to reload in the case of pinning/removal/etc)? 2. Can we make our reload behaviour better. I.e. we shouldn't flicker individual topsites if they haven't changed. In most cases we also want to remain on the current page. (One exception: pinning a site might move it to a different page, and we probably want to follow the pinned site.) Making this a P2 until we decide on whether this should be part of the MVP.
Yeah, this is especially noticeable if sync is running in the background - then top sites are flickering for a couple of seconds.
It's flickering like mad during a sync, and looks very bad & unpolished. I'd say that fixing this in some way should most certainly be part of the MVP.
These patches improve things a lot - I don't have all that much sync data, so I'd be interested in knowing how well things behave when a larger load of history is added. In any case we don't flicker anymore, and topsites simply move around (and or disappear/appear if they've been removed/added/superceded). It's easiest to see the difference when pinning/unpinning a site.
Assignee: nobody → ahunt
Iteration: --- → 1.15
Priority: P2 → P1
Comment on attachment 8837855 [details] Bug 1339520 - Don't refresh topsites pages, only modify if needed https://reviewboard.mozilla.org/r/112846/#review114510 ::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/topsites/TopSitesPagerAdapter.java:33 (Diff revision 1) > > private int tiles; > private int tilesWidth; > private int tilesHeight; > > - private LinkedList<TopSitesPage> pages = new LinkedList<>(); > + private List<TopSitesPage> pages = new ArrayList<>(PAGES); nit: I wonder why we create the list here and not in the constructor. Let's move it maybe?
Attachment #8837855 - Flags: review?(s.kaspari) → review+
Comment on attachment 8837856 [details] Bug 1339520 - Keep existing TopPanel when cursor is swapped https://reviewboard.mozilla.org/r/112848/#review114512 Nice! ::: mobile/android/base/java/org/mozilla/gecko/home/activitystream/ActivityStream.java:55 (Diff revision 1) > > rv.setAdapter(adapter); > rv.setLayoutManager(new LinearLayoutManager(getContext())); > rv.setHasFixedSize(true); > + // Override item animations to avoid horrible topsites refreshing > + rv.setItemAnimator(adapter.getItemAnimator()); I wonder why this is a method in the adapter class? And it's more createItemAnimator() then a getter? But maybe just move it to a separate class?
Attachment #8837856 - Flags: review?(s.kaspari) → review+
Pushed by ahunt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48f725d09c7a Don't refresh topsites pages, only modify if needed r=sebastian https://hg.mozilla.org/integration/autoland/rev/c200a723f358 Keep existing TopPanel when cursor is swapped r=sebastian
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Summary: Evaluate topsites reload behaviour → Improve topsites reload behaviour
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: