From 94f871e37ebb9ad4b26de70ce4210c3daafe8522 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Tue, 27 May 2014 16:22:07 -0700 Subject: [PATCH 01/21] Make react editor the default --- src/workspace-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workspace-view.coffee b/src/workspace-view.coffee index 5c45db226..f055a0d45 100644 --- a/src/workspace-view.coffee +++ b/src/workspace-view.coffee @@ -71,7 +71,7 @@ class WorkspaceView extends View projectHome: path.join(fs.getHomeDirectory(), 'github') audioBeep: true destroyEmptyPanes: true - useReactEditor: false + useReactEditor: true @content: -> @div class: 'workspace', tabindex: -1, => From 50086df8041a55e08a4d1f901845e1ed6d2d6463 Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Mon, 30 Jun 2014 12:00:39 -0700 Subject: [PATCH 02/21] document pagination for atom.io/api/packages --- docs/apm-rest-api.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/apm-rest-api.md b/docs/apm-rest-api.md index 5e3a517fc..5564be24b 100644 --- a/docs/apm-rest-api.md +++ b/docs/apm-rest-api.md @@ -27,6 +27,10 @@ All requests that take parameters require `application/json`. #### GET /api/packages +Parameters: + +- **page** (optional) + Returns a list of all packages in the following format: ```json [ @@ -44,6 +48,15 @@ Returns a list of all packages in the following format: ] ``` +Results are paginated 30 at a time, and links to the next and last pages are +provided in the Link header: + +``` +Link: ; rel="self", + ; rel="last", + ; rel="next" +``` + ### Showing package details #### GET /api/packages/:package_name From 46b95318a1fd8c8f90e7678bd1d8fd1f778bb184 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 08:43:43 -0700 Subject: [PATCH 03/21] Wrap header name in backticks --- docs/apm-rest-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apm-rest-api.md b/docs/apm-rest-api.md index 5564be24b..ce352161e 100644 --- a/docs/apm-rest-api.md +++ b/docs/apm-rest-api.md @@ -49,7 +49,7 @@ Returns a list of all packages in the following format: ``` Results are paginated 30 at a time, and links to the next and last pages are -provided in the Link header: +provided in the `Link` header: ``` Link: ; rel="self", From adea792b783d519871e9c3f4a6929651e09272b7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 09:24:06 -0700 Subject: [PATCH 04/21] Use tmpDir variable --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 2aa4a8c67..e07f7363a 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -40,7 +40,7 @@ module.exports = (grunt) -> appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom' buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') installDir = grunt.option('install-dir') - atomShellDownloadDir = path.join(os.tmpdir(), 'atom-cached-atom-shells') + atomShellDownloadDir = path.join(tmpDir, 'atom-cached-atom-shells') symbolsDir = path.join(buildDir, 'Atom.breakpad.syms') shellAppDir = path.join(buildDir, appName) if process.platform is 'win32' From 5871bee79189c298b58abc2212d4f1a479582c54 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 22 Jul 2014 10:16:43 -0700 Subject: [PATCH 05/21] Make spec assertions insensitive to scrollbars on Windows --- spec/editor-component-spec.coffee | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index f75220b85..0104be6f5 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -1697,32 +1697,38 @@ describe "EditorComponent", -> component.measureHeightAndWidth() runSetImmediateCallbacks() + # try to scroll past the top, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: 50)) expect(editor.getScrollTop()).toBe 0 expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # scroll to the bottom in one huge event componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -3000)) runSetImmediateCallbacks() - expect(editor.getScrollTop()).toBe editor.getScrollHeight() - editor.getHeight() + 15 + maxScrollTop = editor.getScrollTop() expect(WheelEvent::preventDefault).toHaveBeenCalled() WheelEvent::preventDefault.reset() + # try to scroll past the bottom, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 0, wheelDeltaY: -30)) - expect(editor.getScrollTop()).toBe editor.getScrollHeight() - editor.getHeight() + 15 + expect(editor.getScrollTop()).toBe maxScrollTop expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # try to scroll past the left side, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: 50, wheelDeltaY: 0)) expect(editor.getScrollLeft()).toBe 0 expect(WheelEvent::preventDefault).not.toHaveBeenCalled() + # scroll all the way right componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -3000, wheelDeltaY: 0)) runSetImmediateCallbacks() - expect(editor.getScrollLeft()).toBe editor.getScrollWidth() - editor.getWidth() + 15 + maxScrollLeft = editor.getScrollLeft() expect(WheelEvent::preventDefault).toHaveBeenCalled() WheelEvent::preventDefault.reset() + # try to scroll past the right side, which is impossible componentNode.dispatchEvent(new WheelEvent('mousewheel', wheelDeltaX: -30, wheelDeltaY: 0)) - expect(editor.getScrollLeft()).toBe editor.getScrollWidth() - editor.getWidth() + 15 + expect(editor.getScrollLeft()).toBe maxScrollLeft expect(WheelEvent::preventDefault).not.toHaveBeenCalled() describe "input events", -> From 2e4893c78691141e002dde9dfc630214dcbf84f6 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 10:37:25 -0700 Subject: [PATCH 06/21] Be more defensive in ReactEditorView::activate It is conceivable that a package could have a reference to a view that is not within a pane. Fixes #2853 --- src/react-editor-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react-editor-view.coffee b/src/react-editor-view.coffee index 80f21ef57..d717359ba 100644 --- a/src/react-editor-view.coffee +++ b/src/react-editor-view.coffee @@ -38,7 +38,7 @@ class ReactEditorView extends View Object.defineProperty @::, 'charWidth', get: -> @editor.getDefaultCharWidth() Object.defineProperty @::, 'firstRenderedScreenRow', get: -> @component.getRenderedRowRange()[0] Object.defineProperty @::, 'lastRenderedScreenRow', get: -> @component.getRenderedRowRange()[1] - Object.defineProperty @::, 'active', get: -> @is(@getPane().activeView) + Object.defineProperty @::, 'active', get: -> @is(@getPane()?.activeView) Object.defineProperty @::, 'isFocused', get: -> @component?.state.focused afterAttach: (onDom) -> From 6f0920c04b39f301074ba9f83e97e8006f5ca6f0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 10:59:23 -0700 Subject: [PATCH 07/21] Prepare 0.117 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1d26062b..b2622ab94 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.116.0", + "version": "0.117.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From d9a942d6c6db725d9bfea0494944788a04165206 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 09:49:46 -0700 Subject: [PATCH 08/21] Bundle base16-tomorrow-light-theme --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b2622ab94..a28050818 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "atom-light-syntax": "0.20.0", "atom-light-ui": "0.28.0", "base16-tomorrow-dark-theme": "0.19.0", + "base16-tomorrow-light-theme": "0.2.0", "solarized-dark-syntax": "0.21.0", "solarized-light-syntax": "0.11.0", "archive-view": "0.34.0", From 866fd69008f7d3b3af247eeadff3cf226ee3e18e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 09:50:09 -0700 Subject: [PATCH 09/21] Add tomorrow light theme to cache --- build/tasks/prebuild-less-task.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tasks/prebuild-less-task.coffee b/build/tasks/prebuild-less-task.coffee index c8cf33083..ecd0fb2c8 100644 --- a/build/tasks/prebuild-less-task.coffee +++ b/build/tasks/prebuild-less-task.coffee @@ -9,10 +9,12 @@ module.exports = (grunt) -> ['atom-dark-ui', 'atom-light-syntax'] ['atom-dark-ui', 'solarized-dark-syntax'] ['atom-dark-ui', 'base16-tomorrow-dark-theme'] + ['atom-dark-ui', 'base16-tomorrow-light-theme'] ['atom-light-ui', 'atom-light-syntax'] ['atom-light-ui', 'atom-dark-syntax'] ['atom-light-ui', 'solarized-dark-syntax'] ['atom-light-ui', 'base16-tomorrow-dark-theme'] + ['atom-light-ui', 'base16-tomorrow-light-theme'] ] directory = path.join(grunt.config.get('atom.appDir'), 'less-compile-cache') From 9aca6a4489a96f1638c5ab7398381d8c7465f792 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 11:10:26 -0700 Subject: [PATCH 10/21] Upgrade to base16-tomorrow-dark-theme@0.20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a28050818..765c659e3 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "atom-dark-ui": "0.32.0", "atom-light-syntax": "0.20.0", "atom-light-ui": "0.28.0", - "base16-tomorrow-dark-theme": "0.19.0", + "base16-tomorrow-dark-theme": "0.20.0", "base16-tomorrow-light-theme": "0.2.0", "solarized-dark-syntax": "0.21.0", "solarized-light-syntax": "0.11.0", From 27d0743edc87c9f5f563ec251bc347a86f0d9d3f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 11:10:34 -0700 Subject: [PATCH 11/21] Upgrade to base16-tomorrow-light-theme@0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 765c659e3..763401d13 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "atom-light-syntax": "0.20.0", "atom-light-ui": "0.28.0", "base16-tomorrow-dark-theme": "0.20.0", - "base16-tomorrow-light-theme": "0.2.0", + "base16-tomorrow-light-theme": "0.3.0", "solarized-dark-syntax": "0.21.0", "solarized-light-syntax": "0.11.0", "archive-view": "0.34.0", From 4f4b840f67d476970923cb03a2cee8b709ac0124 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 11:37:38 -0700 Subject: [PATCH 12/21] Upgrade to language-go@0.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 763401d13..6aa92b52f 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "language-css": "0.17.0", "language-gfm": "0.43.0", "language-git": "0.9.0", - "language-go": "0.13.0", + "language-go": "0.14.0", "language-html": "0.22.0", "language-hyperlink": "0.10.0", "language-java": "0.11.0", From 1a905887527620331665079baedf25c2e4400e06 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 22 Jul 2014 11:46:17 -0700 Subject: [PATCH 13/21] Visible is now a member variable. --- src/editor-component.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index fa3939cb6..120616249 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -117,7 +117,7 @@ EditorComponent = React.createClass editor, lineHeightInPixels, defaultCharWidth, lineDecorations, highlightDecorations, showIndentGuide, renderedRowRange, @pendingChanges, scrollTop, scrollLeft, @scrollingVertically, scrollHeight, scrollWidth, mouseWheelScreenRow, invisibles, - visible, scrollViewHeight, @scopedCharacterWidthsChangeCount, lineWidth, @useHardwareAcceleration, + @visible, scrollViewHeight, @scopedCharacterWidthsChangeCount, lineWidth, @useHardwareAcceleration, placeholderText, @performedInitialMeasurement } From c67f8493e0783a6c73992e29f35fb39853638019 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 10 Jul 2014 15:14:45 -0700 Subject: [PATCH 14/21] Softwrap always takes into account the vertical scrollbar width --- src/display-buffer.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index 6c56ee106..9e6468e88 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -356,8 +356,10 @@ class DisplayBuffer extends Model if editorWidthInChars isnt previousWidthInChars and @softWrap @updateWrappedScreenLines() + # Returns the editor width in characters for soft wrap. getEditorWidthInChars: -> - width = @getWidth() + width = @width ? @getScrollWidth() + width -= @getVerticalScrollbarWidth() if width? and @defaultCharWidth > 0 Math.floor(width / @defaultCharWidth) else From 17364cd528fcdd3c402878867852bf243f8d6110 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Fri, 11 Jul 2014 15:12:41 -0700 Subject: [PATCH 15/21] Take the scrollbar width into account in specs --- spec/editor-component-spec.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 0104be6f5..3d8af165f 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -258,7 +258,7 @@ describe "EditorComponent", -> editor.setText "a line that wraps " editor.setSoftWrap(true) runSetImmediateCallbacks() - componentNode.style.width = 16 * charWidth + 'px' + componentNode.style.width = 16 * charWidth + editor.getVerticalScrollbarWidth() + 'px' component.measureHeightAndWidth() runSetImmediateCallbacks() @@ -2003,7 +2003,7 @@ describe "EditorComponent", -> expect(componentNode.querySelectorAll('.line')).toHaveLength(4 + lineOverdrawMargin + 1) gutterWidth = componentNode.querySelector('.gutter').offsetWidth - componentNode.style.width = gutterWidth + 14 * charWidth + 'px' + componentNode.style.width = gutterWidth + 14 * charWidth + editor.getVerticalScrollbarWidth() + 'px' advanceClock(component.domPollingInterval) runSetImmediateCallbacks() expect(componentNode.querySelector('.line').textContent).toBe "var quicksort " From 3818dee1754a7a9ba5500d7c86af5ed39ac3ec2d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 13:48:53 -0700 Subject: [PATCH 16/21] Prepare 0.118 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6aa92b52f..8870c8119 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "atom", "productName": "Atom", - "version": "0.117.0", + "version": "0.118.0", "description": "A hackable text editor for the 21st Century.", "main": "./src/browser/main.js", "repository": { From 88d1ba2271190fea0f12f5e646c76044fc325507 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Tue, 22 Jul 2014 12:44:07 -0700 Subject: [PATCH 17/21] Remove Atom.getVersion() --- src/atom.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/atom.coffee b/src/atom.coffee index 50847f72d..645360598 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -110,9 +110,6 @@ class Atom extends Model @getCurrentWindow: -> remote.getCurrentWindow() - # Get the version of the Atom application. - @getVersion: -> - @appVersion ?= @getLoadSettings().appVersion # Determine whether the current version is an official release. @isReleasedVersion: -> @@ -503,7 +500,7 @@ class Atom extends Model # # Returns the version text {String}. getVersion: -> - @constructor.getVersion() + @appVersion ?= @getLoadSettings().appVersion # Public: Determine whether the current version is an official release. isReleasedVersion: -> From 911ca0d8464ac072cfbf807bb5f9f371ae35fade Mon Sep 17 00:00:00 2001 From: probablycorey Date: Tue, 22 Jul 2014 12:44:19 -0700 Subject: [PATCH 18/21] Remove Atom.isReleasedVersion --- src/atom.coffee | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/atom.coffee b/src/atom.coffee index 645360598..4489d8ba7 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -110,11 +110,6 @@ class Atom extends Model @getCurrentWindow: -> remote.getCurrentWindow() - - # Determine whether the current version is an official release. - @isReleasedVersion: -> - not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix - workspaceViewParentSelector: 'body' # Call .loadOrCreate instead @@ -504,7 +499,7 @@ class Atom extends Model # Public: Determine whether the current version is an official release. isReleasedVersion: -> - @constructor.isReleasedVersion() + not /\w{7}/.test(@getVersion()) # Check if the release is a 7-character SHA prefix # Public: Get the directory path to Atom's configuration area. # From a3f046b948b940872d6d8a0778c677c9007b3323 Mon Sep 17 00:00:00 2001 From: probablycorey Date: Tue, 22 Jul 2014 12:53:29 -0700 Subject: [PATCH 19/21] Fix getVersion spec --- spec/atom-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/atom-spec.coffee b/spec/atom-spec.coffee index 4380e70c8..ce85951d9 100644 --- a/spec/atom-spec.coffee +++ b/spec/atom-spec.coffee @@ -531,7 +531,7 @@ describe "the `atom` global", -> describe ".isReleasedVersion()", -> it "returns false if the version is a SHA and true otherwise", -> version = '0.1.0' - spyOn(atom.constructor, 'getVersion').andCallFake -> version + spyOn(atom, 'getVersion').andCallFake -> version expect(atom.isReleasedVersion()).toBe true version = '36b5518' expect(atom.isReleasedVersion()).toBe false From b9e2c47321f81f0dab8a224e0ff35d44641ea9b6 Mon Sep 17 00:00:00 2001 From: Kube Khrm Date: Tue, 22 Jul 2014 23:41:51 +0200 Subject: [PATCH 20/21] Added Ctrl-Shift-Z for Linux Redo. --- keymaps/linux.cson | 1 + 1 file changed, 1 insertion(+) diff --git a/keymaps/linux.cson b/keymaps/linux.cson index 8775c150b..a092ff962 100644 --- a/keymaps/linux.cson +++ b/keymaps/linux.cson @@ -26,6 +26,7 @@ 'ctrl-w': 'core:close' 'ctrl-z': 'core:undo' 'ctrl-y': 'core:redo' + 'ctrl-shift-z': 'core:redo' 'ctrl-x': 'core:cut' 'ctrl-c': 'core:copy' 'ctrl-v': 'core:paste' From 2fe647c950354190f6dfff8ea353103bfa223b9f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Jul 2014 17:32:00 -0700 Subject: [PATCH 21/21] Store atom-shell cache in ~/.atom/atom-shell There were several CI failures today where it seemed like the atom-shell version in the temp directory wasn't complete, it was missing many files causing the build to fail when the specs were run. What made this worse was that running script/clean on these machines didn't clean out these bad versions since the temp directory was different when run via Jenkins vs. ssh'ing into the machines so the folders were left there and the builds kept failing. Atom already stores the compile cache to ~/.atom as well as the node cache so putting atom-shell there as well keeps things consistent. --- build/Gruntfile.coffee | 5 ++++- script/clean | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index e07f7363a..62672b1e4 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -40,7 +40,10 @@ module.exports = (grunt) -> appName = if process.platform is 'darwin' then 'Atom.app' else 'Atom' buildDir = grunt.option('build-dir') ? path.join(tmpDir, 'atom-build') installDir = grunt.option('install-dir') - atomShellDownloadDir = path.join(tmpDir, 'atom-cached-atom-shells') + + home = if process.env is 'win32' then process.env.USERPROFILE else process.env.HOME + atomShellDownloadDir = path.join(home, '.atom', 'atom-shell') + symbolsDir = path.join(buildDir, 'Atom.breakpad.syms') shellAppDir = path.join(buildDir, appName) if process.platform is 'win32' diff --git a/script/clean b/script/clean index 51e0f0590..236e9f58f 100755 --- a/script/clean +++ b/script/clean @@ -24,6 +24,7 @@ var commands = [ [home, '.atom', 'storage'], [home, '.atom', '.npm'], [home, '.atom', 'compile-cache'], + [home, '.atom', 'atom-shell'], [tmpdir, 'atom-build'], [tmpdir, 'atom-cached-atom-shells'], ];