Commit Graph

32262 Commits

Author SHA1 Message Date
Jason Rudolph
e1719a8923 Teach Workspace::reset() to properly reset hasActiveTextEditor 2017-06-02 15:56:13 -04:00
Jason Rudolph
2347c9bdaa Always invoke callback with current active text editor
This makes observeActiveTextEditor consistent with observers like
observeActivePaneItem, which always invoke the callback with the current
value, regardless of whether that value is undefined or not.
2017-06-02 15:55:00 -04:00
Jason Rudolph
44a2be7c9d Test deserialization in terms of user-observable functionality
- Rework serialization/deserialization test
- Move simulateReload function so that it can be used in multiple
describe blocks
2017-06-02 15:30:53 -04:00
Jason Rudolph
9629caefb7 Remove unnecessary serialization 2017-06-02 15:09:20 -04:00
Jason Rudolph
5b61c0a949 🐛 Initialize active editor state correctly after reload
Fixes the following bug:

1. Open Atom
2. Open a file
3. Observe the file's encoding in the status bar
4. Reload Atom
5. Close the file
6. Observe that the closed file's encoding is still present in the
status bar

This bug occured because the reload did not deserialize/serialze the
workspace's active text editor state. As a result, when closing the
text editor in step 5, we failed to notify observers that there is no
longer an active text editor.
2017-06-02 08:01:42 -04:00
Jason Rudolph
5dfbb65b0e 🎨 Reduce ternaries 2017-06-01 17:09:38 -04:00
Jason Rudolph
6a694f80f4 🎨 Replace instanceof check with nullness check
xref: https://github.com/atom/atom/pull/14695#discussion_r119721719
2017-06-01 17:04:43 -04:00
Jason Rudolph
fe550a1b03 🎨 Refactor: Introduce explaining variable
xref: https://github.com/atom/atom/pull/14695#discussion_r119721719
2017-06-01 17:04:17 -04:00
Jason Rudolph
14d8eccc6e 📝 Add API docs for observeActiveTextEditor(callback) 2017-06-01 15:47:31 -04:00
Jason Rudolph
5b52d8c77a 📝 Add API docs for onDidChangeActiveTextEditor(callback) 2017-06-01 15:44:37 -04:00
Jason Rudolph
09495dfc35 🔥 Remove broken Dock::getTextEditors() function
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.
2017-06-01 15:31:21 -04:00
Jason Rudolph
0b314ac1a9 🔥 Remove broken Dock::observeTextEditors(callback) fn
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.
2017-06-01 15:26:12 -04:00
Jason Rudolph
f8ebd71200 Deprecate Dock::getActiveTextEditor() 2017-06-01 15:24:50 -04:00
Jason Rudolph
e569f8fc4d 📝 Fix odd grammar in API docs 2017-06-01 12:08:09 -04:00
Jason Rudolph
16e1ef917b Update Workspace specs regarding editors in docks 2017-06-01 09:34:56 -04:00
Jason Rudolph
05efc143ed Add Workspace::observeActiveTextEditor() 2017-05-31 16:17:54 -04:00
Jason Rudolph
cf50625cc6 Teach Workspace::getActiveTextEditor() to get item from center 2017-05-31 14:32:20 -04:00
Jason Rudolph
61a52d49aa Allow text editors in the workspace center, but not in docks 2017-05-31 14:06:46 -04:00
simurai
60c1b85ede ⬆️ one-dark/light-ui@v1.10.5 2017-05-31 11:06:09 +09:00
Michelle Tilley
a8593c57a5 Merge pull request #13691 from atom/wl-build-on-node-7
Allow building on Node 7+
2017-05-30 18:17:07 -07:00
Michelle Tilley
1f56e068cd Update docs and checks for Node 6 2017-05-30 17:08:12 -07:00
Michelle Tilley
93b742700c Revert to Node 6 on CI 2017-05-30 17:04:11 -07:00
Wliu
7a93e9d8c4 👕 2017-05-30 15:42:16 -04:00
Wliu
16be073c91 Merge branch 'master' into wl-build-on-node-7 2017-05-30 15:40:02 -04:00
Ash Wilson
58313f6abd ⬆️ welcome to 0.36.4 2017-05-30 14:33:25 -04:00
Ash Wilson
0e90ba820b ⬆️ github to 0.3.0 2017-05-30 14:32:54 -04:00
Wliu
1397221678 📝 Fix image not displaying 2017-05-30 00:49:26 -04:00
Lee Dohm
c78ffa2e82 Merge pull request #14643 from atom/nobody-learned-us-gooder-than-you-mrs-thomas
📝 Update and clean up CONTRIBUTING guide
2017-05-25 14:01:26 -07:00
Lee Dohm
70e3501427 📝 Update and clean up CONTRIBUTING guide 2017-05-25 13:05:21 -07:00
Lee Dohm
0b0a72af84 ⬆️ find-and-replace@0.208.3 2017-05-25 10:30:19 -07:00
Ash Wilson
8ac0d1dc6d ⬆️ background-tips 2017-05-25 11:17:15 -04:00
Wliu
7cfcdadbfb ⬆️ first-mate@7.0.7 2017-05-24 22:27:29 -04:00
Wliu
693f9fa56b Merge pull request #14634 from atom/wl-update-languages
Update languages
2017-05-24 21:26:24 -04:00
Wliu
575820e96f ⬆️ language-c@0.58.1 2017-05-24 20:24:03 -04:00
Wliu
2d04db836c ⬆️ language-text@0.7.3 2017-05-24 19:05:48 -04:00
Wliu
a57d9ec95a ⬆️ language-python@0.45.3 2017-05-24 19:05:20 -04:00
Wliu
468b9d66a2 ⬆️ language-sql@0.25.6 2017-05-24 19:04:34 -04:00
Wliu
613e35e334 ⬆️ language-hgtml@0.47.3 2017-05-24 19:03:58 -04:00
Wliu
a4aa46b0b4 ⬆️ language-go@0.44.1 2017-05-24 19:03:15 -04:00
Wliu
e507964a5b ⬆️ language-java@0.27.2 2017-05-24 19:02:35 -04:00
Wliu
896a811b2d ⬆️ language-xml@0.35.1 2017-05-24 19:01:52 -04:00
Wliu
f21ee3e9a9 ⬆️ language-shellscript@0.25.1 2017-05-24 19:01:13 -04:00
Wliu
87ebaa8769 ⬆️ language-gfm@0.89.1 2017-05-24 19:00:31 -04:00
Wliu
7f1aa2cf5f ⬆️ language-clojure@0.22.3 2017-05-24 18:59:36 -04:00
Wliu
a7b5bcd0ae ⬆️ language-ruby@0.71.1 2017-05-24 18:58:44 -04:00
Wliu
a4c5dc219c ⬆️ language-yaml@0.30.0 2017-05-24 18:58:02 -04:00
Wliu
fb7bf9fa27 ⬆️ language-php@0.39.0 2017-05-24 18:57:18 -04:00
Damien Guard
f19c37951f Temp squirrel folder to alleviate path length issues on future releases 2017-05-24 15:25:54 -07:00
Ian Olsen
676f3cb65d ⬆️ tree-view 2017-05-24 11:10:02 -07:00
ungb
9e64abef3f ⬆️ notification@0.67.2 2017-05-24 10:46:14 -07:00