Closed Bug 1215482 Opened 4 years ago Closed 4 years ago

Support new bookmarks_store format in TV

Categories

(Firefox OS Graveyard :: Sync, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S10 (30Oct)

People

(Reporter: mbdejong, Assigned: selee)

References

Details

(Whiteboard: [partner-cherry-pick])

Attachments

(2 files)

In bug 1215086 I changed the format of bookmarks_store to be:

{
  id: "http://mozilla.org/",
  url: "http://mozilla.org/",
  name: "Mozilla",
  fxsyncRecords: {
    zMgfGkRinh92 : {
      "id": "zMgfGkRinh92",
      "type": "bookmark",
      "title": "Mozilla",
      "parentName": "mobile",
      "bmkUri": "http://mozilla.org/",
      "tags": [],
      "keyword": null,
      "description": null,
      "loadInSidebar": false,
      "parentid": "mobile"
    }
  }
}

This replaces the sync_bookmarks_store.

We need to update [1] to deal with this new format.

[1] https://github.com/weilonge/gaia/blob/4d1ff2b17850c3ec3d9c6869b73e9a45e4338db4/tv_apps/browser/js/datasync/sync_ds_helper.js#L82
Assignee: nobody → mbdejong
Depends on: 1215086
Correction, the format will probably be:

{
  id: "http://mozilla.org/",
  url: "http://mozilla.org/",
  name: "Mozilla",
  fxsyncRecords: {
    zMgfGkRinh92 : {
      last_modified: 1444990424710,
      payload: {
        "id": "zMgfGkRinh92",
        "type": "bookmark",
        "title": "Mozilla",
        "parentName": "mobile",
        "bmkUri": "http://mozilla.org/",
        "tags": [],
        "keyword": null,
        "description": null,
        "loadInSidebar": false,
        "parentid": "mobile"
      }
    }
  }
}
Comment on attachment 8674848 [details] [review]
[gaia] michielbdejong:1215482-new-bookmarks_store-format > mozilla-b2g:master

I haven't tested this code yet, but wanted to ask you for some early feedback on the diff.
Attachment #8674848 - Flags: feedback?(selee)
Blocks: TV_FxAccount
Blocks: 1195647
Target Milestone: --- → FxOS-S10 (30Oct)
Priority: -- → P1
Assignee: mbdejong → selee
Comment on attachment 8674848 [details] [review]
[gaia] michielbdejong:1215482-new-bookmarks_store-format > mozilla-b2g:master

Hey Michiel, The overall idea is nice! We still need an iteration to update/add/remove records for IndexedDB based on the new bookmarks store. Thanks for this. :)
Attachment #8674848 - Flags: feedback?(selee) → feedback+
Comment on attachment 8676002 [details] [review]
[gaia] weilonge:seanlee/TVBrowser/master/Bug1215482 > mozilla-b2g:master

Hey Michiel,

Could you help to give the patch a feedback?
There are some duplicated changes with bug 1215086, and please ignore them.
The changes in this patch should be related to tv_apps only.
Thank you.
Attachment #8676002 - Flags: feedback?(mbdejong)
Comment on attachment 8676002 [details] [review]
[gaia] weilonge:seanlee/TVBrowser/master/Bug1215482 > mozilla-b2g:master

Hey Yifan,

Could you give the patch a feedback? Thank you~ :)
Attachment #8676002 - Flags: feedback?(yliao)
Attachment #8676002 - Flags: feedback?(mbdejong) → feedback+
Blocks: 1194091
Attachment #8676002 - Flags: feedback?(yliao) → review?(yliao)
Comment on attachment 8676002 [details] [review]
[gaia] weilonge:seanlee/TVBrowser/master/Bug1215482 > mozilla-b2g:master

Thanks for the help! LGTM.
Attachment #8676002 - Flags: review?(yliao) → review+
Whiteboard: [partner-cherry-pick]
You need to log in before you can comment on or make changes to this bug.