Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Refactoring, Bug fixes, and tests for top sites on about:newtab #5583

Merged
merged 3 commits into from
Nov 14, 2016
Merged

Refactoring, Bug fixes, and tests for top sites on about:newtab #5583

merged 3 commits into from
Nov 14, 2016

Conversation

bsclifton
Copy link
Member

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Bookmarking items does not affect position
Fixes #5413

Sites are ordered by most visited (count) DESC
Fixes #5322

Groundwork laid for #5565,
but the task is unfinished as-is.


notes

These commits moving existing logic from newtab.js into the session helper.
Tests were then added and I manually tested each scenario and tried to make
sure tests cover those. Things which are not covered are marked with TODO(bsclifton)

The important thing:
appState.about.newtab.sites no longer persists a separate copy of the sites array.
It instead uses the location/partion of items saved to lookup the real object from appState.sites.

Known issue: ignoring sites does not work properly (we can hide the button as a quick fix or I can resolve before we accept this PR)

Even without de-duping, this patch may get us in good enough shape to ship 0.12.9 😄


Auditors: @cezaraugusto, @bbondy

Bookmarking items does not affect position
Fixes #5413

Sites are ordered by most visited (count) DESC
Fixes #5322

Groundwork laid for #5565,
but the task is unfinished as-is.

-----
These commits moving existing logic from newtab.js into the session helper.
Tests were then added and I manually tested each scenario and tried to make
sure tests cover those. Things which are not covered are marked with  TODO(bsclifton)

The important thing:
appState.about.newtab.sites no longer persists a separate copy of the sites array.
It instead uses the location/partion of items saved to lookup the real object from appState.sites.
-----

Auditors: @cezaraugusto, @bbondy
Last remaining known issue(s):
1. ignoring sites
  - pin some items (position 1, position 5)
  - ignore by hitting X on item 2 or 3
  - items become unpinned :(
2. default top sites
  - we need to populate this (like we talked about)
  - brave.com, etc
@bsclifton
Copy link
Member Author

If possible, grab this code and give it a go 😄 Let's find any bugs! I documented two known issues in last commit

@bbondy
Copy link
Member

bbondy commented Nov 14, 2016

++ I'm going to merge and test on master but we can iterate from there for things.

@luixxiul
Copy link
Contributor

Please specify QA steps if any.

@cezaraugusto
Copy link
Contributor

cezaraugusto commented Nov 14, 2016

#5413 still an issue and improvements here made a regression for #5337. Reopening both.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants