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

Fix drag and drop for about:newtab (and other fixes) #5354

Merged
merged 2 commits into from
Nov 2, 2016
Merged

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Nov 2, 2016

  • 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).

Fix drag-n-drop for topSites grid
Fixes #5336

Also includes optimizations / small bug fixes:

  • Remove duplicates from pinned sites before binding to state (corrupt state could cause a problem)
  • Prevent unnecessary state updates (frame.js => newtab.js and while dragging)
  • handle null sites array (default to new list)
  • updated the unique detecting logic for newVisitedSites

Auditors: @cezaraugusto @bbondy

bsclifton and others added 2 commits November 2, 2016 10:34
- Remove duplicates from pinned sites before binding to state
- Prevent unnecessary state updates (frame.js => newtab.js and while dragging)
- handle null sites array (default to new list)
- updated the unique detecting logic for newVisitedSites
Fixes #5336

Auditors: @bsclifton

Test Plan:

* Copy/paste this file to session-store-1: https://raw.githubusercontent.com/cezaraugusto/brave-json/master/newtab-3-rows.json
* Check that now we have 18 tiles on our grid
* Randomly drag tiles and check that it can be dropped on any position
* Open a new new tab and ensure items keep their previous indexes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

about:newtabs - drag and drop not working for Top Sites items
4 participants