From 08cac2bbe0b484a12408a79f996a90d1926f7923 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 13:36:52 -0800 Subject: [PATCH 1/9] :lipstick: --- src/packages/editor-stats/spec/editor-stats-spec.coffee | 1 - src/packages/editor-stats/src/editor-stats-view.coffee | 2 +- src/packages/editor-stats/stylesheets/editor-stats.css | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/packages/editor-stats/spec/editor-stats-spec.coffee b/src/packages/editor-stats/spec/editor-stats-spec.coffee index deba8fe9e..bb63c91cc 100644 --- a/src/packages/editor-stats/spec/editor-stats-spec.coffee +++ b/src/packages/editor-stats/spec/editor-stats-spec.coffee @@ -43,4 +43,3 @@ fdescribe "EditorStats", -> expect(editorStats.eventLog[time]).toBe 1 simulateClick() expect(editorStats.eventLog[time]).toBe 2 - diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index a5cd4053d..394a654d3 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -127,4 +127,4 @@ class EditorStatsView extends ScrollView @rootView.focus() serialize: -> - eventLog: @eventLog \ No newline at end of file + eventLog: @eventLog diff --git a/src/packages/editor-stats/stylesheets/editor-stats.css b/src/packages/editor-stats/stylesheets/editor-stats.css index 1368dcdb1..25a3cc08b 100644 --- a/src/packages/editor-stats/stylesheets/editor-stats.css +++ b/src/packages/editor-stats/stylesheets/editor-stats.css @@ -33,4 +33,4 @@ .editor-stats path.domain { fill: none; -} \ No newline at end of file +} From 2b61883d9b830e10a579e569e9771d1cc257e9ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 13:37:30 -0800 Subject: [PATCH 2/9] un-f editor stats spec --- src/packages/editor-stats/spec/editor-stats-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/editor-stats/spec/editor-stats-spec.coffee b/src/packages/editor-stats/spec/editor-stats-spec.coffee index bb63c91cc..b330f0073 100644 --- a/src/packages/editor-stats/spec/editor-stats-spec.coffee +++ b/src/packages/editor-stats/spec/editor-stats-spec.coffee @@ -2,7 +2,7 @@ $ = require 'jquery' RootView = require 'root-view' EditorStats = require 'editor-stats/src/editor-stats-view' -fdescribe "EditorStats", -> +describe "EditorStats", -> [rootView, editorStats, editor, date, time] = [] simulateKeyUp = (key) -> From 9f3f0fe397c7dc86732e9dd6f6f1f82977f1d1d2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 13:45:41 -0800 Subject: [PATCH 3/9] Don't focus stats when attaching Leave the editor with focus since the stats aren't interactive --- src/packages/editor-stats/src/editor-stats-view.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index 394a654d3..afe49372d 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -118,7 +118,6 @@ class EditorStatsView extends ScrollView attach: -> @.insertBefore @statusBar - @focus() @draw() detach: => From 30e8eee9cecef5d836ca66ef0b1b941f4b7b8bd8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 13:49:14 -0800 Subject: [PATCH 4/9] Move d3 require to top --- src/packages/editor-stats/src/editor-stats-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index afe49372d..5df176834 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -2,6 +2,7 @@ ScrollView = require 'scroll-view' $ = require 'jquery' _ = require 'underscore' +d3 = require 'd3.v3' module.exports = class EditorStatsView extends ScrollView @@ -14,7 +15,6 @@ class EditorStatsView extends ScrollView "#{hour}:#{minute}" startDate = new Date - d3 = require 'd3.v3' x = d3.scale.ordinal().domain d3.range(hours * 60) y = d3.scale.linear() From 517d4cfe3ae205892e3fcd07cefa413dc0ee0eb5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 13:50:47 -0800 Subject: [PATCH 5/9] Remove unused requires --- src/packages/editor-stats/spec/editor-stats-spec.coffee | 2 +- src/packages/editor-stats/src/editor-stats-view.coffee | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/packages/editor-stats/spec/editor-stats-spec.coffee b/src/packages/editor-stats/spec/editor-stats-spec.coffee index b330f0073..bb63c91cc 100644 --- a/src/packages/editor-stats/spec/editor-stats-spec.coffee +++ b/src/packages/editor-stats/spec/editor-stats-spec.coffee @@ -2,7 +2,7 @@ $ = require 'jquery' RootView = require 'root-view' EditorStats = require 'editor-stats/src/editor-stats-view' -describe "EditorStats", -> +fdescribe "EditorStats", -> [rootView, editorStats, editor, date, time] = [] simulateKeyUp = (key) -> diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index 5df176834..4e738c7f3 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -1,7 +1,4 @@ -{$$$} = require 'space-pen' ScrollView = require 'scroll-view' -$ = require 'jquery' -_ = require 'underscore' d3 = require 'd3.v3' module.exports = From 20249b4d38a3211f0c3cf2d320db37129b292e96 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 14:06:16 -0800 Subject: [PATCH 6/9] un-f editor stats spec again --- src/packages/editor-stats/spec/editor-stats-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/editor-stats/spec/editor-stats-spec.coffee b/src/packages/editor-stats/spec/editor-stats-spec.coffee index bb63c91cc..b330f0073 100644 --- a/src/packages/editor-stats/spec/editor-stats-spec.coffee +++ b/src/packages/editor-stats/spec/editor-stats-spec.coffee @@ -2,7 +2,7 @@ $ = require 'jquery' RootView = require 'root-view' EditorStats = require 'editor-stats/src/editor-stats-view' -fdescribe "EditorStats", -> +describe "EditorStats", -> [rootView, editorStats, editor, date, time] = [] simulateKeyUp = (key) -> From 4433f443d4f674561ce96e946d4be3a317b79d76 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 14:06:46 -0800 Subject: [PATCH 7/9] Simplify stats keymap --- src/packages/editor-stats/keymaps/editor-stats.cson | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/packages/editor-stats/keymaps/editor-stats.cson b/src/packages/editor-stats/keymaps/editor-stats.cson index 1364f2098..819b7c04f 100644 --- a/src/packages/editor-stats/keymaps/editor-stats.cson +++ b/src/packages/editor-stats/keymaps/editor-stats.cson @@ -1,5 +1,2 @@ -'body, .editor-stats': - 'meta-alt-s': 'editor-stats:toggle' - -'.editor-stats': +'body': 'meta-alt-s': 'editor-stats:toggle' From 7f86bf1351a40981c5a9577062f7634704968841 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 14:19:20 -0800 Subject: [PATCH 8/9] Remove unneeded remove call --- src/packages/editor-stats/src/editor-stats-view.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index 4e738c7f3..8e13c20f0 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -118,8 +118,7 @@ class EditorStatsView extends ScrollView @draw() detach: => - super() - @.remove() + super @rootView.focus() serialize: -> From de09adc45f4c13f4f5249ed4c2a2e6b43acd2395 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 31 Jan 2013 14:24:02 -0800 Subject: [PATCH 9/9] :lipstick: --- src/packages/editor-stats/src/editor-stats-view.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/packages/editor-stats/src/editor-stats-view.coffee b/src/packages/editor-stats/src/editor-stats-view.coffee index 8e13c20f0..ac052875b 100644 --- a/src/packages/editor-stats/src/editor-stats-view.coffee +++ b/src/packages/editor-stats/src/editor-stats-view.coffee @@ -32,7 +32,7 @@ class EditorStatsView extends ScrollView @serialize: -> @instance.serialize() - eventLog: [], + eventLog: [] initialize: (@rootView, @eventLog = {}) -> super @@ -117,7 +117,7 @@ class EditorStatsView extends ScrollView @.insertBefore @statusBar @draw() - detach: => + detach: -> super @rootView.focus()