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

Issue 899943002: Rework update model to eliminate a "flicker" resulting from the brief update to zero results when a… (Closed)

Created:
5 years, 10 months ago by Steve McKay
Modified:
5 years, 10 months ago
Reviewers:
hirono, Ben Kwa
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, mtomasz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

1) Add a drop down revealing a popup panel with import details (with is a WIP, but the current state should be sufficient to land). 2) Update scanner to publish updates on all scan activity (so the details reflects valid information while scanning). In doing this I pulled all of the deduping logic up out of ScanResult into MediaScanner...improving separation of concern between the classes. 3) Rework update model to eliminate a flicker resulting from the brief update to show zero results when a file selection is transitioning from n to n+/-1. Sadly, this change results in a net loss of readability, especially WRT having good clear decision points. I've added comments to help out in this respect. FYI, I'm OOO for the rest of the day. I think this CL is good to land, rough though it may be. In a followup CL: 1) I'll make some subsequent improvements to unittests in the wake of removing the "GetCommandUpdate" coverage (removed because GetCommandUpdate exists no more). 2) This change still exhibits one odd behavior, ignoring entirely a selection when it consistes of all deduped files...in that case we *do* want to see zero results. Will address at the time of test improvements. BUG=420680 TEST=browser_test: FileManagerJsTest.* Committed: https://crrev.com/873d9c13d08de9449b659fd5dad1fcf579758a3a Cr-Commit-Position: refs/heads/master@{#315094}

Patch Set 1 #

Patch Set 2 : #

Total comments: 24

Patch Set 3 : Respond to review comments. #

Patch Set 4 : Ensure user selected files are not-deduped. #

Patch Set 5 : Update tests to work with new update model (where we don't update immediately when creating a scan). #

Patch Set 6 : Merge in Fukino-sans changes. #

Patch Set 7 : Don't use drive icon in dialog for now, since this breaks funcitonal tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+573 lines, -531 lines) Patch
M ui/file_manager/file_manager/background/js/media_scanner.js View 1 2 3 7 chunks +174 lines, -120 lines 0 comments Download
M ui/file_manager/file_manager/background/js/mock_media_scanner.js View 1 2 3 4 2 chunks +18 lines, -5 lines 0 comments Download
M ui/file_manager/file_manager/common/js/importer_common.js View 1 chunk +2 lines, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/css/file_manager.css View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/import_controller.js View 1 2 10 chunks +287 lines, -163 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/import_controller_unittest.js View 1 2 3 4 8 chunks +30 lines, -240 lines 0 comments Download
M ui/file_manager/file_manager/main.html View 1 2 3 4 5 6 2 chunks +35 lines, -2 lines 0 comments Download

Messages

Total messages: 28 (10 generated)
hirono
lgtm! https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js File ui/file_manager/file_manager/background/js/media_scanner.js (right): https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode233 ui/file_manager/file_manager/background/js/media_scanner.js:233: console.log('Skipping file entry...watched directory was modified.'); Is it ...
5 years, 10 months ago (2015-02-05 10:51:43 UTC) #2
Ben Kwa
https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js File ui/file_manager/file_manager/background/js/media_scanner.js (right): https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode205 ui/file_manager/file_manager/background/js/media_scanner.js:205: console.assert(entry.isFile); Suggestion: include an explanatory string in the assert. ...
5 years, 10 months ago (2015-02-05 14:54:27 UTC) #3
Steve McKay
Respond to review comments.
5 years, 10 months ago (2015-02-05 15:46:31 UTC) #5
Steve McKay
Dones. PTAL. https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js File ui/file_manager/file_manager/background/js/media_scanner.js (right): https://codereview.chromium.org/899943002/diff/20001/ui/file_manager/file_manager/background/js/media_scanner.js#newcode205 ui/file_manager/file_manager/background/js/media_scanner.js:205: console.assert(entry.isFile); On 2015/02/05 14:54:26, Ben Kwa wrote: ...
5 years, 10 months ago (2015-02-05 15:46:47 UTC) #6
Ben Kwa
lgtm
5 years, 10 months ago (2015-02-05 15:51:13 UTC) #7
Steve McKay
Update tests to work with new update model (where we don't update immediately when creating ...
5 years, 10 months ago (2015-02-05 20:12:33 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899943002/80001
5 years, 10 months ago (2015-02-05 20:13:14 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/20868)
5 years, 10 months ago (2015-02-05 20:16:42 UTC) #13
Steve McKay
Merge in Fukino-sans changes.
5 years, 10 months ago (2015-02-05 21:39:18 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899943002/100001
5 years, 10 months ago (2015-02-05 21:39:39 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/22083)
5 years, 10 months ago (2015-02-05 22:50:22 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899943002/100001
5 years, 10 months ago (2015-02-05 23:27:30 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/22129)
5 years, 10 months ago (2015-02-06 00:31:36 UTC) #22
Steve McKay
Don't use drive icon in dialog for now, since this breaks funcitonal tests.
5 years, 10 months ago (2015-02-06 19:17:23 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899943002/120001
5 years, 10 months ago (2015-02-06 19:17:56 UTC) #25
Steve McKay
FYI, FileManagerTests were broken because the test harness for functional tests uses "volume-type-icon=drive" to qualify ...
5 years, 10 months ago (2015-02-06 19:30:14 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 10 months ago (2015-02-06 20:07:22 UTC) #27
commit-bot: I haz the power
5 years, 10 months ago (2015-02-06 20:08:20 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/873d9c13d08de9449b659fd5dad1fcf579758a3a
Cr-Commit-Position: refs/heads/master@{#315094}

Powered by Google App Engine
This is Rietveld 408576698