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

fix sync bookmarks hierarchy #8088

Merged
merged 1 commit into from
Apr 5, 2017
Merged

fix sync bookmarks hierarchy #8088

merged 1 commit into from
Apr 5, 2017

Conversation

diracdeltas
Copy link
Member

@diracdeltas diracdeltas commented Apr 5, 2017

fix #7971

Test Plan:

  1. open pyramid 0, enable sync
  2. bookmark bing.com
  3. create a folder
  4. move the bing bookmark into the folder
  5. open pyramid 1, sync it to pyramid 0
  6. a folder should appear in pyramid 1 with bing inside the folder
  • 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).

this should probably be merged after #8073 which fixes some tests

@diracdeltas diracdeltas added this to the 0.14.2 milestone Apr 5, 2017
@diracdeltas diracdeltas requested a review from ayumi April 5, 2017 18:49
Copy link
Contributor

@ayumi ayumi left a comment

Choose a reason for hiding this comment

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

sweet, test plan works.

i tried to address folderIds not set in #8073 however it assumes the records are properly ordered (folders sent first so they get made first). i like this PR's approach of setting all the folderIds on a batch in a first pass because it's safer.

(as a result of the above there's a minor merge conflict which can be superseded by this one)

merge after 8073 ?

@@ -303,16 +304,30 @@ module.exports.getObjectById = (objectId, category, appState) => {
* Given an bookmark folder objectId, find the folder and return its folderId.
* @param {Immutable.List} objectId
* @param {Immutable.Map=} appState
* @param {Immutable.List=} records
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: maybe clarify it's a batch of records possibly not yet applied.

Copy link
Member Author

Choose a reason for hiding this comment

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

fix #7971

Test Plan:
1. open pyramid 0, enable sync
2. bookmark bing.com
3. create a folder
4. move the bing bookmark into the folder
5. open pyramid 1, sync it to pyramid 0
6. a folder should appear in pyramid 1 with bing inside the folder
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fixed Sync losing hierarchy when adding bookmarks to new sync members
3 participants