From 25b690454f51e54b778dc50d963fa96eeda887bb Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 14 Oct 2015 13:56:05 -0700 Subject: [PATCH 01/45] :arrow_up: grunt-electron-installer --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index ad483c75f..93354cdbd 100644 --- a/build/package.json +++ b/build/package.json @@ -22,7 +22,7 @@ "grunt-contrib-less": "~0.8.0", "grunt-cson": "0.16.0", "grunt-download-electron": "^2.1.1", - "grunt-electron-installer": "1.0.5", + "grunt-electron-installer": "1.0.6", "grunt-lesslint": "0.17.0", "grunt-peg": "~1.1.0", "grunt-shell": "~0.3.1", From 511ab462464085a128a8cf1905535bb5df0d6e53 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 14 Oct 2015 13:58:15 -0700 Subject: [PATCH 02/45] Don't format version for windows installer We're just going to use names like '1.1.0-beta1' that are compatible with NuGet, so that the versions that squirrel.windows requests match the names of the github releases --- build/tasks/publish-build-task.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/tasks/publish-build-task.coffee b/build/tasks/publish-build-task.coffee index 53cd8aedb..d1640a42b 100644 --- a/build/tasks/publish-build-task.coffee +++ b/build/tasks/publish-build-task.coffee @@ -6,7 +6,6 @@ async = require 'async' fs = require 'fs-plus' GitHub = require 'github-releases' request = require 'request' -{convertVersion} = require 'grunt-electron-installer' grunt = null @@ -79,9 +78,8 @@ getAssets = -> {assetName: 'atom-api.json', sourcePath: 'atom-api.json'} ] when 'win32' - nupkgVersion = convertVersion(version) assets = [{assetName: 'atom-windows.zip', sourcePath: appName}] - for squirrelAsset in ['AtomSetup.exe', 'RELEASES', "atom-#{nupkgVersion}-full.nupkg", "atom-#{nupkgVersion}-delta.nupkg"] + for squirrelAsset in ['AtomSetup.exe', 'RELEASES', "atom-#{version}-full.nupkg", "atom-#{version}-delta.nupkg"] cp path.join(buildDir, 'installer', squirrelAsset), path.join(buildDir, squirrelAsset) assets.push({assetName: squirrelAsset, sourcePath: assetName}) assets From fdb16422701d085587691edd740e762cd34756bc Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 14 Oct 2015 14:04:20 -0700 Subject: [PATCH 03/45] Include version query parameter for windows auto-updates Squirrel.Windows supports this now, and we need it to distinguish beta from stable versions --- src/browser/auto-update-manager.coffee | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/browser/auto-update-manager.coffee b/src/browser/auto-update-manager.coffee index ca711eb83..55ab2462b 100644 --- a/src/browser/auto-update-manager.coffee +++ b/src/browser/auto-update-manager.coffee @@ -17,14 +17,8 @@ class AutoUpdateManager constructor: (@version, @testMode, @disabled) -> @state = IdleState - if process.platform is 'win32' - # Squirrel for Windows can't handle query params - # https://github.com/Squirrel/Squirrel.Windows/issues/132 - @feedUrl = 'https://atom.io/api/updates' - else - @iconPath = path.resolve(__dirname, '..', '..', 'resources', 'atom.png') - @feedUrl = "https://atom.io/api/updates?version=#{@version}" - + @iconPath = path.resolve(__dirname, '..', '..', 'resources', 'atom.png') + @feedUrl = "https://atom.io/api/updates?version=#{@version}" process.nextTick => @setupAutoUpdater() setupAutoUpdater: -> From 89871eb25847afaba002d26ed7e57e0f2df2f544 Mon Sep 17 00:00:00 2001 From: Wliu Date: Thu, 15 Oct 2015 12:57:43 +0000 Subject: [PATCH 04/45] Improve Windows build instructions [ci skip] --- docs/build-instructions/windows.md | 47 +++++++++++++----------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/docs/build-instructions/windows.md b/docs/build-instructions/windows.md index 74dddf8f8..eb0bcf806 100644 --- a/docs/build-instructions/windows.md +++ b/docs/build-instructions/windows.md @@ -2,40 +2,36 @@ ## Requirements -### On Windows 7 - * [Visual C++ 2010 Express](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4) - * [Visual Studio 2010 Service Pack 1](http://www.microsoft.com/en-us/download/details.aspx?id=23691) - * [Node.js](http://nodejs.org/download/) (0.10.x or above) - * For 64-bit builds of node and native modules you **must** have the - [Windows 7 64-bit SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279). - You may also need the [compiler update for the Windows SDK 7.1](http://www.microsoft.com/en-us/download/details.aspx?id=4422) - * [Python](https://www.python.org/downloads/) v2.7. +### General + * [Node.js](http://nodejs.org/en/download/) (0.10.x or above) + * [Python](https://www.python.org/downloads/) v2.7.x * The python.exe must be available at `%SystemDrive%\Python27\python.exe`. If it is installed elsewhere, you can create a symbolic link to the directory containing the python.exe using: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27` * [GitHub Desktop](http://desktop.github.com/) +### On Windows 7 + * [Visual C++ 2010 Express](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4) + * [Visual Studio 2010 Service Pack 1](http://www.microsoft.com/en-us/download/details.aspx?id=23691) + * [Windows 7 64-bit SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279) for 64-bit builds of Node and native modules + * You may also need the [compiler update for the Windows SDK 7.1](http://www.microsoft.com/en-us/download/details.aspx?id=4422) + ### On Windows 8 or 10 * [Visual Studio Express 2013 or 2015 for Windows Desktop](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_2) - * For VS 2015, be sure to customize the installation to include Visual C++. It's not installed by default. - * Some have experienced issues with Node locating C++ on VS 2015. If so, try VS 2013. - * [Node.js](http://nodejs.org/download/) (0.10.x or above) - * [Python](https://www.python.org/downloads/) v2.7.x (required by [node-gyp](https://github.com/TooTallNate/node-gyp)) - * [GitHub Desktop](http://desktop.github.com/) + * To ensure that node-gyp knows what version of Visual Studio is installed, set the `GYP_MSVS_VERSION` environment variable to the Visual Studio version (e.g. `2013` or `2015`) ## Instructions ```bash -# Use the `Git Shell` program which was installed by GitHub Desktop. -# Also make sure that you are logged into GitHub Desktop. +# Use the `Git Shell` program which was installed by GitHub Desktop and make sure that you are logged into Github Desktop cd C:\ git clone https://github.com/atom/atom/ cd atom script/build # Creates application in the `Program Files` directory ``` -Note: If you use cmd or Powershell instead of the Git shell, use a backslash instead: i.e. `script\build`. -We will assume the git shell for these instructions. +Note: If you use cmd or Powershell instead of Git Shell, use a backslash instead: i.e. `script\build`. +These instructions will assume the use of Git Shell. ### `script/build` Options * `--install-dir` - Creates the final built application in this directory. @@ -73,19 +69,19 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * https://github.com/TooTallNate/node-gyp/issues/297 * https://code.google.com/p/gyp/issues/detail?id=393 -* `script/build` stops at installing runas with 'Failed at the runas@x.y.z install script.' +* `script/build` stops at installing runas with `Failed at the runas@x.y.z install script.` - See the next item. + * See the next item. * `error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found.` - * If you're building atom with Visual Studio 2013 try executing the following - command in your Git shell and then re-run `script/build`: + * If you're building Atom with Visual Studio 2013 or above make sure the `GYP_MSVS_VERSION` environment variable is set, and then re-run `script/build`: + ```bash + $env:GYP_MSVS_VERSION=2013 # 2015 if using Visual Studio 2015, and so on + script/build ``` - $env:GYP_MSVS_VERSION=2013 - ``` - * If you are using Visual Studio 2013 and the build fails with some other error message this environment variable might still be required. + * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required. * Other `node-gyp` errors on first build attempt, even though the right node and python versions are installed. * Do try the build command one more time, as experience shows it often works on second try in many of these cases. @@ -93,5 +89,4 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li ### Windows build error reports in atom/atom * If all fails, use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows, and see if yours has already been reported. - -* If it hasn't, please open a new issue with your Windows version 32/64bit and a print/screenshot of your build output, incl. the node and python versions. + * If it hasn't, please open a new issue with your Windows version, architecture (x32 or x64), and a screenshot of your build output, including the Node and Python versions. From 95e935ea9d33b1ee19bb1cf7123bb7912afdef02 Mon Sep 17 00:00:00 2001 From: Wliu Date: Thu, 15 Oct 2015 14:29:07 +0000 Subject: [PATCH 05/45] :fire: stacktrace-parser --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 9191f39db..e08845c4e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "semver": "^4.3.3", "service-hub": "^0.6.2", "source-map-support": "^0.3.2", - "stacktrace-parser": "0.1.1", "temp": "0.8.1", "text-buffer": "7.1.3", "typescript-simple": "1.0.0", From 3535525ad99dd3cf4e47f1571a5841883dc7c61c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 19 Oct 2015 13:43:40 -0700 Subject: [PATCH 06/45] Don't try to reuse existing normal windows as dev mode windows --- src/browser/atom-application.coffee | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index ab7a45db9..9262068f7 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -378,14 +378,16 @@ class AtomApplication unless pidToKillWhenClosed or newWindow existingWindow = @windowForPaths(pathsToOpen, devMode) - - # Default to using the specified window or the last focused window - currentWindow = window ? @lastFocusedWindow stats = (fs.statSyncNoException(pathToOpen) for pathToOpen in pathsToOpen) - existingWindow ?= currentWindow if ( - stats.every((stat) -> stat.isFile?()) or - stats.some((stat) -> stat.isDirectory?()) and not currentWindow?.hasProjectPath() - ) + unless existingWindow? + if currentWindow = window ? @lastFocusedWindow + existingWindow = currentWindow if ( + currentWindow.devMode is devMode and + ( + stats.every((stat) -> stat.isFile?()) or + stats.some((stat) -> stat.isDirectory?() and not currentWindow.hasProjectPath()) + ) + ) if existingWindow? openedWindow = existingWindow From c29514a448b2eddecf202fa9f2af7c7b3119b96a Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Mon, 19 Oct 2015 18:06:16 -0400 Subject: [PATCH 07/45] Address comments [ci skip] --- docs/build-instructions/windows.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/docs/build-instructions/windows.md b/docs/build-instructions/windows.md index eb0bcf806..63f9d1c3e 100644 --- a/docs/build-instructions/windows.md +++ b/docs/build-instructions/windows.md @@ -3,7 +3,7 @@ ## Requirements ### General - * [Node.js](http://nodejs.org/en/download/) (0.10.x or above) + * [Node.js](http://nodejs.org/en/download/) v4.x * [Python](https://www.python.org/downloads/) v2.7.x * The python.exe must be available at `%SystemDrive%\Python27\python.exe`. If it is installed elsewhere, you can create a symbolic link to the @@ -12,10 +12,7 @@ * [GitHub Desktop](http://desktop.github.com/) ### On Windows 7 - * [Visual C++ 2010 Express](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4) - * [Visual Studio 2010 Service Pack 1](http://www.microsoft.com/en-us/download/details.aspx?id=23691) - * [Windows 7 64-bit SDK](http://www.microsoft.com/en-us/download/details.aspx?id=8279) for 64-bit builds of Node and native modules - * You may also need the [compiler update for the Windows SDK 7.1](http://www.microsoft.com/en-us/download/details.aspx?id=4422) + * [Visual Studio 2013 Update 5](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_4) ### On Windows 8 or 10 * [Visual Studio Express 2013 or 2015 for Windows Desktop](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs#DownloadFamilies_2) @@ -24,7 +21,7 @@ ## Instructions ```bash -# Use the `Git Shell` program which was installed by GitHub Desktop and make sure that you are logged into Github Desktop +# Use the Git Shell program which was installed by GitHub Desktop cd C:\ git clone https://github.com/atom/atom/ cd atom @@ -47,7 +44,6 @@ Note that you may have to open your command window as administrator. For powersh If none of this works, do install Github Desktop and use its Git shell. Makes life easier. - ## Troubleshooting ### Common Errors @@ -63,7 +59,7 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * `error MSB4025: The project file could not be loaded. Invalid character in the given encoding.` - * These can occur because your home directory (`%USERPROFILE%`) has non-ASCII + * This can occur because your home directory (`%USERPROFILE%`) has non-ASCII characters in it. This is a bug in [gyp](https://code.google.com/p/gyp/) which is used to build native node modules and there is no known workaround. * https://github.com/TooTallNate/node-gyp/issues/297 @@ -78,7 +74,7 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * If you're building Atom with Visual Studio 2013 or above make sure the `GYP_MSVS_VERSION` environment variable is set, and then re-run `script/build`: ```bash - $env:GYP_MSVS_VERSION=2013 # 2015 if using Visual Studio 2015, and so on + GYP_MSVS_VERSION=2013 # 2015 if using Visual Studio 2015, and so on script/build ``` * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required. @@ -86,7 +82,6 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * Other `node-gyp` errors on first build attempt, even though the right node and python versions are installed. * Do try the build command one more time, as experience shows it often works on second try in many of these cases. - ### Windows build error reports in atom/atom * If all fails, use [this search](https://github.com/atom/atom/search?q=label%3Abuild-error+label%3Awindows&type=Issues) to get a list of reports about build errors on Windows, and see if yours has already been reported. - * If it hasn't, please open a new issue with your Windows version, architecture (x32 or x64), and a screenshot of your build output, including the Node and Python versions. + * If it hasn't, please open a new issue with your Windows version, architecture (x86 or amd64), and a screenshot of your build output, including the Node and Python versions. From 65f02eab50f137e3da7bdd9c0e89d2c23946f494 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 14 Oct 2015 16:00:47 +0200 Subject: [PATCH 08/45] Organize structure and add section on packages --- CONTRIBUTING.md | 138 +++++++++++++++++++++++++++++++----------------- 1 file changed, 90 insertions(+), 48 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f9dc8638..ec994be14 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,26 +2,88 @@ :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: -The following is a set of guidelines for contributing to Atom and its packages, -which are hosted in the [Atom Organization](https://github.com/atom) on GitHub. -These are just guidelines, not rules, use your best judgment and feel free to -propose changes to this document in a pull request. - -This project adheres to the [Contributor Covenant 1.2](http://contributor-covenant.org/version/1/2/0). -By participating, you are expected to uphold this code. Please report unacceptable behavior to [atom@github.com](mailto:atom@github.com). +The following is a set of guidelines for contributing to Atom and its packages, which are hosted in the [Atom Organization](https://github.com/atom) on GitHub. +These are just guidelines, not rules, use your best judgment and feel free to propose changes to this document in a pull request. #### Table Of Contents -* [Submitting Issues](#submitting-issues) -* [Your First Contribution](#your-first-contribution) -* [Pull Requests](#pull-requests) -* [Git Commit Messages](#git-commit-messages) -* [CoffeeScript Styleguide](#coffeescript-styleguide) -* [Specs Styleguide](#specs-styleguide) -* [Documentation Styleguide](#documentation-styleguide) -* [Issue and Pull Request Labels](#issue-and-pull-request-labels) +[What should I know before I get started?](#introduction) + * [Code of Conduct](#code-of-conduct) + * [Atom and Packages](#atom-and-packages) -## Submitting Issues +[How Can I Contribute?](#how-can-i-contribute) + * [Your First Contribution](#your-first-contribution) + * [Submitting Issues](#submitting-issues) + * [Pull Requests](#pull-requests) + +[Styleguides](#styleguides) + * [Git Commit Messages](#git-commit-messages) + * [CoffeeScript Styleguide](#coffeescript-styleguide) + * [Specs Styleguide](#specs-styleguide) + * [Documentation Styleguide](#documentation-styleguide) + +[Additional Notes](#additional-notes) + * [Issue and Pull Request Labels](#issue-and-pull-request-labels) + +## What should I know before I get started? + +### Code of Conduct + +This project adheres to the [Contributor Covenant 1.2](http://contributor-covenant.org/version/1/2/0). +By participating, you are expected to uphold this code. +Please report unacceptable behavior to [atom@github.com](mailto:atom@github.com). + +### Atom and Packages + +Atom is a large open source project - it's made up of over [200 repositories](https://github.com/atom). +When you initially consider contributing to Atom, you might be unsure about which of those 200 repositories implements the functionality you want to change or report a bug for. +This section should help you with that. + +Atom is intentionally very modular. +Nearly every non-editor UI element you interact with comes from a package, even fundamental things like tabs and the status-bar. +These packages are packages in the same way that packages in the [package store](https://atom.io/packages) are packages, with one difference: they are bundled into the [default distribution](https://github.com/atom/atom/blob/10b8de6fc499a7def9b072739486e68530d67ab4/package.json#L58). + +![atom-packages](https://cloud.githubusercontent.com/assets/69169/10472281/84fc9792-71d3-11e5-9fd1-19da717df079.png) + +To get a sense for the packages that are bundled with Atom, you can go to Settings > Packages within Atom and take a look at the Core Packages section. + +Here's a list of the big ones: + +* [atom/atom](https://github.com/atom/atom) - Atom Core! The core editor component is responsible for basic text editing (e.g. cursors, selections, scrolling), text indentation, wrapping, and folding, text rendering, editor rendering, file system operations (e.g. saving), and installation and auto-updating. You should also use this repository for feedback related to the [core API](https://atom.io/docs/api/latest/Notification) and for large, overarching design proposals. + +* [tree-view](https://github.com/atom/tree-view) - file and directory listing on the left of the UI. +* [fuzzy-finder](https://github.com/atom/fuzzy-finder) - the quick file open chooser. +* [find-and-replace](https://github.com/atom/find-and-replace) - all search and replace functionality. +* [tabs](https://github.com/atom/tabs) - the tabs for open editors at the top of the UI. +* [status-bar](https://github.com/atom/status-bar) - the status bar at the bottom of the UI. +* [markdown-preview](https://github.com/atom/markdown-preview) - the rendered markdown pane item. +* [settings-view](https://github.com/atom/settings-view) - the settings UI pane item. +* [autocomplete-plus](https://github.com/atom/autocomplete-plus) - autocompletions shown while typing. Some languages have additional packages for autocompletion functionality, such as [autocomplete-html](https://github.com/atom/autocomplete-html). +* [git-diff](https://github.com/atom/git-diff) - Git change indicators shown in the editor's gutter. +* [language-javascript](https://github.com/atom/language-javascript) - all bundled languages are packages too, and each one has a separate package `language-[name]`. Use these for feedback on syntax highlighting issues that only appear for a specific language. +* [one-dark-ui](https://github.com/atom/one-dark-ui) - the default UI styling for anything but the text editor. UI theme packages (i.e. packages with a `-ui` suffix) provide only styling and it's possible that a bundled package is responsible for a UI issue. There are other other bundled UI themes, such as [one-light-ui](https://github.com/atom/one-light-ui). +* [one-dark-syntax](https://github.com/atom/one-dark-syntax) - the default syntax highlighting styles applied for all languages. There are other other bundled syntax themes, such as [solarized-dark](https://github.com/atom/solarized-dark). You should use these packages for reporting issues that appear in many languages, but disappear if you change to another syntax theme. +* [apm](https://github.com/atom/apm) - the `apm` command line tool (Atom Package Manager). You should use this repository for any contributions related to the `apm` tool and to publishing packages. +* [atom.io](https://github.com/atom/atom.io) - the repository for feedback on the [Atom.io website](https://atom.io) and the [Atom.io package API](https://github.com/atom/atom/blob/master/docs/apm-rest-api.md) used by [apm](https://github.com/atom/apm). + +There are many more, but this list should be a good starting point. +For more information on how to work with Atom's official packages, see [Contributing to Atom Packages](https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md). + +Also, because Atom is so extensible, it's possible that a feature you've become accustomed to in Atom or an issue you're encountering aren't coming from a bundled package at all, but rather a [community package](https://atom.io/packages) you've installed. +Each community package has its own repository too, and you should be able to find it in Settings > Packages for the packages you installed and contribute there. + +## How can I contribute? + +### Your First Contribution + +Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues: + +* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two. +* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. + +Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have. + +### Submitting Issues * You can create an issue [here](https://github.com/atom/atom/issues/new), but before doing that please read the notes below on debugging and submitting issues, @@ -44,31 +106,7 @@ By participating, you are expected to uphold this code. Please report unacceptab * Please setup a [profile picture](https://help.github.com/articles/how-do-i-set-up-my-profile-picture) to make yourself recognizable and so we can all get to know each other better. -### Package Repositories - -This is the repository for the core Atom editor only. Atom comes bundled with -many packages and themes that are stored in other repos under the -[Atom organization](https://github.com/atom) such as -[tabs](https://github.com/atom/tabs), -[find-and-replace](https://github.com/atom/find-and-replace), -[language-javascript](https://github.com/atom/language-javascript), and -[atom-light-ui](https://github.com/atom/atom-light-ui). - -If your issue is related to a specific package, open an issue on that package's -issue tracker. If you're unsure which package is causing your problem or if -you're having an issue with Atom core, open an issue on this repository. - -For more information on how to work with Atom's official packages, see -[Contributing to Atom Packages](https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md) - -## Your First Contribution - -Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues: - -* [Beginner issues][beginner] -* [Help wanted issues][help-wanted] - -## Pull Requests +### Pull Requests * Include screenshots and animated GIFs in your pull request whenever possible. * Follow the [CoffeeScript](#coffeescript-styleguide), @@ -94,7 +132,9 @@ Unsure where to begin contributing to Atom? You can start by looking through the * Using a plain `return` when returning explicitly at the end of a function. * Not `return null`, `return undefined`, `null`, or `undefined` -## Git Commit Messages +## Styleguides + +### Git Commit Messages * Use the present tense ("Add feature" not "Added feature") * Use the imperative mood ("Move cursor to..." not "Moves cursor to...") @@ -117,7 +157,7 @@ Unsure where to begin contributing to Atom? You can start by looking through the * :arrow_down: `:arrow_down:` when downgrading dependencies * :shirt: `:shirt:` when removing linter warnings -## CoffeeScript Styleguide +### CoffeeScript Styleguide * Set parameter defaults without spaces around the equal sign * `clear = (count=1) ->` instead of `clear = (count = 1) ->` @@ -140,14 +180,14 @@ Unsure where to begin contributing to Atom? You can start by looking through the * Use `this` instead of a standalone `@` * `return this` instead of `return @` -## Specs Styleguide +### Specs Styleguide - Include thoughtfully-worded, well-structured [Jasmine](http://jasmine.github.io/) specs in the `./spec` folder. - treat `describe` as a noun or situation. - treat `it` as a statement about state or how an operation changes state. -### Example +#### Example ```coffee describe 'a dog', -> @@ -158,7 +198,7 @@ describe 'a dog', -> # spec here ``` -## Documentation Styleguide +### Documentation Styleguide * Use [AtomDoc](https://github.com/atom/atomdoc). * Use [Markdown](https://daringfireball.net/projects/markdown). @@ -167,7 +207,7 @@ describe 'a dog', -> * Reference instance methods with `{ClassName::methodName}` * Reference class methods with `{ClassName.methodName}` -### Example +#### Example ```coffee # Public: Disable the package with the given name. @@ -182,7 +222,9 @@ describe 'a dog', -> disablePackage: (name, options, callback) -> ``` -## Issue and Pull Request Labels +## Additional Notes + +### Issue and Pull Request Labels This section lists the labels we use to help us track and manage issues and pull requests. Most labels are used across all Atom repositories, but some are specific to `atom/atom`. From 683949b75dec5781fd12dfd4353a5fbef9fd82a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Wed, 21 Oct 2015 12:06:32 +0200 Subject: [PATCH 09/45] Increase timeout for starting a profile after opening devtools --- static/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/index.js b/static/index.js index 9bd1f7b20..927c25266 100644 --- a/static/index.js +++ b/static/index.js @@ -141,7 +141,7 @@ } else { currentWindow.openDevTools() currentWindow.once('devtools-opened', function () { - setTimeout(profile, 100) + setTimeout(profile, 1000) }) } } From b35b00990c639493364f3dc3fd690462948e2942 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 21 Oct 2015 13:21:08 +0200 Subject: [PATCH 10/45] Fix broken link to section --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec994be14..c2b9ad2ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ These are just guidelines, not rules, use your best judgment and feel free to pr #### Table Of Contents -[What should I know before I get started?](#introduction) +[What should I know before I get started?](#what-should-i-know-before-i-get-started) * [Code of Conduct](#code-of-conduct) * [Atom and Packages](#atom-and-packages) From 0fbafa8195318de16b6b980089f2c61015ab4223 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 21 Oct 2015 13:24:58 +0200 Subject: [PATCH 11/45] =?UTF-8?q?:art:=20:hammer:=20Use=20=E2=80=94=20inst?= =?UTF-8?q?ead=20of=20-=20for=20dash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c2b9ad2ce..78bb4910f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ Please report unacceptable behavior to [atom@github.com](mailto:atom@github.com) ### Atom and Packages -Atom is a large open source project - it's made up of over [200 repositories](https://github.com/atom). +Atom is a large open source project—it's made up of over [200 repositories](https://github.com/atom). When you initially consider contributing to Atom, you might be unsure about which of those 200 repositories implements the functionality you want to change or report a bug for. This section should help you with that. From 8b3f646aa6422f08d75048acbaf4daae1135b9e1 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 21 Oct 2015 13:25:47 +0200 Subject: [PATCH 12/45] :scissors: extra newline --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 78bb4910f..2ee2d6859 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,6 @@ To get a sense for the packages that are bundled with Atom, you can go to Settin Here's a list of the big ones: * [atom/atom](https://github.com/atom/atom) - Atom Core! The core editor component is responsible for basic text editing (e.g. cursors, selections, scrolling), text indentation, wrapping, and folding, text rendering, editor rendering, file system operations (e.g. saving), and installation and auto-updating. You should also use this repository for feedback related to the [core API](https://atom.io/docs/api/latest/Notification) and for large, overarching design proposals. - * [tree-view](https://github.com/atom/tree-view) - file and directory listing on the left of the UI. * [fuzzy-finder](https://github.com/atom/fuzzy-finder) - the quick file open chooser. * [find-and-replace](https://github.com/atom/find-and-replace) - all search and replace functionality. From a9c2bb27f88fb00ed19e82c2c5029e0881e5cc03 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 21 Oct 2015 13:31:47 +0200 Subject: [PATCH 13/45] :art: :hammer: Prettier description for fuzzy finder --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ee2d6859..9784cf2cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ Here's a list of the big ones: * [atom/atom](https://github.com/atom/atom) - Atom Core! The core editor component is responsible for basic text editing (e.g. cursors, selections, scrolling), text indentation, wrapping, and folding, text rendering, editor rendering, file system operations (e.g. saving), and installation and auto-updating. You should also use this repository for feedback related to the [core API](https://atom.io/docs/api/latest/Notification) and for large, overarching design proposals. * [tree-view](https://github.com/atom/tree-view) - file and directory listing on the left of the UI. -* [fuzzy-finder](https://github.com/atom/fuzzy-finder) - the quick file open chooser. +* [fuzzy-finder](https://github.com/atom/fuzzy-finder) - the quick file opener. * [find-and-replace](https://github.com/atom/find-and-replace) - all search and replace functionality. * [tabs](https://github.com/atom/tabs) - the tabs for open editors at the top of the UI. * [status-bar](https://github.com/atom/status-bar) - the status bar at the bottom of the UI. From 9e82172d1da03c6f45e607405ec979fa6beb9d2c Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 21 Oct 2015 13:38:52 +0200 Subject: [PATCH 14/45] Move and rename section on first contribution --- CONTRIBUTING.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9784cf2cd..c4dee3c17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,8 +12,8 @@ These are just guidelines, not rules, use your best judgment and feel free to pr * [Atom and Packages](#atom-and-packages) [How Can I Contribute?](#how-can-i-contribute) - * [Your First Contribution](#your-first-contribution) * [Submitting Issues](#submitting-issues) + * [Your First Code Contribution](#your-first-code-contribution) * [Pull Requests](#pull-requests) [Styleguides](#styleguides) @@ -73,15 +73,6 @@ Each community package has its own repository too, and you should be able to fin ## How can I contribute? -### Your First Contribution - -Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues: - -* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two. -* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. - -Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have. - ### Submitting Issues * You can create an issue [here](https://github.com/atom/atom/issues/new), but @@ -105,6 +96,15 @@ Both issue lists are sorted by total number of comments. While not perfect, numb * Please setup a [profile picture](https://help.github.com/articles/how-do-i-set-up-my-profile-picture) to make yourself recognizable and so we can all get to know each other better. +### Your First Code Contribution + +Unsure where to begin contributing to Atom? You can start by looking through these `beginner` and `help-wanted` issues: + +* [Beginner issues][beginner] - issues which should only require a few lines of code, and a test or two. +* [Help wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues. + +Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have. + ### Pull Requests * Include screenshots and animated GIFs in your pull request whenever possible. From 8a6915e7a60a852fa6683b7e779d5357495075ed Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 21 Oct 2015 10:56:31 -0700 Subject: [PATCH 15/45] Pass application delegate to PaneElement --- spec/pane-element-spec.coffee | 8 ++++---- src/pane-element.coffee | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/pane-element-spec.coffee b/spec/pane-element-spec.coffee index 3fcdc4ffb..0f19cf595 100644 --- a/spec/pane-element-spec.coffee +++ b/spec/pane-element-spec.coffee @@ -4,7 +4,7 @@ describe "PaneElement", -> [paneElement, container, pane] = [] beforeEach -> - spyOn(atom, "open") + spyOn(atom.applicationDelegate, "open") container = new PaneContainer(config: atom.config, confirm: atom.confirm.bind(atom)) pane = container.getActivePane() @@ -187,11 +187,11 @@ describe "PaneElement", -> it "opens it", -> event = buildDragEvent("drop", [{path: "/fake1"}, {path: "/fake2"}]) paneElement.dispatchEvent(event) - expect(atom.open.callCount).toBe 1 - expect(atom.open.argsForCall[0][0]).toEqual pathsToOpen: ['/fake1', '/fake2'] + expect(atom.applicationDelegate.open.callCount).toBe 1 + expect(atom.applicationDelegate.open.argsForCall[0][0]).toEqual pathsToOpen: ['/fake1', '/fake2'] describe "when a non-file is dragged to the pane", -> it "does nothing", -> event = buildDragEvent("drop", []) paneElement.dispatchEvent(event) - expect(atom.open).not.toHaveBeenCalled() + expect(atom.applicationDelegate.open).not.toHaveBeenCalled() diff --git a/src/pane-element.coffee b/src/pane-element.coffee index 59f003300..a0113d127 100644 --- a/src/pane-element.coffee +++ b/src/pane-element.coffee @@ -44,16 +44,16 @@ class PaneElement extends HTMLElement event.stopPropagation() @getModel().activate() pathsToOpen = Array::map.call event.dataTransfer.files, (file) -> file.path - @open({pathsToOpen}) if pathsToOpen.length > 0 + @applicationDelegate.open({pathsToOpen}) if pathsToOpen.length > 0 @addEventListener 'focus', handleFocus, true @addEventListener 'blur', handleBlur, true @addEventListener 'dragover', handleDragOver @addEventListener 'drop', handleDrop - initialize: (@model, {@views, @open}) -> + initialize: (@model, {@views, @applicationDelegate}) -> throw new Error("Must pass a views parameter when initializing PaneElements") unless @views? - throw new Error("Must pass a open parameter when initializing PaneElements") unless @open? + throw new Error("Must pass an applicationDelegate parameter when initializing PaneElements") unless @applicationDelegate? @subscriptions.add @model.onDidActivate(@activated.bind(this)) @subscriptions.add @model.observeActive(@activeStatusChanged.bind(this)) From 03d2b7783724893df21772ffa9dfd4db8563d695 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 19 Oct 2015 18:16:04 -0700 Subject: [PATCH 16/45] :arrow_up: metrics@0.53.0 Conflicts: package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d5038068..fe4e541b3 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "line-ending-selector": "0.2.0", "link": "0.31.0", "markdown-preview": "0.154.0", - "metrics": "0.52.0", + "metrics": "0.53.0", "notifications": "0.59.0", "open-on-github": "0.38.0", "package-generator": "0.40.0", From 73b854f02aadaa06380fb87ceca8a91984461f27 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 21 Oct 2015 18:59:48 -0600 Subject: [PATCH 17/45] :arrow_up: language-hyperlink --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d8429d61d..9cb47f21d 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "language-git": "0.10.0", "language-go": "0.39.0", "language-html": "0.42.0", - "language-hyperlink": "0.14.0", + "language-hyperlink": "0.15.0", "language-java": "0.16.0", "language-javascript": "0.97.0", "language-json": "0.17.1", From 0883a23f05c70083952e97c5acf44878a879d13b Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Fri, 16 Oct 2015 19:52:10 -0400 Subject: [PATCH 18/45] :arrow_up: electron@0.34.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9cb47f21d..0c0a9bb80 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "0.33.6", + "electronVersion": "0.34.0", "dependencies": { "async": "0.2.6", "atom-keymap": "^6.1.0", From bd199545c04ad69d156df7cfa0660978abe4a1ba Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 21 Oct 2015 20:22:20 -0600 Subject: [PATCH 19/45] In PaneContainer.prototype.saveAll, only save modified items --- spec/pane-container-spec.coffee | 29 ++++++++++++++++++++++++----- src/pane.coffee | 3 ++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/spec/pane-container-spec.coffee b/spec/pane-container-spec.coffee index b94815e45..2002bccd1 100644 --- a/spec/pane-container-spec.coffee +++ b/spec/pane-container-spec.coffee @@ -292,17 +292,36 @@ describe "PaneContainer", -> ] describe "::saveAll()", -> - it "saves all open pane items", -> + it "saves all modified pane items", -> container = new PaneContainer(params) pane1 = container.getRoot() pane2 = pane1.splitRight() - pane1.addItem(item1 = {getURI: (-> ''), save: -> @saved = true}) - pane1.addItem(item2 = {getURI: (-> ''), save: -> @saved = true}) - pane2.addItem(item3 = {getURI: (-> ''), save: -> @saved = true}) + item1 = { + saved: false + getURI: -> '' + isModified: -> true, + save: -> @saved = true + } + item2 = { + saved: false + getURI: -> '' + isModified: -> false, + save: -> @saved = true + } + item3 = { + saved: false + getURI: -> '' + isModified: -> true, + save: -> @saved = true + } + + pane1.addItem(item1) + pane1.addItem(item2) + pane1.addItem(item3) container.saveAll() expect(item1.saved).toBe true - expect(item2.saved).toBe true + expect(item2.saved).toBe false expect(item3.saved).toBe true diff --git a/src/pane.coffee b/src/pane.coffee index 5f0d8dc1b..a47f2c724 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -525,7 +525,8 @@ class Pane extends Model # Public: Save all items. saveItems: -> - @saveItem(item) for item in @getItems() + for item in @getItems() + @saveItem(item) if item.isModified?() return # Public: Return the first item that matches the given URI or undefined if From 610e71c66d2e7d3d56069369526dfa5f872ec414 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Wed, 21 Oct 2015 22:25:18 -0400 Subject: [PATCH 20/45] Fix setting the env variable [ci skip] --- docs/build-instructions/windows.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build-instructions/windows.md b/docs/build-instructions/windows.md index 63f9d1c3e..debdd6570 100644 --- a/docs/build-instructions/windows.md +++ b/docs/build-instructions/windows.md @@ -74,7 +74,7 @@ If none of this works, do install Github Desktop and use its Git shell. Makes li * If you're building Atom with Visual Studio 2013 or above make sure the `GYP_MSVS_VERSION` environment variable is set, and then re-run `script/build`: ```bash - GYP_MSVS_VERSION=2013 # 2015 if using Visual Studio 2015, and so on + $env:GYP_MSVS_VERSION='2013' # '2015' if using Visual Studio 2015, and so on script/build ``` * If you are using Visual Studio 2013 or above and the build fails with some other error message this environment variable might still be required. From 01cbfcbe421be25786e7aca004b02f570eee61c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 15:59:17 +0200 Subject: [PATCH 21/45] :arrow_up: bracket-matcher@0.79.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9cb47f21d..5a92a5fae 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "autosave": "0.23.0", "background-tips": "0.26.0", "bookmarks": "0.38.0", - "bracket-matcher": "0.78.0", + "bracket-matcher": "0.79.0", "command-palette": "0.36.0", "deprecation-cop": "0.54.0", "dev-live-reload": "0.47.0", From 8fe8aecfe94d6bb8e36bbab4fbbd8e57256e6bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:02:34 +0200 Subject: [PATCH 22/45] :arrow_up: find-and-replace@0.189.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a92a5fae..1cca4c517 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "dev-live-reload": "0.47.0", "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", - "find-and-replace": "0.187.1", + "find-and-replace": "0.189.0", "fuzzy-finder": "0.91.0", "git-diff": "0.56.0", "go-to-line": "0.30.0", From 39fc1ee96240de7d10958a4d8f61b47218e31264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:06:46 +0200 Subject: [PATCH 23/45] :arrow_up: fuzzy-finder@0.92.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1cca4c517..44a35f725 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", "find-and-replace": "0.189.0", - "fuzzy-finder": "0.91.0", + "fuzzy-finder": "0.92.0", "git-diff": "0.56.0", "go-to-line": "0.30.0", "grammar-selector": "0.47.0", From 9423af48013556984efb0d019d0cb4af5b2ea677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:08:02 +0200 Subject: [PATCH 24/45] :arrow_up: git-diff@0.57.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44a35f725..0d1b1bc0a 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "exception-reporting": "0.37.0", "find-and-replace": "0.189.0", "fuzzy-finder": "0.92.0", - "git-diff": "0.56.0", + "git-diff": "0.57.0", "go-to-line": "0.30.0", "grammar-selector": "0.47.0", "image-view": "0.55.0", From b0d38bda7f0925d0e28d63b9ad145b91e4a30d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:12:50 +0200 Subject: [PATCH 25/45] :arrow_up: grammar-selector@0.48.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d1b1bc0a..f6ee5b9df 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "fuzzy-finder": "0.92.0", "git-diff": "0.57.0", "go-to-line": "0.30.0", - "grammar-selector": "0.47.0", + "grammar-selector": "0.48.0", "image-view": "0.55.0", "incompatible-packages": "0.25.0", "keybinding-resolver": "0.33.0", From efe815de957f971d3a4e9efcbf87fefaf7b7bcc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:16:25 +0200 Subject: [PATCH 26/45] :arrow_up: markdown-preview@0.156.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6ee5b9df..2f2e8389a 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "keybinding-resolver": "0.33.0", "line-ending-selector": "0.3.0", "link": "0.31.0", - "markdown-preview": "0.155.0", + "markdown-preview": "0.156.0", "metrics": "0.53.0", "notifications": "0.60.0", "open-on-github": "0.38.0", From 1e1c88a49c43708237f005aa190e6265f6172a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:19:17 +0200 Subject: [PATCH 27/45] :arrow_up: notifications@0.61.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f2e8389a..eea69dab6 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "link": "0.31.0", "markdown-preview": "0.156.0", "metrics": "0.53.0", - "notifications": "0.60.0", + "notifications": "0.61.0", "open-on-github": "0.38.0", "package-generator": "0.40.0", "release-notes": "0.53.0", From fad937bb69abe2499f7392d6e7641363255aad04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:20:40 +0200 Subject: [PATCH 28/45] :arrow_up: open-on-github@0.39.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eea69dab6..c7df768e0 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "markdown-preview": "0.156.0", "metrics": "0.53.0", "notifications": "0.61.0", - "open-on-github": "0.38.0", + "open-on-github": "0.39.0", "package-generator": "0.40.0", "release-notes": "0.53.0", "settings-view": "0.230.1", From 9ca97d391a1e3a3ab906a951488fceef6cfe6839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:22:29 +0200 Subject: [PATCH 29/45] :arrow_up: package-generator@0.41.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7df768e0..e2244a47a 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "metrics": "0.53.0", "notifications": "0.61.0", "open-on-github": "0.39.0", - "package-generator": "0.40.0", + "package-generator": "0.41.0", "release-notes": "0.53.0", "settings-view": "0.230.1", "snippets": "0.101.0", From 951c8e842b2fc69aae86a5d8c19571fae916aa54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:23:57 +0200 Subject: [PATCH 30/45] :arrow_up: spell-check@0.62.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2244a47a..2664d6227 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "release-notes": "0.53.0", "settings-view": "0.230.1", "snippets": "0.101.0", - "spell-check": "0.61.1", + "spell-check": "0.62.0", "status-bar": "0.80.0", "styleguide": "0.44.0", "symbols-view": "0.109.0", From 2dfc066ad7826a31a56e29da13e570a00540b92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:29:35 +0200 Subject: [PATCH 31/45] :arrow_up: tree-view@0.193.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2664d6227..0160c0be9 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "symbols-view": "0.109.0", "tabs": "0.85.0", "timecop": "0.33.0", - "tree-view": "0.192.2", + "tree-view": "0.193.0", "update-package-dependencies": "0.10.0", "welcome": "0.31.0", "whitespace": "0.31.0", From d5786a6879b11a3f1afffbe84b57261297a970c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:30:45 +0200 Subject: [PATCH 32/45] :arrow_up: welcome@0.32.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0160c0be9..23902cfec 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "timecop": "0.33.0", "tree-view": "0.193.0", "update-package-dependencies": "0.10.0", - "welcome": "0.31.0", + "welcome": "0.32.0", "whitespace": "0.31.0", "wrap-guide": "0.38.1", "language-c": "0.49.0", From 4699fa472cc95ccdea3187706bf271a4a04b8f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:31:51 +0200 Subject: [PATCH 33/45] :arrow_up: whitespace@0.32.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23902cfec..ada22ad75 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "tree-view": "0.193.0", "update-package-dependencies": "0.10.0", "welcome": "0.32.0", - "whitespace": "0.31.0", + "whitespace": "0.32.0", "wrap-guide": "0.38.1", "language-c": "0.49.0", "language-clojure": "0.18.0", From 359566680bfffefd96edde81dd9d24e8b004c6b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:36:16 +0200 Subject: [PATCH 34/45] :arrow_up: symbols-view@0.110.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ada22ad75..3d749f542 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "spell-check": "0.62.0", "status-bar": "0.80.0", "styleguide": "0.44.0", - "symbols-view": "0.109.0", + "symbols-view": "0.110.0", "tabs": "0.85.0", "timecop": "0.33.0", "tree-view": "0.193.0", From 8e2a27699730cc84fb48c91bd8912b47f484b41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Thu, 22 Oct 2015 16:37:53 +0200 Subject: [PATCH 35/45] :arrow_up: tabs@0.86.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d749f542..546e51dd4 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "status-bar": "0.80.0", "styleguide": "0.44.0", "symbols-view": "0.110.0", - "tabs": "0.85.0", + "tabs": "0.86.0", "timecop": "0.33.0", "tree-view": "0.193.0", "update-package-dependencies": "0.10.0", From 1b0d72b232234cbcaf0faaf3a66c29047e594696 Mon Sep 17 00:00:00 2001 From: Ben Colon Date: Thu, 24 Sep 2015 10:32:09 +0200 Subject: [PATCH 36/45] Add up/down split options when opening uri in a workspace --- spec/workspace-spec.coffee | 84 ++++++++++++++++++++++++++++++++++++++ src/pane.coffee | 24 +++++++++++ src/workspace.coffee | 12 ++++-- 3 files changed, 117 insertions(+), 3 deletions(-) diff --git a/spec/workspace-spec.coffee b/spec/workspace-spec.coffee index c60508640..53860883c 100644 --- a/spec/workspace-spec.coffee +++ b/spec/workspace-spec.coffee @@ -281,6 +281,90 @@ describe "Workspace", -> expect(workspace.paneContainer.root.children[0]).toBe pane1 expect(workspace.paneContainer.root.children[1]).toBe pane4 + describe "when the 'split' option is 'up'", -> + it "opens the editor in the topmost pane of the current pane axis", -> + pane1 = workspace.getActivePane() + pane2 = pane1.splitDown() + expect(workspace.getActivePane()).toBe pane2 + + editor = null + waitsForPromise -> + workspace.open('a', split: 'up').then (o) -> editor = o + + runs -> + expect(workspace.getActivePane()).toBe pane1 + expect(pane1.items).toEqual [editor] + expect(pane2.items).toEqual [] + + # Focus bottom pane and reopen the file on the top + waitsForPromise -> + pane2.focus() + workspace.open('a', split: 'up').then (o) -> editor = o + + runs -> + expect(workspace.getActivePane()).toBe pane1 + expect(pane1.items).toEqual [editor] + expect(pane2.items).toEqual [] + + describe "when a pane axis is the topmost sibling of the current pane", -> + it "opens the new item in the current pane", -> + editor = null + pane1 = workspace.getActivePane() + pane2 = pane1.splitUp() + pane3 = pane2.splitRight() + pane1.activate() + expect(workspace.getActivePane()).toBe pane1 + + waitsForPromise -> + workspace.open('a', split: 'up').then (o) -> editor = o + + runs -> + expect(workspace.getActivePane()).toBe pane1 + expect(pane1.items).toEqual [editor] + + describe "when the 'split' option is 'down'", -> + it "opens the editor in the bottommost pane of the current pane axis", -> + editor = null + pane1 = workspace.getActivePane() + pane2 = null + waitsForPromise -> + workspace.open('a', split: 'down').then (o) -> editor = o + + runs -> + pane2 = workspace.getPanes().filter((p) -> p isnt pane1)[0] + expect(workspace.getActivePane()).toBe pane2 + expect(pane1.items).toEqual [] + expect(pane2.items).toEqual [editor] + + # Focus bottom pane and reopen the file on the right + waitsForPromise -> + pane1.focus() + workspace.open('a', split: 'down').then (o) -> editor = o + + runs -> + expect(workspace.getActivePane()).toBe pane2 + expect(pane1.items).toEqual [] + expect(pane2.items).toEqual [editor] + + describe "when a pane axis is the bottommost sibling of the current pane", -> + it "opens the new item in a new pane split to the bottom of the current pane", -> + editor = null + pane1 = workspace.getActivePane() + pane2 = pane1.splitDown() + pane1.activate() + expect(workspace.getActivePane()).toBe pane1 + pane4 = null + + waitsForPromise -> + workspace.open('a', split: 'down').then (o) -> editor = o + + runs -> + pane4 = workspace.getPanes().filter((p) -> p isnt pane1)[0] + expect(workspace.getActivePane()).toBe pane4 + expect(pane4.items).toEqual [editor] + expect(workspace.paneContainer.root.children[0]).toBe pane1 + expect(workspace.paneContainer.root.children[1]).toBe pane2 + describe "when an initialLine and initialColumn are specified", -> it "moves the cursor to the indicated location", -> waitsForPromise -> diff --git a/src/pane.coffee b/src/pane.coffee index 6cf505b54..d71c06fe3 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -678,6 +678,30 @@ class Pane extends Model else @splitRight() + # If the parent is a vertical axis, returns its first child if it is a pane; + # otherwise returns this pane. + findTopmostSibling: -> + if @parent.orientation is 'vertical' + [topmostSibling] = @parent.children + if topmostSibling instanceof PaneAxis + this + else + topmostSibling + else + this + + # If the parent is a vertical axis, returns its last child if it is a pane; + # otherwise returns a new pane created by splitting this pane bottomward. + findOrCreateBottommostSibling: -> + if @parent.orientation is 'vertical' + bottommostSibling = last(@parent.children) + if bottommostSibling instanceof PaneAxis + @splitRight() + else + bottommostSibling + else + @splitDown() + close: -> @destroy() if @confirmClose() diff --git a/src/workspace.coffee b/src/workspace.coffee index 8e15a950e..32f2473e8 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -361,9 +361,11 @@ class Workspace extends Model # initially. Defaults to `0`. # * `initialColumn` A {Number} indicating which column to move the cursor to # initially. Defaults to `0`. - # * `split` Either 'left' or 'right'. If 'left', the item will be opened in - # leftmost pane of the current active pane's row. If 'right', the - # item will be opened in the rightmost pane of the current active pane's row. + # * `split` Either 'left', 'right', 'top' or 'bottom'. + # If 'left', the item will be opened in leftmost pane of the current active pane's row. + # If 'right', the item will be opened in the rightmost pane of the current active pane's row. + # If 'up', the item will be opened in topmost pane of the current active pane's row. + # If 'down', the item will be opened in the bottommost pane of the current active pane's row. # * `activatePane` A {Boolean} indicating whether to call {Pane::activate} on # containing pane. Defaults to `true`. # * `searchAllPanes` A {Boolean}. If `true`, the workspace will attempt to @@ -383,6 +385,10 @@ class Workspace extends Model @getActivePane().findLeftmostSibling() when 'right' @getActivePane().findOrCreateRightmostSibling() + when 'up' + @getActivePane().findTopmostSibling() + when 'down' + @getActivePane().findOrCreateBottommostSibling() else @getActivePane() From 1539e2c9c068d70c2b828f16f8693afac0b25222 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 22 Oct 2015 13:00:07 -0600 Subject: [PATCH 37/45] :arrow_up: tree-view --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7832737ce..d35fab4db 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "symbols-view": "0.110.0", "tabs": "0.86.0", "timecop": "0.33.0", - "tree-view": "0.193.0", + "tree-view": "0.194.0", "update-package-dependencies": "0.10.0", "welcome": "0.32.0", "whitespace": "0.32.0", From 334e70ea3e520a13369aa6be6ec4c9746496132e Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 23 Oct 2015 13:16:43 -0600 Subject: [PATCH 38/45] :arrow_up: first-mate Fixes #9153 Signed-off-by: Max Brunsfeld --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d35fab4db..1c047693e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "color": "^0.7.3", "event-kit": "^1.3.0", "find-parent-dir": "^0.3.0", - "first-mate": "^5.1.0", + "first-mate": "^5.1.1", "fs-plus": "^2.8.0", "fstream": "0.1.24", "fuzzaldrin": "^2.1", From 0c2ef37afbab12b6ec49da39da54dfc08e9db5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Sat, 24 Oct 2015 13:37:26 +0200 Subject: [PATCH 39/45] :arrow_up: fuzzy-finder@0.93.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c047693e..6e5b493d0 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "encoding-selector": "0.21.0", "exception-reporting": "0.37.0", "find-and-replace": "0.189.0", - "fuzzy-finder": "0.92.0", + "fuzzy-finder": "0.93.0", "git-diff": "0.57.0", "go-to-line": "0.30.0", "grammar-selector": "0.48.0", From 9b46f7cb6b10d30d8944244ba033c647d05b0974 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Sun, 25 Oct 2015 17:01:36 +0100 Subject: [PATCH 40/45] :arrow_up: styleguide@0.45.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e5b493d0..aec21226d 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "snippets": "0.101.0", "spell-check": "0.62.0", "status-bar": "0.80.0", - "styleguide": "0.44.0", + "styleguide": "0.45.0", "symbols-view": "0.110.0", "tabs": "0.86.0", "timecop": "0.33.0", From 5e1c2632e689be6b15d113c4880c4b19525a0c10 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 25 Oct 2015 18:28:56 -0700 Subject: [PATCH 41/45] :memo: Fix Cursor.getScreenPosition comment return type --- src/cursor.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cursor.coffee b/src/cursor.coffee index c9ebca8c7..40cde4aca 100644 --- a/src/cursor.coffee +++ b/src/cursor.coffee @@ -75,7 +75,7 @@ class Cursor extends Model @changePosition options, => @marker.setHeadScreenPosition(screenPosition, options) - # Public: Returns the screen position of the cursor as an Array. + # Public: Returns the screen position of the cursor as a {Point}. getScreenPosition: -> @marker.getHeadScreenPosition() From bfca04e63465e0ce9ae684da6a894e4719783569 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Mon, 26 Oct 2015 12:31:55 +0100 Subject: [PATCH 42/45] :arrow_up: settings-view@0.231.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aec21226d..e91fbd654 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "open-on-github": "0.39.0", "package-generator": "0.41.0", "release-notes": "0.53.0", - "settings-view": "0.230.1", + "settings-view": "0.231.0", "snippets": "0.101.0", "spell-check": "0.62.0", "status-bar": "0.80.0", From 75f7d729736e4ba5ce5f114fbef662f23bf1d120 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 27 Oct 2015 10:18:06 +0100 Subject: [PATCH 43/45] :arrow_up: tabs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e91fbd654..ad69d58a4 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "status-bar": "0.80.0", "styleguide": "0.45.0", "symbols-view": "0.110.0", - "tabs": "0.86.0", + "tabs": "0.87.0", "timecop": "0.33.0", "tree-view": "0.194.0", "update-package-dependencies": "0.10.0", From 908316ec7219ca12b5ad75c063d0107b0f2290f6 Mon Sep 17 00:00:00 2001 From: "Yakira C. Bristol" Date: Tue, 27 Oct 2015 18:20:37 -0400 Subject: [PATCH 44/45] Remove keyPath as a possible return value on the event object for onDidChange in config.coffee The value is never returned on the object so the documention was updated to reflect that --- src/config.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config.coffee b/src/config.coffee index cb09a8d83..663dbb777 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -422,7 +422,6 @@ class Config # * `event` {Object} # * `newValue` the new value of the key # * `oldValue` the prior value of the key. - # * `keyPath` the keyPath of the changed key # # Returns a {Disposable} with the following keys on which you can call # `.dispose()` to unsubscribe. From ff525c9faf3cc44282a70463684bc79bd2e7639a Mon Sep 17 00:00:00 2001 From: Daniel Hengeveld Date: Wed, 28 Oct 2015 09:58:11 +0100 Subject: [PATCH 45/45] :arrow_up: language-coffee-script@0.43.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad69d58a4..cf24a07e8 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "wrap-guide": "0.38.1", "language-c": "0.49.0", "language-clojure": "0.18.0", - "language-coffee-script": "0.42.0", + "language-coffee-script": "0.43.0", "language-csharp": "0.11.0", "language-css": "0.34.0", "language-gfm": "0.81.0",