49 Commits

Author SHA1 Message Date
Nathan Sobo
e192922f0e Don’t add __spacePenView property to jQuery objects in ViewRegistry
This property is added as needed in our legacy SpacePen views, and is
now used to trigger a deprecation warning. We don’t want to add it to
new SpacePen views because they shouldn’t trigger deprecation warnings.
2015-01-02 12:58:49 -07:00
Nathan Sobo
4591f00a65 Remove view registry references from the workspace model layer
Removed various ::getView methods from the model. Using the atom.views
global in the views for now, but going to switch them over to using a
locally assigned view registry instead in a subsequent commit.
2014-12-01 16:28:33 -08:00
Ben Ogle
b29a61ec87 Update deprecation warning test 2014-11-06 15:19:49 -08:00
Ben Ogle
50c705fea4 Remove unnecessary code
cc @nathansobo as you meant to remove this originally
2014-11-06 10:16:11 -08:00
Nathan Sobo
eedf4894ae Use ‘atom-pane-container’ custom tag name for PaneContainerElement 2014-10-09 07:39:14 -07:00
Nathan Sobo
5cb31c874f Properly emit item argument in pane:before-item-destroyed legacy event 2014-10-01 17:58:09 -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
Nathan Sobo
32f0eb4f76 Don’t emit repeated attached events for the same PaneView 2014-09-24 15:28:34 -06:00
Nathan Sobo
da87f321e8 Add PaneAxisElement 2014-09-24 15:28:34 -06:00
Nathan Sobo
2cc6c9e4c0 💄 2014-09-24 15:28:34 -06:00
Nathan Sobo
cf8dc29cc5 Use Pane::onDidAddItem instead of ::observeItems
The former includes the index at which the item was added and the latter
does not.
2014-09-24 15:28:33 -06:00
Nathan Sobo
de29ca6906 Keep existing PaneView SpacePen API working as before
We will eventually deprecate all access to views via
`atom.workspaceView`, which is the only way to get a reference to
instances of PaneView. Draining the swamp!
2014-09-24 15:28:33 -06:00
Nathan Sobo
20e08323c1 Use the ViewRegistry to construct pane item views 2014-09-19 16:24:12 -06:00
Nathan Sobo
0877721ce9 Construct PaneAxisViews and PaneViews via ViewRegistry 2014-09-19 16:24:12 -06:00
Ben Ogle
29f53d4432 PaneView is private 2014-09-18 16:52:56 -07:00
Kevin Sawicki
c291c705ec Add missing support to deprecation message 2014-09-18 11:51:45 -07:00
Ben Ogle
3f3284a8db Move the deprecations 2014-09-11 13:33:50 -07:00
Ben Ogle
f39114a95c Subscribe to items via event methods.
Add deprecation warnings when they don’t return a disposable
2014-09-11 10:48:03 -07:00
Ben Ogle
7fe567521e Use the model methods in the commands 2014-09-04 17:09:52 -07:00
Ben Ogle
336afc32c2 Add PaneView::getModel() 2014-09-04 16:48:04 -07:00
Nathan Sobo
95e9686b37 Emit legacy item-added DOM event correctly 2014-08-28 14:42:13 -06:00
Nathan Sobo
c25ab0db43 Rename ::disposables to ::subscriptions in PaneView
Now that emissary’s Subscriber no longer conflicts with the name
2014-08-28 11:43:09 -06:00
Nathan Sobo
b9feed8eb4 Handle objects in subscriptions instead of multiple args 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
b6c669a292 Subscribe with new event methods in PaneView 2014-08-28 11:43:07 -06:00
Ben Ogle
c294208f87 📝 Convert PaneView docs 2014-08-25 15:13:45 -07:00
Kevin Sawicki
d3e1c004fb Add status segment to event name 2014-08-13 17:46:23 -07:00
Desmond Brand
d16c0e9e41 Implement setDocumentEdited too
As requested by @philipgiuliani

Test Plan:
Opened an existing file and made a modification. The icon fades at the same
time the tab close button changes to a circle. Undo makes the icon opaque
again.
2014-08-04 20:45:24 -07:00
Kevin Sawicki & Nathan Sobo
68c3113b75 Call hide on the views instead of the jQuery collection
This ensures that views with custom ::hide methods can invoke special
behavior.
2014-05-21 17:11:36 -06:00
Pascal Borreli
7070ed8ae4 Fixed typos 2014-05-07 08:52:58 +01:00
Corey Johnson
01298bb470 Fix deprecation message 2014-04-22 16:22:23 -07:00
probablycorey
56222a072a Add deprecation warnings 2014-04-01 16:59:16 -07:00
Kevin Sawicki
151d22c325 Destroy items on pane:close
Previously pane:close would do nothing because of the guards in
Pane::destroy.

Also renames the menu to Close Pane to be more accurate.

Closes #1686
2014-03-11 13:22:03 -07:00
probablycorey
b042dffc2c Rename Workspace::getPanes to Workspace::getPaneViews 2014-02-18 15:39:05 -08:00
probablycorey
51fbb1be07 Add Pane::getActiveItem 2014-02-11 08:59:34 -08:00
Kevin Sawicki
967db1f7b8 Remove more empty Private: comment blocks 2014-02-06 11:21:03 -08:00
Kevin Sawicki
a03aad6f5e 📝 doc PaneView::getContainer 2014-02-04 11:48:25 -08:00
Nathan Sobo
41dd4a386a Restore PaneView::getContainer. Turns out it's actually public. 2014-01-15 16:07:47 -07:00
Nathan Sobo
9af4b14716 Never allow PaneContainer::root to be null 2014-01-15 16:07:47 -07:00
Nathan Sobo
ca71bf224b Destroy the pane completely on 'pane:close' (not just its items) 2014-01-15 16:07:47 -07:00
Nathan Sobo
b5947f5a56 Merge branch 'master' into ns-pane-model-specs 2014-01-15 15:54:49 -07:00
Nathan Sobo
d57e5f389d Don't null out the model of a pane item view when removing it
Fixes #1422 (I think)
2014-01-15 14:20:30 -07:00
Nathan Sobo
dd0ae8a8ea Don't remove PaneViews when their model is destroyed
They will be removed by their parent PaneContainerView or PaneAxisView,
and removing them in the previous way circumvented some of our focus
preservation logic.
2014-01-14 20:09:14 -07:00
Nathan Sobo
c350285044 Move Workspace and PaneContainer serialization to the model layer
The views are now stateless. You just construct them with a model to
deserialize.
2014-01-14 11:38:27 -07:00
Nathan Sobo
7199cda549 Derive PaneView::activeView from the model's activeItem
We're getting into some strange order-sensitive cases where we respond
to a change of the active item before the pane has a chance to reassign
the active view. Therefore it makes more sense to always just derive the
active view from the active item.
2014-01-14 10:58:34 -07:00
Nathan Sobo
a8ddc530a2 Emit a pane-item-destroyed event from the workspace model
…Instead of calling itemDestroyed on the workspace view via a DOM query
2014-01-14 10:58:34 -07:00
Nathan Sobo
8931bf8f3a Rename PaneModel to Pane 2014-01-13 13:51:15 -07:00
Nathan Sobo
4f604ced3c Rename Pane to PaneView 2014-01-13 13:46:22 -07:00