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

Issue 10826137: Fix CSS and timeout handling for the Files app butter bar (Closed)

Created:
8 years, 4 months ago by Vladislav Kaznacheev
Modified:
8 years, 4 months ago
Reviewers:
Oleg Eterevsky
CC:
chromium-reviews, rginda+watch_chromium.org, arv (Not doing code reviews)
Visibility:
Public.

Description

Fix CSS and timeout handling for the Files app butter bar BUG=138176 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=149814

Patch Set 1 #

Total comments: 9

Patch Set 2 : Addressed comments #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -85 lines) Patch
M chrome/browser/resources/file_manager/css/file_manager.css View 3 chunks +18 lines, -21 lines 0 comments Download
M chrome/browser/resources/file_manager/js/butter_bar.js View 1 9 chunks +95 lines, -61 lines 0 comments Download
M chrome/browser/resources/file_manager/main.html View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vladislav Kaznacheev
8 years, 4 months ago (2012-08-03 07:14:28 UTC) #1
Oleg Eterevsky
LGTM with minor comments. https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resources/file_manager/js/butter_bar.js File chrome/browser/resources/file_manager/js/butter_bar.js (right): https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resources/file_manager/js/butter_bar.js#newcode54 chrome/browser/resources/file_manager/js/butter_bar.js:54: if (this.hideTimeout_) { These 4 ...
8 years, 4 months ago (2012-08-03 07:36:13 UTC) #2
Vladislav Kaznacheev
8 years, 4 months ago (2012-08-03 08:20:04 UTC) #3
https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resourc...
File chrome/browser/resources/file_manager/js/butter_bar.js (right):

https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resourc...
chrome/browser/resources/file_manager/js/butter_bar.js:54: if
(this.hideTimeout_) {
On 2012/08/03 07:36:13, Oleg wrote:
> These 4 lines appear at least 3 times. Maybe extract them into small method
> clearHideTimeout()?

Done.

https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resourc...
chrome/browser/resources/file_manager/js/butter_bar.js:68:
link.addEventListener('click', function(callback) {
A closure inside a loop is bound to the last valuer of the loop variable.
On 2012/08/03 07:36:13, Oleg wrote:
> Why did you change the way this function is written? If you are worried that
> opt_options.actions[label] may be overwritten before the event listener is
> called, I suggest you write:
> 
> var callback = opt_options.actions[label];
> link.addEventListener('click', function() { callback(); return false; });
> 
> It's much easier to understand.

https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resourc...
chrome/browser/resources/file_manager/js/butter_bar.js:76: actions.hidden =
true;
On 2012/08/03 07:36:13, Oleg wrote:
> Could you please add braces here? Otherwise it look a bit weird. I believe
it's
> ok to skip braces only for one-liners like
> 
> if (something)
>   do_something();

Done.

https://chromiumcodereview.appspot.com/10826137/diff/1/chrome/browser/resourc...
chrome/browser/resources/file_manager/js/butter_bar.js:107: var timeout =
('timeout' in opt_options) ? opt_options.timeout : 10 * 1000;
On 2012/08/03 07:36:13, Oleg wrote:
> Could you please swap this line and the next if, so that timeout declaration
> would be near its use?

Done.

Powered by Google App Engine
This is Rietveld 408576698