We're updating Atom to disallow editors in docks. As a result, we need
to remove Dock::getTextEditors(). Normally, we would deprecate a method
before removing it, but this method is broken and has never worked:
atom.workspace.getLeftDock().getTextEditors()
(unknown) Uncaught TypeError: this.paneContainer.getTextEditors is not a function
at Dock.getTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:590:37)
at <anonymous>:1:30
Since the method is broken, we know that nobody is relying on it.
Instead of deprecating the method, we can just remove it.
We're updating Atom to disallow editors in docks. As a result, we need
to remove Dock::observeTextEditors(callback). Normally, we would
deprecate a method before removing it, but this method is broken and has
never worked:
atom.workspace.getLeftDock().observeTextEditors(console.log)
(unknown) Uncaught TypeError: this.paneContainer.getTextEditors is not a function
at Dock.getTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:590:37)
at Dock.observeTextEditors (/Applications/Atom.app/Contents/Resources/app/src/dock.js:396:41)
at <anonymous>:1:30
getTextEditors @ <embedded>:29933
observeTextEditors @ <embedded>:29739
(anonymous) @ VM1941:1
Since the method is broken, we know that nobody is relying on it.
Instead of deprecating the method, we can just remove it.
Previously, we would get the initial size every time we didn't have an
explicit one. With this commit, we only get the initial size when we
deserialize and when we go from 0 -> 1 pane items.
Also, if the dock doesn't already have an explicit size, we'll use the
preferred size of the item being dragged when peaking the dock. That
way, dropping it won't cause it to change size.
Currently, the absolutely positioned element is the only thing with a
size. That means that it'll cover the center. With this change, we give
a size to the (relatively-positioned) atom-dock element so that closed
docks take up canvas space instead.
I think @simurai mentioned this problem before but I wasn't following
and then forgot about it. 😖