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

Issue 441233002: Merge navigation list and directory tree. (Closed)

Created:
6 years, 4 months ago by fukino
Modified:
6 years, 4 months ago
Reviewers:
yoshiki
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, yoshiki+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Merge navigation list and directory tree. This CL merges navigation list (the very left pane) and directory tree (middle pane). In the conbined tree, the first-level children are VolumeItem or ShortcutItem, which correspond to NavigationModelItem. Only Drive volume has children and the Drive volume. They are DirectoryItem and the behavior is similar to previous directory tree. BUG=390848, 397222 TEST=run browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287933

Patch Set 1 #

Total comments: 16

Patch Set 2 : Updates and adds comments. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+569 lines, -715 lines) Patch
M chrome/browser/chromeos/file_manager/file_manager_browsertest.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/copy_between_windows.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/file_display.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/folder_shortcuts.js View 9 chunks +19 lines, -26 lines 0 comments Download
D chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager/navigation_list.js View 1 chunk +0 lines, -88 lines 0 comments Download
M chrome/test/data/extensions/api_test/file_manager_browsertest/file_manager_test_manifest.json View 1 chunk +0 lines, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/css/file_manager.css View 5 chunks +13 lines, -5 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/directory_tree.js View 1 14 chunks +516 lines, -57 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_manager.js View 1 11 chunks +7 lines, -46 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_manager_commands.js View 3 chunks +10 lines, -23 lines 2 comments Download
M ui/file_manager/file_manager/foreground/js/file_transfer_controller.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/main_scripts.js View 1 chunk +0 lines, -1 line 0 comments Download
D ui/file_manager/file_manager/foreground/js/ui/navigation_list.js View 1 chunk +0 lines, -444 lines 0 comments Download
M ui/file_manager/file_manager/main.html View 3 chunks +1 line, -9 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
fukino
yoshiki san, could you take a look?
6 years, 4 months ago (2014-08-06 07:47:12 UTC) #1
yoshiki
lgtm with nits. https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js File ui/file_manager/file_manager/foreground/js/directory_tree.js (right): https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js#newcode89 ui/file_manager/file_manager/foreground/js/directory_tree.js:89: '<div class="tree-row">' + nit: 4 space ...
6 years, 4 months ago (2014-08-06 13:37:58 UTC) #2
fukino
Thank you very much for quick review! https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js File ui/file_manager/file_manager/foreground/js/directory_tree.js (right): https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js#newcode89 ui/file_manager/file_manager/foreground/js/directory_tree.js:89: '<div class="tree-row">' ...
6 years, 4 months ago (2014-08-06 20:39:26 UTC) #3
fukino
The CQ bit was checked by fukino@chromium.org
6 years, 4 months ago (2014-08-06 20:42:55 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fukino@chromium.org/441233002/20001
6 years, 4 months ago (2014-08-06 20:44:07 UTC) #5
commit-bot: I haz the power
Change committed as 287933
6 years, 4 months ago (2014-08-07 02:29:33 UTC) #6
yoshiki
Sorry for after-commit comments. https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js File ui/file_manager/file_manager/foreground/js/directory_tree.js (right): https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager/foreground/js/directory_tree.js#newcode1028 ui/file_manager/file_manager/foreground/js/directory_tree.js:1028: itemPromises.push(new Promise(function(resolve, reject) { On ...
6 years, 4 months ago (2014-08-07 04:16:02 UTC) #7
fukino
6 years, 4 months ago (2014-08-07 09:43:37 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager...
File ui/file_manager/file_manager/foreground/js/directory_tree.js (right):

https://codereview.chromium.org/441233002/diff/1/ui/file_manager/file_manager...
ui/file_manager/file_manager/foreground/js/directory_tree.js:1028:
itemPromises.push(new Promise(function(resolve, reject) {
On 2014/08/07 04:16:02, yoshiki wrote:
> On 2014/08/06 20:39:25, fukino wrote:
> > On 2014/08/06 13:37:58, yoshiki wrote:
> > > Please get "function(...) {}.bind()" out of loop. It creates new object
each
> > > calls and heavy.
> > 
> > With needs to capturing the modelItem, I coundn't find a good way to move
the
> > function outside... I'll ask you later about it, thanks! 
> 
> Suggested code is like this.
> 
> Before loop:
> var func = function(i) {
>  ...
> }.bind(this);
> 
> In the loop:
> new Promise(function(resolve, reject) {
>   func(i);
> });
> 
> 
> The key fact is that .bind() is much slower than capture-by-closure, so we
> should avoid to use it in loop. (cf. http://jsperf.com/f-p-bind-vs-closure)
> 
> But in this case, the loop number may be <100 times so we may not need to care
> about that. I think we can keep this code as it is.

Thank you for kind and clear explanation!
I didn't know the performance about Function.bind(), and now I've learned!
I'll pay attention more on the .bind() and avoid use it in loops.

https://codereview.chromium.org/441233002/diff/20001/ui/file_manager/file_man...
File ui/file_manager/file_manager/foreground/js/file_manager_commands.js
(right):

https://codereview.chromium.org/441233002/diff/20001/ui/file_manager/file_man...
ui/file_manager/file_manager/foreground/js/file_manager_commands.js:55: //
element are sub items in DirectoryTree.
On 2014/08/07 04:16:02, yoshiki wrote:
> I think the original comment (element is a sub item in DirectoryTree.) is
> correct.

Yes! I was wrong... I'll correct this comment in next CL.

Powered by Google App Engine
This is Rietveld 408576698