Skip to content
This repository has been archived by the owner. It is now read-only.

Change sites from List to Map #5587

Merged
merged 2 commits into from Jan 28, 2017
Merged

Change sites from List to Map #5587

merged 2 commits into from Jan 28, 2017

Conversation

@darkdh
Copy link
Member

darkdh commented Nov 14, 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).

Test Plan:

fix #4879

Auditors: @bbondy, @bsclifton, @cezaraugusto

Test Plan:
Moved to #4879 (comment)

@@ -439,10 +439,15 @@ const handleAppAction = (action) => {
appState = appState.set('sites', siteUtil.addSite(appState.get('sites'), s, action.tag))
})
} else {
appState = appState.set('sites', siteUtil.addSite(appState.get('sites'), action.siteDetail, action.tag, action.originalSiteDetail))
let sites = appState.get('sites')
if (!action.siteDetail.get('folderId') && siteUtil.isFolder(action.siteDetail)) {

This comment has been minimized.

Copy link
@darkdh

darkdh Nov 14, 2016

Author Member

This is the root cause of last backed out
766722a#diff-23ca389e2bcb77191b5a9c10900eb3a3R443

@bsclifton
Copy link
Member

bsclifton commented Nov 14, 2016

Because this can cause issues with migrations, I wanted to propose a new data-structure for us to use in favor of the sites array and ask what everyone thinks?

We could still keep the migration code in there (so that it copies the old values over to the new structure), but instead of: appState.sites we could add a new field appState.siteMap. This way, there would be no impact to users if they downgrade. We'd then want to make sure that wiping history removes both the old/new fields too, of course

@bbondy
Copy link
Member

bbondy commented Nov 15, 2016

This needs to be rebased

@bbondy bbondy modified the milestones: 0.12.11, 0.12.10 release Nov 15, 2016
@bbondy
Copy link
Member

bbondy commented Nov 18, 2016

Still needs to be rebased, I'll move to 1.0

@bbondy bbondy modified the milestones: 1.0.0, 0.12.11, 0.13.2 Nov 18, 2016
@darkdh darkdh force-pushed the sites-refactor branch from bdecfdb to 0be2e3c Dec 5, 2016
@darkdh
Copy link
Member Author

darkdh commented Dec 5, 2016

rebased! but still looking for the cause of multi-select on bookmark manager failure

@luixxiul luixxiul added the perf label Dec 5, 2016
@darkdh darkdh force-pushed the sites-refactor branch 2 times, most recently from 2873ec9 to 9555a85 Dec 6, 2016
@darkdh
Copy link
Member Author

darkdh commented Dec 6, 2016

It's ready for review again

@darkdh darkdh force-pushed the sites-refactor branch 2 times, most recently from e3f4c76 to 5fdfdcb Dec 6, 2016
@darkdh darkdh modified the milestones: 0.13.1, 0.13.2 Dec 15, 2016
@posix4e
Copy link
Collaborator

posix4e commented Dec 21, 2016

@darkdh please rebase

@darkdh darkdh force-pushed the sites-refactor branch from 5fdfdcb to 07debeb Dec 21, 2016
@darkdh
Copy link
Member Author

darkdh commented Dec 21, 2016

@posix4e , rebasing complete!

@posix4e
Copy link
Collaborator

posix4e commented Dec 21, 2016

@darkdh sorry to be a bother but how was this tested?

@darkdh darkdh force-pushed the sites-refactor branch from 07debeb to 2241730 Dec 21, 2016
@darkdh darkdh force-pushed the sites-refactor branch from ba6cfde to 2368ac4 Jan 15, 2017
@luixxiul luixxiul removed the QA/required label Jan 15, 2017
@cezaraugusto
Copy link
Member

cezaraugusto commented Jan 18, 2017

@darkdh when you're done can you provide some bulk bookmark file as your STR suggested? Mine don't reach 300 😭

@darkdh
Copy link
Member Author

darkdh commented Jan 18, 2017

sent on slack 😄

Copy link
Member

cezaraugusto left a comment

Tested manually and everything worked as expected.
Noticed some delay regarding DnD for topSites on the new tab but root cause may be #6217.

However, webDriver tests didn't pass for me for sessionStore tests.

Update: Intermittent fail. Tested again and it worked.

Copy link
Member

cezaraugusto left a comment

Previous comment pointed to a failing on sessionStore test but tested again several times and seems like it was a one-timer (intermittent maybe). Otherwise LGTM ++

@bbondy
Copy link
Member

bbondy commented Jan 26, 2017

@darkdh I think this needs another rebase if you have time between C56 building.

fix #4879

Auditors: @bbondy, @bsclifton, @cezaraugusto

Test Plan:
Performance:
1. Import bulk bookmarks (4000+) from other browsers (Don't merge into
                                                      toolbar)
2. The process should finish instantly
3. Delete Import from XXX folder
4. The process should finish instantly

Migration:
1. Make sure session-store-1 contains the sites data before 0.12.10
2. Lauch Brave and Close
3. sites of session-store-1 should change from [] tp {}
@darkdh darkdh force-pushed the sites-refactor branch from 2368ac4 to 8a9b6c4 Jan 26, 2017
@darkdh
Copy link
Member Author

darkdh commented Jan 26, 2017

@bbondy, rebased 😄

@bbondy
Copy link
Member

bbondy commented Jan 28, 2017

++

@bbondy bbondy merged commit 6e9eb57 into master Jan 28, 2017
0 of 3 checks passed
0 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@luixxiul
Copy link
Contributor

luixxiul commented Jan 28, 2017

It's nice to see this finally merged 🎉

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

Successfully merging this pull request may close these issues.

6 participants
You can’t perform that action at this time.