Skip to content
This repository has been archived by the owner on Dec 11, 2019. 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 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)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@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 Compare December 6, 2016 09:13
@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 Compare December 7, 2016 07:11
@darkdh darkdh modified the milestones: 0.13.1, 0.13.2 Dec 15, 2016
@posix4e
Copy link
Contributor

posix4e commented Dec 21, 2016

@darkdh please rebase

@darkdh
Copy link
Member Author

darkdh commented Dec 21, 2016

@posix4e , rebasing complete!

@posix4e
Copy link
Contributor

posix4e commented Dec 21, 2016

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

@darkdh darkdh force-pushed the sites-refactor branch 2 times, most recently from ba6cfde to 2368ac4 Compare January 15, 2017 13:57
@cezaraugusto
Copy link
Contributor

@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
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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
@luixxiul
Copy link
Contributor

It's nice to see this finally merged 🎉

@bsclifton bsclifton deleted the sites-refactor branch January 30, 2017 22:10
@darkdh darkdh mentioned this pull request Feb 1, 2017
4 tasks
@luixxiul luixxiul removed the needs-info Another team member needs information from the PR/issue opener. label Feb 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

long hang on Firefox import
6 participants