Commit Graph

183 Commits

Author SHA1 Message Date
Ben Ogle
6159209d49 moveItemTo* -> moveItem* 2014-11-10 13:28:15 -08:00
Ardeshir Javaherchi
ff80545285 🐧 Add keymap implementation to reorder tabs in linux 2014-11-10 11:25:16 -08:00
Nathan Sobo
efd3329c50 Prompt to save modified items when closing a pane via pane:close
Fixes #4094
2014-11-10 07:55:37 -07:00
Nathan Sobo
33fde29acb Disallow activation of destroyed panes
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-11-07 15:45:21 -07:00
Nathan Sobo
86781e6f9a Assign pane container before emitting onDidAddPane events
Fixes #3972
2014-10-27 11:39:42 -06:00
Nathan Sobo
0ebedeec3a Merge remote-tracking branch 'origin/master' into ns-workspace-custom-elements
Conflicts:
	package.json
	src/workspace.coffee
2014-09-26 14:49:28 -06:00
Ben Ogle
683d0d1b16 Editor -> TextEditor 2014-09-25 15:14:29 -07:00
Ben Ogle
82c53b539a editor.coffee -> text-editor.coffee 2014-09-25 15:14:29 -07:00
Nathan Sobo
9d2bb71109 More cleanup 2014-09-25 12:35:08 -06:00
Nathan Sobo
1c58438124 Move PaneContainerView::confirmClose to the model layer 2014-09-24 15:46:01 -06:00
Nathan Sobo
df37d77895 Remove Pane::getViewClass as we now use a view provider 2014-09-24 15:28:34 -06:00
Nathan Sobo
2710c06313 WIP: First stab at custom element for panes
Still need to create a SpacePen shim for access via `atom.workspaceView`
property so we’re backward compatible with packages, but it basically
works.
2014-09-24 15:28:33 -06:00
Nathan Sobo
55cce48af1 Throw an exception if the same pane item is added twice in the workspace 2014-09-19 16:24:13 -06:00
Nathan Sobo
0877721ce9 Construct PaneAxisViews and PaneViews via ViewRegistry 2014-09-19 16:24:12 -06:00
Kevin Sawicki
95253758f3 Dispose emitter after emitting did-destroy 2014-09-18 11:51:45 -07:00
Ben Ogle
a81393320c Support a copyActiveItem param in Pane::split* methods 2014-09-04 16:41:20 -07:00
Nathan Sobo
67dc703c18 💄 docs 2014-09-03 16:46:53 -06:00
Nathan Sobo
7ad992e52f 💄 2014-09-03 16:35:46 -06:00
Nathan Sobo
87fb0b46f7 Deprecate theorist-provided behaviors in Pane 2014-09-03 16:31:14 -06:00
Nathan Sobo
873818ee52 Deprecate string-based event subscriptions 2014-09-03 16:21:42 -06:00
Nathan Sobo
877fa40a49 Activate next pane on before invoking onDidDestroy observers 2014-08-28 17:23:49 -06:00
Nathan Sobo
cee7539e35 Add PaneContainer::observePanes and ::onDidAddPane 2014-08-28 17:22:28 -06:00
Nathan Sobo
5471e9bccc Add PaneContainer::onDidDestroyPaneItem 2014-08-28 16:58:38 -06:00
Nathan Sobo
b60b9f3e3a Add Pane::observeItems 2014-08-28 16:40:54 -06:00
Nathan Sobo
12f78dd957 💄 2014-08-28 16:27:20 -06:00
Nathan Sobo
cea4db5381 Break pane API into sections 2014-08-28 16:24:53 -06:00
Nathan Sobo
345617e0f3 Clean up existing pane API docs 2014-08-28 15:57:30 -06:00
Nathan Sobo
78c24fb737 Remove legacy event documentation 2014-08-28 15:54:16 -06:00
Nathan Sobo
e88eb3012e Document Pane event subscription methods 2014-08-28 15:32:02 -06:00
Nathan Sobo
d7063c0932 Add Pane::onDidDestroy 2014-08-28 15:21:35 -06:00
Nathan Sobo
34cb5d6012 Don’t implement ::isActive in terms of the theorist model behavior 2014-08-28 15:21:10 -06:00
Nathan Sobo
4f826a70f8 Use Array instead of Sequence for Pane::items 2014-08-28 11:43:08 -06:00
Nathan Sobo
475dc6074c 💄 2014-08-28 11:43:08 -06:00
Nathan Sobo
40d93cd0cf Use Pane::setActiveItem internally so observers are invoked 2014-08-28 11:43:08 -06:00
Nathan Sobo
99d70b4a4e Don’t emit ::onDidChangeActiveItem events unless it really changes 2014-08-28 11:43:08 -06:00
Nathan Sobo
e7a7e86dea Add Pane::observeActive and ::observeActiveItem
These have behavior semantics, invoking the observer immediately with
the current value of the observed property.
2014-08-28 11:43:07 -06:00
Nathan Sobo
44d70aaa5b Add Pane::onDidChangeActive() 2014-08-28 11:43:07 -06:00
Nathan Sobo
2b63f8a4ee Add PaneContainer::onDidChangeActivePane 2014-08-28 11:43:07 -06:00
Nathan Sobo
8225f759bf Add Pane::onWillDestroyItem() 2014-08-28 11:43:07 -06:00
Nathan Sobo
2d58d9c8b5 Add Pane::onDidActivate 2014-08-28 11:43:07 -06:00
Nathan Sobo
548018e9b2 Add spec for onDidRemoveItem observers when moving items to other panes 2014-08-28 11:43:07 -06:00
Nathan Sobo
9bd2eec4bc Add Pane::onDidMoveItem() 2014-08-28 11:43:07 -06:00
Nathan Sobo
b8fcbe9451 Start adding event subscription methods to pane
This branch uses EventKit, an ultra-simple library for implementing
events. The object implementing the methods maintains its own emitter
object rather than doing a mixin like Emissary encourages. This will
make it easier for us to deprecate ::on on the object itself. Unlike
emissary, the EventKit Emitter implements a super minimalistic API that
only allows one value to be emitted and always returns a Disposable
from subscriptions.
2014-08-28 11:43:06 -06:00
Ben Ogle
c294208f87 📝 Convert PaneView docs 2014-08-25 15:13:45 -07:00
Ben Ogle
d7f3add250 📝 Convert Pane docs 2014-08-25 15:13:45 -07:00
Nathan Sobo
b2c70f9e69 Move serialization of active pane from Pane to PaneContainer
Fixes #2694
Fixel #2853

Previously, we were storing an `active` boolean for each pane. We've
had some strange bugs where every pane is serializing `active: false`,
which causes exceptions when loading up the stored data.

This new approach serializes the activePaneId on the PaneContainer
itself. Since the PaneContainer is the source of truth regarding the
active pane, it makes more sense to handle it here.

This unfortunately changes the serialization version for the
PaneContainer, so people won't have their state persisted after
upgrading. But it seems better than leaving cruft to handle the old
serialization situation.
2014-07-07 16:36:10 -06:00
Nathan Sobo
43b5a9cfd0 Don't set focused: true on new pane when splitting
This causes the active item to change in the model before the associated
view can be added, which causes problems with the ReactEditorView having
methods called on it before its afterAttach hook creates the component.

We call Pane::activate subsequently unless activation is suppressed,
which will focus the pane anyway, so this was redundant.
2014-06-09 16:48:51 +09:00
Nathan Sobo
b1563fdfc0 Destroy item's of last pane even if the pane itself is not destroyed
We always want to preserve at least one pane, so we don't call destroy
on the pane if it is the last pane. However, we still want to destroy
its items. This was previously relying on the view to destroy the
underlying item, which isn't as reliable as doing it in the model.
2014-06-09 15:04:51 +09:00
Kevin Sawicki
8b5fd64dd4 Guard against PaneAxis as first child
Pane::findLeftmostSibling expected to return a Pane, not a PaneAxis
2014-05-05 11:28:36 -07:00
Kevin Sawicki
1c514bdc6b Split right when rightmost sibling is an axis
This was previously throwing an error when Workspace::open was called
with a split: right option and the rightmost sibling was a PaneAxis
since it was assuming findOrCreateRightmostSibling was always returning
a Pane, not a PaneAxis.
2014-05-05 11:28:36 -07:00