Atom 1.17
May 16, 2017 iolsen
Today’s Atom 1.17 release comes with the introduction of docks, faster startup time with V8 snapshots, farewell to jQuery and other improvements.
Introducing Docks
Docks are an extension of Atom’s pane system designed to hold interface elements that you want to quickly toggle into and out of view. This is a common pattern for tool panels such as the tree view, debugger controls, terminals, consoles, regex railroad diagrams, etc.
Docks provide a high-level API that makes it simpler for package authors to implement this kind of easy-to-toggle panel and give users a lot more control over how their panels are arranged. Just like panes in the center of the Atom workspace, panes within docks can be split and resized in arbitrary ways, and since dock panes can contain multiple tabbed items, it’s now possible for tool panels written by different package authors to coherently share screen real estate at the periphery of the workspace.
For now, the tree-view is the only part of the default Atom UI that will make use of docks, but we’d love for package authors to start experimenting during the beta period. At the API level, you add items to docks in much the same way you’ve always added items to the center of the workspace, via atom.workspace.open
. Dock items are just like regular pane items, but they also need implement the getDefaultLocation()
method and return 'left'
, 'right'
, or 'bottom'
rather than the default value of 'center'
. We’ve also made it possible to pass items directly to atom.workspace.open
instead of forcing you to specify a URI and custom opener. So, to summarize, a minimal code snippet that adds an item to a dock looks like the following.
const item = {
element: document.createElement('div'),
getTitle () { return 'My Fabulous Div' },
getDefaultLocation () { return 'left' },
}
atom.workspace.open(item)
We’ve added a new tutorial to the flight manual that covers docks. You can also dig into the API for other facilities such as the ability to limit items to specific locations, specify default dimensions, toggle dock item visibility, and more.
Also check out this tree-view PR for an example of converting a panel to a dock item. One major thing worth noting is that panes and items within docks are now included in various global workspace methods such as getActivePaneItem
, observeActivePane
, etc. If you want to limit your scope to just the center of the workspace as was the case before docks existed, you’ll need to interact with the new WorkspaceCenter
class, available via atom.workspace.getCenter()
.
A huge thanks to Facebook’s Nuclide team for developing docks and taking the time to upstream this feature into the core of Atom.
Faster startup time with V8 snapshots
We’ve dramatically reduced window load times by using V8 custom startup snapshots to shift work that was happening on window startup to happen during Atom’s build instead.
Farewell to jQuery
We have now removed jQuery completely as a dependency of Atom’s bundled packages, which will result in improved performance by avoiding some forced reflows during DOM manipulation. Here are some of the PRs.
- Replaced atom-space-pen-views with etch and, where appropriate, also manual DOM manipulation
- Using atom-select-list as a drop-in replacement for atom-space-pen-views
- Removed atom-space-pen-views
- Overhauled package and remove atom-space-pen-views
- Replaced atom-space-pen-views with etch
- Overhauled ArchiveView and remove atom-space-pen-views
Other Improvements
- Fix for middle-mouse-button paste on Linux. Thanks to @dietmar for fixing a long-standing issue!
- Restore the Atom environment when adding project folders to a fresh window
Don’t forget to check out all the other improvements shipping with this version in the release notes!
Atom 1.18 Beta
Git and GitHub Integration
We’re thrilled to be shipping rich integration with Git and GitHub in Atom 1.18! This is merely the first release but we’re excited about what it already brings to the editor. Check out posts here and on the GitHub engineering blog for more details. Our very own Phil Haack is putting it through its paces in a talk at GitHub Satellite next week in London!
More Improvements
- Improved tokenizing performance via oniguruma caching
- Correctly launch Atom from Windows Subsystem for Linux
- Added an option to always restore previous session
- Added settings for showing context in find-and-replace
- Improved suggestions in autocomplete-html
There are many more details in the release notes.
Get all these improvements today by joining the Atom Beta Channel!