Commit Graph

15844 Commits

Author SHA1 Message Date
Jason Rudolph
f62cb5d427 🐛 Don't attempt to copy items that aren't copyable 2017-06-08 15:42:39 -04:00
Jason Rudolph
de47d3d439 🎨 Extract function: Pane::isItemAllowed(item) 2017-06-07 15:45:02 -04:00
Jason Rudolph
296e407284 Check an item's allowed locations when moving/copying to pane 2017-06-07 12:59:54 -04:00
Jason Rudolph
cd24e820f5 💚 Fix linter failure 2017-05-31 13:13:09 -04:00
Jason Rudolph
8cae9a1365 🎨 Refactor: Extract getVisiblePanes() function 2017-05-31 12:01:10 -04:00
Jason Rudolph
0e3dfc3ba1 🎨 Refactor: Extract getVisiblePaneContainers() function 2017-05-31 11:57:57 -04:00
Jason Rudolph
fc007edddd 🎨 Refactor initialization of visiblePaneContainers
xref: https://github.com/atom/atom/pull/14640#discussion_r119169281
2017-05-31 11:53:05 -04:00
Jason Rudolph
4c9acf00b3 🎨 Nobody's getting paid by lines of code
xref: https://github.com/atom/atom/pull/14640#pullrequestreview-41023656
2017-05-31 11:51:17 -04:00
Jason Rudolph
81b05023db Refactor: Move directional pane fns to WorkspaceElement 2017-05-25 08:51:22 -04:00
Jason Rudolph
1dfdd84393 Add ability to move directionally across *all* visible panes
Prior to this change, the following commands successfully move between
panes in the workspace center, but they could not move between the the
panes in the workspace center and panes in the docks:

- window:focus-pane-above
- window:focus-pane-below
- window:focus-pane-on-left
- window:focus-pane-on-right
- window:move-active-item-to-pane-above
- window:move-active-item-to-pane-below
- window:move-active-item-to-pane-on-left
- window:move-active-item-to-pane-on-right
- window:copy-active-item-to-pane-above
- window:copy-active-item-to-pane-below
- window:copy-active-item-to-pane-on-left
- window:copy-active-item-to-pane-on-right

This commit updates these commands to work across all visible panes,
regardless of whether the pane is in the workspace center or a dock.

Summary of approach:

- Add tests for the `nearestVisiblePaneInDirection`, which provides the
  core logic for the higher-level methods like `focusPaneViewAbove`,
  `moveActiveItemToPaneAbove`, `focusPaneViewOnLeft`, etc.
    - Test the generic logic extensively (i.e., the logic that is
      independent of whether the given pane resides in the workspace
      center or a dock)
    - Also test the navigation between docks and the workspace center
- Since the core logic is tested in the new tests above, simplify the
  tests for the higher-level methods (e.g., `focusPaneViewAbove`,
  `moveActiveItemToPaneAbove`, `focusPaneViewOnLeft`) to avoid
  unnecessary duplication.
- Add `nearestVisiblePaneInDirection` to `WorkspaceElement`, implemented
  in terms of the existing `nearestPaneInDirection` method on
  `PaneContainerElement` for now.
2017-05-24 17:30:15 -04:00
Jason Rudolph
efa440f705 Merge pull request #14460 from atom/jr-activate-next-or-previous-pane-in-dock
Fix ability to activate next/previous pane in a dock
2017-05-22 10:03:26 -04:00
Antonio Scandurra
a7066e387f Fix lint errors
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-19 11:07:38 +02:00
Antonio Scandurra
d158e44374 Merge branch 'master' into tj-upgrade-electron 2017-05-19 11:05:15 +02:00
Antonio Scandurra
2c3500503f Use custom snapshot row translation to prevent Electron 1.6 reload crash
Adding a source map for the entire snapshot was expensive in terms of
memory and seemed to be triggering some sort of bug in Chromium when
reloading with the DevTools open.

The custom row translation relies on a much more compact representation
of the data and avoids the crash.

Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-19 10:23:13 +02:00
Max Brunsfeld
e99545ee41 Fix exception when starting to drag text 2017-05-18 10:13:48 -07:00
Michelle Tilley
b15ce0c3f6 Merge pull request #14424 from atom/mkt-update-github-0.0.10
⬆ github@0.0.10
2017-05-18 17:10:57 +02:00
Lee Dohm
b28d0445d2 Fix search issues menu link
The previous link would give a 404 when the user was not logged in to
GitHub. This link works whether logged in or not.
2017-05-17 13:01:55 -07:00
Jason Rudolph
ae9f24602d 🐛 Fix #14442
Fixes error activating next/previous pane from Dock.
2017-05-17 15:28:24 -04:00
Michelle Tilley
11c1151928 👕 2017-05-17 21:08:11 +02:00
Michelle Tilley
5cd0049881 Remove debug logging 2017-05-17 21:08:05 +02:00
Michelle Tilley
cff71e4806 Path normalization 2017-05-17 20:56:30 +02:00
Michelle Tilley
ff354ec3a7 Another logging 2017-05-17 20:56:24 +02:00
Michelle Tilley
86d45a5b9b Add temporary build debugging 2017-05-17 20:39:16 +02:00
Michelle Tilley
ddfd30bc22 Unregister custom package transpilation config after transpilation 2017-05-17 20:23:59 +02:00
Antonio Scandurra
a106a3baa0 🎨 2017-05-16 15:19:13 +02:00
Antonio Scandurra
d44876f3bc Merge branch 'master' into tj-upgrade-electron 2017-05-16 14:39:47 +02:00
Antonio Scandurra
3b3505d969 Always allow to destroy free-form folds from the gutter 2017-05-16 14:36:50 +02:00
Antonio Scandurra
ad6202cadb Show foldable icon on the last screen row belonging to a buffer row 2017-05-16 14:26:57 +02:00
Antonio Scandurra
4c5127ca2f Update foldable icon when a row's foldability changes 2017-05-16 14:05:11 +02:00
Lee Dohm
3bc6b48d76 Merge pull request #14417 from atom/version-pinned-packages
Add config schema for version pinned packages
2017-05-15 13:45:08 -07:00
Lee Dohm
6740952c1c Add config schema for version pinned packages 2017-05-15 11:18:22 -07:00
Antonio Scandurra
2e363c3d58 Merge pull request #14403 from atom/fb-mdt-pane-steals-focus
Pane shouldn't steal focus from its children
2017-05-15 16:15:21 +02:00
Lee Dohm
1559c8a047 Merge pull request #12946 from jamsinclair/11848-fix-moving-line-without-line-ending
Fixes #11848 Moving line up without line ending
2017-05-13 15:00:46 -07:00
Matthew Dapena-Tretter
0aa4c1a976 Pane shouldn't steal focus from its children
This was removed in #14175 in order to solve #14173 (editors not being
focused when clicking tabs). However, it means that the pane steals
focus from its children. The solution is to add the guard back and to
solve #14173 in another way: by delaying the activation of the item
(see atom/tabs#439).
2017-05-12 13:50:19 -07:00
Antonio Scandurra
96533998e2 Fix editor element tests on Windows 2017-05-12 16:51:05 +02:00
Antonio Scandurra
186bcd70a5 Fix running packages preloading tests in interactive mode
This change also makes the test more useful, as it verifies that reading
metadata from package.json's `packagesCache` works correctly.
2017-05-12 10:11:58 +02:00
Nathan Sobo
8743298c4c Avoid polluting test with click events on the test runner
We now pass an isolated document into the AtomEnvironment instance under
test to avoid accidentally handling clicks on the test runner itself.
2017-05-11 17:59:40 -06:00
Nathan Sobo
2e2b35c32c Avoid problems related to calling startEditorWindow in tests 2017-05-11 17:44:16 -06:00
Max Brunsfeld
07c2a8e8d6 Merge pull request #14339 from atom/mb-dont-change-focus-when-hiding-unfocused-dock
Don't change focus when hiding an unfocused dock
2017-05-11 16:28:27 -07:00
Nathan Sobo
d584bd6adb Eliminate reliance on local storage in HistoryManager
It's causing test failures locally and enough time has passed that most
user data should be transitioned to indexed DB by now.
2017-05-11 16:58:54 -06:00
Nathan Sobo
b61e978a80 Merge pull request #14387 from atom/ns-mb-close-and-save-center
Act on active center items only when saving and closing
2017-05-11 14:29:39 -06:00
Antonio Scandurra
8ff5d81384 Prevent unnecessary clipping of buffer range in isFoldedAtBufferRow
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-11 20:12:10 +02:00
Antonio Scandurra
2f2f481fb5 Don't clip screen range when autoscrolling from Cursor
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-11 19:25:14 +02:00
Antonio Scandurra
c59e972f42 Use buffer coordinates in isFoldedAtCursorRow
This avoid an extra screen-to-buffer coordinate translation.

Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-11 19:18:40 +02:00
Antonio Scandurra
955d11b7cc 💄 Fix more lint errors 2017-05-11 19:13:06 +02:00
Antonio Scandurra
729ae0ea51 Merge branch 'master' into tj-upgrade-electron
# Conflicts:
#	script/package.json
#	src/task.coffee
2017-05-11 18:05:12 +02:00
Antonio Scandurra
b1466742d4 Don't use snapshots in Task
They are not providing much value, as we are not already loading
anything from the snapshot require cache.
2017-05-11 16:52:02 +02:00
Antonio Scandurra
1b27df639d 💄 2017-05-11 16:08:26 +02:00
Antonio Scandurra
9346ff9e63 Speed up parsing the snapshot source map
When calling remote functions or emitting deprecation warnings
respectively Electron and Grim create a fake `Error` object to retrieve
the stack trace of the current call site.

When doing this for the first time, if the call site was located inside
a snapshotted file, previously we would parse the source map for the
snapshot and translate the position of each call in the stack trace.
However, since the snapshot source map is quite big, we were observing
major slowdowns when parsing it for the first time.

With this commit we will parse the snapshot source map while generating
the snapshot, which will allow to not pay for it during runtime.

Signed-off-by: Michelle Tilley <binarymuse@github.com>
2017-05-11 14:21:45 +02:00
Antonio Scandurra
32f03c8a22 Delete unused code 2017-05-11 11:07:21 +02:00