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

Issue 15643006: Files.app: Added DragSelector class. (Closed)

Created:
7 years, 6 months ago by hirono
Modified:
7 years, 6 months ago
Reviewers:
mtomasz, yoshiki
CC:
chromium-reviews, rginda+watch_chromium.org, arv+watch_chromium.org, dcheng
Visibility:
Public.

Description

Files.app: Added DragSelector class. DragSelector class enables user to select multiple files by dragging. By calling DragSelector#startDragSelection(event), drag selection is started. DragSelector class added handlers of mouse events, shows drag handler and selects files by the mouse operation. In order to call startDragSelection, users of DragSelector class must handle 'dragStart' event of the list and decide whether to call startDragSelection or not according to the event. (e.g. whether the start point is hit to background of the list or not) If the drag selection is started with modifier keys (shift or ctrl), DragSelector stores the selection state at the beginning of drag selection. If an item included in drag handle once and then it is get out of the handler, the selection state of the item is restored by the stored initial selection state. BUG=224832 TEST=Added a call of startDragSelection to FileTransferManager, and do drag operation on the file list. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203913

Patch Set 1 #

Total comments: 38

Patch Set 2 : Addressed comment. #

Total comments: 6

Patch Set 3 : Addressed comments. #

Total comments: 17

Patch Set 4 : Fixed comments #

Patch Set 5 : Addressed Yoshiki's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -1 line) Patch
M chrome/browser/resources/file_manager/css/file_manager.css View 1 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/browser/resources/file_manager/js/drag_selector.js View 1 2 3 4 1 chunk +223 lines, -0 lines 0 comments Download
M chrome/browser/resources/file_manager/js/main_scripts.js View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/resources/file_manager/main_new_ui.html View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
hirono
Could you check this CL to add new class for drag selection? The call of ...
7 years, 6 months ago (2013-05-31 07:45:47 UTC) #1
mtomasz
On 2013/05/31 07:45:47, hirono wrote: > Could you check this CL to add new class ...
7 years, 6 months ago (2013-05-31 08:15:22 UTC) #2
mtomasz
https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css File chrome/browser/resources/file_manager/css/file_manager.css (right): https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css#newcode1024 chrome/browser/resources/file_manager/css/file_manager.css:1024: border-radius: 0; border-radius: 0 redundant? https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css#newcode1026 chrome/browser/resources/file_manager/css/file_manager.css:1026: padding: 0; ...
7 years, 6 months ago (2013-05-31 08:15:31 UTC) #3
hirono
On 2013/05/31 08:15:31, mtomasz wrote: > https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css > File chrome/browser/resources/file_manager/css/file_manager.css (right): > > https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css#newcode1024 > ...
7 years, 6 months ago (2013-06-03 04:40:01 UTC) #4
hirono
https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css File chrome/browser/resources/file_manager/css/file_manager.css (right): https://codereview.chromium.org/15643006/diff/1/chrome/browser/resources/file_manager/css/file_manager.css#newcode1024 chrome/browser/resources/file_manager/css/file_manager.css:1024: border-radius: 0; On 2013/05/31 08:15:31, mtomasz wrote: > border-radius: ...
7 years, 6 months ago (2013-06-03 04:40:33 UTC) #5
mtomasz
> Works super smooth, i like it! Mostly nits. Besides, when dragging outside of > ...
7 years, 6 months ago (2013-06-03 07:41:14 UTC) #6
hirono
Fixed. Thank you very much! https://codereview.chromium.org/15643006/diff/9003/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/9003/chrome/browser/resources/file_manager/js/drag_selector.js#newcode97 chrome/browser/resources/file_manager/js/drag_selector.js:97: if (!event.modifiers & Event.SHIFT_MASK ...
7 years, 6 months ago (2013-06-03 08:19:30 UTC) #7
mtomasz
awesome! lgtm with some nits! https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js#newcode176 chrome/browser/resources/file_manager/js/drag_selector.js:176: // flag may be ...
7 years, 6 months ago (2013-06-04 01:01:21 UTC) #8
hirono
Fixed. Thank you! https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js#newcode176 chrome/browser/resources/file_manager/js/drag_selector.js:176: // flag may be one of ...
7 years, 6 months ago (2013-06-04 01:08:08 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hirono@chromium.org/15643006/30001
7 years, 6 months ago (2013-06-04 01:08:25 UTC) #10
yoshiki
https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js#newcode46 chrome/browser/resources/file_manager/js/drag_selector.js:46: this.lastSelection_ = null; nit: I think it is better ...
7 years, 6 months ago (2013-06-04 01:16:00 UTC) #11
yoshiki
https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js#newcode145 chrome/browser/resources/file_manager/js/drag_selector.js:145: var itemMetrics = this.target_.getHeightsForIndex_(i); On 2013/06/04 01:16:01, yoshiki wrote: ...
7 years, 6 months ago (2013-06-04 01:50:42 UTC) #12
hirono
Fixed. Thank you! https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js File chrome/browser/resources/file_manager/js/drag_selector.js (right): https://codereview.chromium.org/15643006/diff/23001/chrome/browser/resources/file_manager/js/drag_selector.js#newcode46 chrome/browser/resources/file_manager/js/drag_selector.js:46: this.lastSelection_ = null; On 2013/06/04 01:16:01, ...
7 years, 6 months ago (2013-06-04 02:16:10 UTC) #13
yoshiki
Thanks, LGTM
7 years, 6 months ago (2013-06-04 02:17:41 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hirono@chromium.org/15643006/44002
7 years, 6 months ago (2013-06-04 02:19:21 UTC) #15
commit-bot: I haz the power
7 years, 6 months ago (2013-06-04 10:39:53 UTC) #16
Message was sent while issue was closed.
Change committed as 203913

Powered by Google App Engine
This is Rietveld 408576698