Max Brunsfeld
0015e026a2
Add Workspace.paneContainerForItem method
2017-04-17 11:34:45 -07:00
Matthew Dapena-Tretter
abd8f2c0b7
🐛 Fix URI resolution in openSync()
...
@Alhadis noticed I missed this in 53ec839 .
2017-04-13 23:44:47 -07:00
Max Brunsfeld
82a7a6c78a
Always search a pane container w/ the given URI in workspace.open
2017-04-12 10:23:49 -07:00
Nathan Sobo
e0309883bb
Merge pull request #14137 from atom/ns-mb-document-workspace-item-interface
...
Document pane item interface on Workspace
2017-04-11 20:20:00 -06:00
Nathan Sobo
1641d9bb7d
Merge pull request #14174 from atom/ns-as-avoid-deserialization-error
...
Avoid errors deserializing 1.17 workspace state in prior Atom versions
2017-04-11 11:10:50 -06:00
Nathan Sobo
879f6bf454
Avoid errors deserializing 1.17 workspace state in prior Atom versions
2017-04-11 10:04:52 -06:00
Max Brunsfeld
c43bfafdfb
Move hoveredDock property from Workspace to WorkspaceElement
...
It's not used in Workspace anymore.
2017-04-10 14:18:58 -07:00
Max Brunsfeld
399b70662d
Fix regression in hovered dock tracking due to workspace refactor
...
Also, backfill tests for showing, hiding and updating the dock toggle
buttons in response to mouse movements.
2017-04-10 14:15:31 -07:00
Max Brunsfeld
48336fb95e
Don't use workspace's itemLocationStore in tests
2017-04-07 15:30:44 -07:00
Max Brunsfeld
63d27c5f0a
Rename Dock.isOpen to .isVisible and Dock.open to .show
2017-04-06 17:23:53 -07:00
Max Brunsfeld
b5a449ba39
Fix lint errors
2017-04-06 16:44:44 -07:00
Matthew Dapena-Tretter
6efe462378
Remove unused require
2017-04-06 17:27:17 -06:00
Matthew Dapena-Tretter
d133b03d7d
Remove saveFocusedPaneItem(As) methods
...
Now that dock pane items will be capable of being the workspace's
active item, there's no need to have these methods.
2017-04-06 17:26:35 -06:00
Nathan Sobo
40b9fd9f5d
Deprecate atom.workspace.paneContainer
2017-04-06 17:24:03 -06:00
Nathan Sobo
497eba7d24
Store center and docks in Worskpace.paneContainers sub-object
2017-04-06 17:17:05 -06:00
Nathan Sobo
52d8cbfb0e
Handle (de)serialization in WorkspaceCenter
2017-04-06 17:07:20 -06:00
Nathan Sobo
f808411c96
Destroy WorkspaceCenter and Docks instead of PaneContainer
2017-04-06 16:58:33 -06:00
Nathan Sobo
9c28cc0fa8
Construct WorkspaceCenter's PaneContainer instance in the constructor
2017-04-06 16:57:41 -06:00
Nathan Sobo
5bd24d9e05
Remove unnecessary subscriptions
2017-04-06 16:38:01 -06:00
Nathan Sobo
1711d10af2
Aggregate onDidStopChangingActivePaneItem events across all containers
2017-04-06 16:35:25 -06:00
Nathan Sobo
6f6ec70094
Allow items closed in docks to be reopened
2017-04-06 15:57:26 -06:00
Nathan Sobo
68f5448fbe
Forward focusNext/PreviousPane to the active pane container
2017-04-06 15:50:45 -06:00
Nathan Sobo
646047f563
Maintain an active pane container on the workspace
...
This will be used by many commands that previously only interacted with
the center of the workspace.
2017-04-06 15:30:01 -06:00
Nathan Sobo
ec576b12bc
Remove PaneContainer.monitorActivePaneItem
...
Call didChangeActiveItemOnPane directly from panes and when the active
pane changes instead.
2017-04-06 13:18:18 -06:00
Nathan Sobo
73f04fdaed
Focus the active center pane when hiding a dock
2017-04-05 20:58:05 -06:00
Max Brunsfeld
d0421a75c8
Add Panel.getElement and remove Panel view provider
2017-04-05 16:10:21 -07:00
Max Brunsfeld
d1e8e359ce
Add PanelContainer.getElement, remove PanelContainer view provider
2017-04-05 16:03:33 -07:00
Max Brunsfeld
6d55371930
Add Workspace.getElement method, remove WorkspaceElement view provider
2017-04-05 15:32:00 -07:00
Nathan Sobo
b7478e410f
Update docs for renamed methods in workspace item interface
2017-04-05 14:55:49 -06:00
Max Brunsfeld
c810ac4f5b
Merge pull request #14136 from atom/mb-ns-dont-auto-open-dock-when-adding-item
...
Open docks when activating their panes, but not when adding items
2017-04-05 12:44:21 -07:00
Max Brunsfeld
caafa41f6f
Open docks when activating their panes, but not when adding items
2017-04-05 12:00:38 -07:00
Nathan Sobo
6ac29939e5
Merge pull request #14125 from atom/mb-ns-open-with-item
...
Allow workspace item objects to be passed to Workspace.open
2017-04-05 12:59:03 -06:00
Nathan Sobo
30f79babda
Document more methods
2017-04-05 10:34:42 -06:00
Nathan Sobo
215f5fd1fb
Document pane item interface on Workspace
2017-04-04 17:19:48 -06:00
Matthew Dapena-Tretter
fed2372c30
Don't store default locations
...
This will probably be less confusing for developers experimenting with
changing the default location. Also, we avoid storing extra info we
don't really need.
2017-04-04 14:49:34 -07:00
Max Brunsfeld
32ff2f37d9
Merge pull request #14108 from atom/fb-mdt-remember-moved-item-positions
...
🐛 Fix observation of moved items
2017-04-04 10:20:24 -07:00
Nathan Sobo
56cefbbc63
Support passing items to Workspace.toggle and .hide
...
Also, ensure that passing an item that is not yet present in the
workspace does not interfere with resolving the location where we want
to place the item.
2017-04-04 11:18:12 -06:00
Max Brunsfeld
1552854f3b
Allow workspace item objects to be passed to Workspace.open
2017-04-04 11:18:12 -06:00
Nathan Sobo
01556be163
Document workspace items
2017-04-03 13:32:04 -06:00
Matthew Dapena-Tretter
4ed53578ce
🐛 Fix observation of moved items
...
`PaneContainer::onDidAddPaneItem` isn't triggered on moves.
2017-03-31 16:48:49 -07:00
Matthew Dapena-Tretter
9663101671
Always add opened items to the workspace
...
This commit changes the behavior of `open()` so that the item will be
added to the workspace—even if the `activateItem` option is false.
This provides a way to open (and add) an item without activating it,
but removes the ability to open without adding. For that, we've made
the `createItemForURI()` method public 😊
2017-03-31 14:17:09 -07:00
Nathan Sobo
5557219fbc
Merge pull request #14027 from atom/fb-mdt-save-focused-pane-item
...
Add `saveFocusedPaneItem()` and call it in "core:save" command
2017-03-31 13:57:50 -06:00
Matthew Dapena-Tretter
dec52a7384
Add atom.workspace.hide()
...
This adds an method for hiding items by URI and re-implements
`toggle()` in terms of it. (tbh it's really just extracting most of
`toggle()` into a new function.)
2017-03-30 17:37:55 -07:00
Nathan Sobo
c7a4755808
If Workspace.open finds existing item, yield event loop
...
This ensures that the function always behaves asynchronously regardless
of the state of the workspace.
/cc @maxbrunsfeld
Signed-off-by: Antonio Scandurra <as-cii@github.com >
2017-03-29 09:27:21 -06:00
Matthew Dapena-Tretter
0d12396bf3
Add saveFocusedPaneItem() and call it in "core:save" command
...
Also, do the same for "core:save-as" and `saveFocusedPaneItemAs()`.
This behavior change means that pane items in docks (#13977 ) will be
savable too.
2017-03-28 14:05:29 -07:00
Nathan Sobo
45bd466384
Don’t add item in Workspace.open if activateItem is false
...
We thought it was a bug that activateItem: false caused the
item not to be added, but it turned out there were package
tests that depended on this behavior.
Ideally, we should have an addItem option that exhibits this
behavior instead.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2017-03-28 15:00:13 -06:00
Matthew Dapena-Tretter
3b23ab44bc
Add getLocation() to PaneContainer class
...
This allows the location to be inspected without having to jump to the
DOM and searching for a dock element.
2017-03-27 17:45:21 -07:00
Matthew Dapena-Tretter
401a549bf5
Don't open items in disallowed locations
2017-03-27 17:45:21 -07:00
Max Brunsfeld
bc872143cc
Avoid duplicate search for pane container in Workspace.open
2017-03-24 15:49:35 -07:00
Max Brunsfeld
4082b67fb0
Refactor Workspace.open
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2017-03-24 15:35:52 -07:00