Today’s Atom 1.16 release comes with two more macOS title bar options, a push to remove jQuery and other improvements.
More title bar options (macOS)
On macOS you can now choose between two more title bar options (Settings > Core Settings > Title Bar
).
Option 1: custom-inset
adds a bit more padding around the “traffic lights”. This might not seem that useful on first glance, but the “traffic lights” will look more aligned when combined with something that needs more height. For example when the title bar gets replaced with a tool bar.
Option 2: hidden
completely removes the title bar for people that like things minimalistic or want to save an extra 22 pixels. To drag the window the status bar can be used.
Note that by enabling these options some functionality will be lost. Especially when the title bar is hidden managing the window needs to be done with keyboard shortcuts or using the menu.
Don’t forget to check out all the other improvements shipping with this version in the release notes! :memo:
Project search performance
We’ve improved the performance of displaying project search results by only rendering visible DOM nodes.
Atom 1.17 Beta
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. Until 1.17 lands on stable and we update our official API documentation, you’ll need to consult the source code to do so… here are the relevant classes:
Workspace
Dock
WorkspaceCenter
You can 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. We’ll have an in-depth post on this next week.
Farewell to jQuery
We have now removed jQuery completely as a dependency 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
There are many more details in the release notes.
Get all these improvements today by joining the Atom Beta Channel!