Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Issue 2670473002: [MD Bookmarks] Implement adding folders and bookmarks from toolbar menu. (Closed)

Created:
3 years, 10 months ago by angelayang
Modified:
3 years, 10 months ago
Reviewers:
tsergeant, calamity, jiaxi
CC:
chromium-reviews, vitalyp+closure_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, jlklein+watch-closure_chromium.org, dbeam+watch-closure_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD Bookmarks] Implement adding folders and bookmarks from toolbar menu. BUG=658980 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 : Add node menu and tests. #

Total comments: 6

Patch Set 2 : Fix store to insert node instead of push and update tests. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -3 lines) Patch
M chrome/browser/resources/md_bookmarks/compiled_resources2.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/md_bookmarks/folder_node.html View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/md_bookmarks/folder_node.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/md_bookmarks/store.js View 1 5 chunks +35 lines, -0 lines 1 comment Download
M chrome/browser/resources/md_bookmarks/toolbar.html View 3 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/resources/md_bookmarks/toolbar.js View 1 3 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/data/webui/md_bookmarks/store_test.js View 1 1 chunk +23 lines, -0 lines 0 comments Download
M components/bookmark_component_strings.grdp View 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
angelayang
CL that implements adding folder and bookmark. https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js#newcode337 chrome/browser/resources/md_bookmarks/store.js:337: var parent ...
3 years, 10 months ago (2017-02-08 07:34:03 UTC) #5
jiaxi
https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js#newcode337 chrome/browser/resources/md_bookmarks/store.js:337: var parent = this.idToNodeMap_[bookmarkNode.parentId || null]; On 2017/02/08 07:34:03, ...
3 years, 10 months ago (2017-02-09 01:13:12 UTC) #6
jiaxi
https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js#newcode338 chrome/browser/resources/md_bookmarks/store.js:338: this.push(parent.path + '.children', bookmarkNode); Take a second thought, Polymer's ...
3 years, 10 months ago (2017-02-09 01:20:24 UTC) #7
angelayang
I made changes in regards to Charlotte's suggestions :) https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2670473002/diff/20001/chrome/browser/resources/md_bookmarks/store.js#newcode337 chrome/browser/resources/md_bookmarks/store.js:337: ...
3 years, 10 months ago (2017-02-09 03:12:24 UTC) #8
jiaxi
3 years, 10 months ago (2017-02-09 04:09:45 UTC) #9
https://codereview.chromium.org/2670473002/diff/60001/chrome/browser/resource...
File chrome/browser/resources/md_bookmarks/store.js (right):

https://codereview.chromium.org/2670473002/diff/60001/chrome/browser/resource...
chrome/browser/resources/md_bookmarks/store.js:342:
BookmarksStore.generatePaths(parent, 0);
The index inside the tree doesn't get updated properly here.

Suppose a children array:
[{id:1, index:0}, {id:2, index:1}]

after splice:
[{id:1, index:0}, {id:3, index:1}, {id:2, index:1}]

This is because Polymer doesn't know the rest of the BookmarkTreeNode changed as
well. Use getSubTree to update the index would be nice. (We still need to use
splice to let Polymer know the tree has a new element tho)

Powered by Google App Engine
This is Rietveld 408576698