Commit Graph

6312 Commits

Author SHA1 Message Date
Corey Johnson & Nathan Sobo
06c9a3ac86 Remove empty panes when PaneContainer deserializes 2013-03-08 11:45:20 -08:00
Corey Johnson & Nathan Sobo
8ca8841f9e Make command-panel's editor have -webkit-flex: 1
We moved the setting of flex on editors to the panes stylesheet
previously, but here is another context where we need flex to be
set.
2013-03-08 11:14:44 -08:00
Corey Johnson & Nathan Sobo
cf6c46ba3a Tree view deselects entry when active item has no path 2013-03-08 11:10:13 -08:00
Nathan Sobo
22d1336aa0 Apply correct flexbox styling to .pane > .item-views > *
Markdown preview was overflowing because the min-height of flexbox
items is automatically set to min-content. Setting it to 0 ensures that
the item doesn't expand beyond its flex size. Moving this styling to
atom.css ensures that people don't have to work too hard to fit
their views into panes.
2013-03-08 10:56:23 -08:00
Corey Johnson & Nathan Sobo
7e33bd17e0 Make markdown preview views fit into panes and work w/ a single buffer 2013-03-07 15:49:33 -08:00
Corey Johnson & Nathan Sobo
0f1ffdaee8 Set the window title to 'untitled' when the active item has no title 2013-03-07 15:34:28 -08:00
Corey Johnson & Nathan Sobo
e26d2e5637 WIP: Preview markdown in next pane, splitting current pane if needed 2013-03-07 14:53:42 -08:00
Corey Johnson & Nathan Sobo
d84614866a Add Pane.getNextPane 2013-03-07 14:32:10 -08:00
Corey Johnson & Nathan Sobo
ff50bc2e6f Add toBeInstanceOf and toHaveLength jasmine matchers 2013-03-07 14:32:10 -08:00
Corey Johnson & Nathan Sobo
98c9012bdb 💩 2013-03-07 14:31:04 -08:00
Corey Johnson & Nathan Sobo
0375d7f45a 💄 2013-03-07 14:25:34 -08:00
Corey Johnson & Nathan Sobo
17f4d6f064 EditSession reloads its grammar on the 'grammars-loaded' event 2013-03-07 14:25:14 -08:00
Corey Johnson & Nathan Sobo
39fabaa344 Update RootView.deserialize specs so they break on a version mismatch 2013-03-07 11:09:39 -08:00
Corey Johnson & Nathan Sobo
91b5c3e9c7 Make refresh work again by fixing version in RootView.serialize 2013-03-07 11:07:03 -08:00
Corey Johnson & Nathan Sobo
cac6c854d2 💄 2013-03-07 10:25:51 -08:00
Corey Johnson & Nathan Sobo
dba7c08f59 Add serialization version to root view 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo
c3456dd5ac Remove serialization methods from editor 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo
6257bcf0f5 Rename root view serialization keys 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo
8333f14ef8 Throw away serialized state if its version doesn't match deserializer 2013-03-07 09:30:30 -08:00
Corey Johnson & Nathan Sobo
4f0bf9020b Fix pane focus and active item serialization
Also: Un-x root view serialization specs
2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo
d4fc718e8e Update window title when a pane item's title changes 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo
c1d19c4c5c Rename restoreItem to reopenItem on pane container 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo
ffb8bcd71d Add pane:reopen-closed-item command 2013-03-07 09:30:29 -08:00
Corey Johnson & Nathan Sobo
5ad53bb32c Add restoreItem to Pane container 2013-03-07 09:30:29 -08:00
Nathan Sobo
96fefe94f0 Fix broken specs after rebase 2013-03-07 09:30:29 -08:00
Nathan Sobo
f2e5fcc902 Move autosave from editor into panes 2013-03-07 09:30:29 -08:00
Nathan Sobo
d97e91bdcb Make meta-# bindings work with new panes 2013-03-07 09:30:29 -08:00
Nathan Sobo
f23d9091f2 Add pane:close-other-items 2013-03-07 09:30:29 -08:00
Nathan Sobo
4b8d786d2a 💄 2013-03-07 09:30:29 -08:00
Nathan Sobo
7ebce683c6 Move saveAll and specs to PaneContainer
And simplify the specs… we don't *really* need to save. We can just
ensure that save is called on everything.
2013-03-07 09:30:29 -08:00
Nathan Sobo
e4bf73b41c Give the view a chance to update before presenting next dialog 2013-03-07 09:30:28 -08:00
Nathan Sobo
f0398f2331 Ensure modal dialogs are presented in a coherent order
Modal dialogs can be presented while other modal dialogs are already
being displayed. Previously, dialogs were always displayed in the order
they were requested. But say you have two untitled buffers in a
pane and you close all items… You'll display prompt dialogs for both
buffers asking the user if they want to save. If the user answers yes
to the first dialog, they should see the path selection dialog before
they see the save prompt for the second buffer.

This commit uses a stack of queues to store deferred dialogs and allow
dialogs presented by the dismissal of another dialog to take precedence
over other pending dialogs.
2013-03-07 09:30:28 -08:00
Nathan Sobo
48c693d756 Add 'pane:close' event, which destroys all pane items.
Still have some issues with the presentation order of dialogs with
multiple unsaved buffers and no paths. But for the 99% case this works
as is.
2013-03-07 09:30:28 -08:00
Nathan Sobo
da986b6a6c Fix RootView.saveAll() 2013-03-07 09:30:28 -08:00
Nathan Sobo
fff5d5158f Pass items through in editor's pane-splitting convenience methods 2013-03-07 09:30:28 -08:00
Nathan Sobo
bb15389b66 Add 'Pane.saveItems' and corresponding event 2013-03-07 09:30:28 -08:00
Nathan Sobo
685df18a3a Fix breakages due to save method moving to Pane (except saveAll specs) 2013-03-07 09:30:28 -08:00
Nathan Sobo
3f9ee08e76 Handle save-as on pane. Replace 'editor:save-as' w/ 'core:save-as'
Pane will only show the saveAs dialog if the item has a `saveAs` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo
59a06acc0b Fire 'modified-status-changed' events on changes after save/reload
Buffer keeps state about the value with which it fired the last
modified-status-changed event so that it doesn't fire it twice with the
same boolean value. Every piece of code that triggers the event also
needs to set this state, so now everything goes through the
`triggerModifiedStatusChanged` method.
2013-03-07 09:30:28 -08:00
Nathan Sobo
699e780e99 Handle save in panes with new 'core:save' event 2013-03-07 09:30:28 -08:00
Nathan Sobo
6ae684d609 Kill commented specs that were used as a reminder 2013-03-07 09:30:28 -08:00
Nathan Sobo
54fc9efdcb Eliminate fixturesProject global. Use project global instead. 2013-03-07 09:30:27 -08:00
Nathan Sobo
9f7b804a6c Panes prompt to save modified items before destroying them 2013-03-07 09:30:27 -08:00
Nathan Sobo
d5654cf0df 💄 2013-03-07 09:30:27 -08:00
Nathan Sobo
43b41e9ed9 Fix spell check spec 2013-03-07 09:30:27 -08:00
Nathan Sobo
298a963148 Rework Buffer's 'contents-modified' event
This event now fires whenever the content of the buffer changes (after 
a rate-limiting delay) with a single boolean indicating the modified
status of the buffer. There's now a separate event called
'modified-status-changed' to indicate events that change the boolean
value of the isModified method, so we don't need to fire
'contents-modified' when the underlying file is deleted for instance.
2013-03-07 09:30:27 -08:00
Nathan Sobo
a1dc2cfc2d Tabs indicate when their items are modified 2013-03-07 09:30:27 -08:00
Nathan Sobo
24c9f11cc9 Trigger modified-status-changed on buffers/edit sessions 2013-03-07 09:30:27 -08:00
Nathan Sobo
29566d55c6 Scope split-view bindings on body so fuzzy-finder can open in splits
Previously, they were scoped on .pane, but fuzzy-finder isn't inside
a pane and still needs to be able to respond to split events.
2013-03-07 09:30:27 -08:00
Corey Johnson & Nathan Sobo
5bba4cd9f7 Kill dead tab view code 2013-03-07 09:30:27 -08:00