Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Use new Atom Docks API #27

Merged
merged 3 commits into from Jul 15, 2017
Merged

Use new Atom Docks API #27

merged 3 commits into from Jul 15, 2017

Conversation

jacobmendoza
Copy link
Collaborator

@jacobmendoza jacobmendoza commented May 28, 2017

Hi folks!

This is a proposal to add the new Docks API to the package as per this issue.

Basically, this is the change from the old pane to the new API, removing the UI that we had to close the runner (the Docks provide the logic required to do this, so packages don't implement it themselves).

Most of the logic that controls the default values has been pushed to the (old) Panel class that acts as a view. As with the new Docks API is possible to have multiple panes in the same dock, I have renamed the class from Panel to AvaPanel as it may be useful to identify the class in an Array (by type).

For consistency and as the UI was already prepared to be shown on the right side of the editor, I have constrained the possible options to just 'left' and 'right' keeping 'right' as the default.

We still have a feature that allows the user to close the pane by clicking ESC/core:cancel when the editor is focused. I wonder if maybe we should get rid completely of this behavior and allow the pane to be closed naturally with CMD-W.

Cheers!

Note: Once the package has been activated and the UI rearranged in some way (moved, resized) these values will override the default. To recover the defaults, this command can be executed:

atom --clear-window-state


Fixes #26

@sindresorhus
Copy link
Member

This looks very good. Thanks for working on it.

We still have a feature that allows the user to close the pane by clicking ESC/core:cancel when the editor is focused. I wonder if maybe we should get rid completely of this behavior and allow the pane to be closed naturally with CMD-W.

Yes, let's remove it.

@jacobmendoza
Copy link
Collaborator Author

Hey @sindresorhus, thank you!.

Apologies for the delay. The custom behavior that we had has been removed, so now it looks like other native implementations of the Docks API (the easiest example, the Github plugin that now ships with Atom).

One thing that has been confusing and at this point, I don't know if I misunderstood or the behavior has actually changed, is that the docks do not seem to accept the "focus" now. So, they can't be closed using CMD-W as I previously said.

As far as I have seen, other implementations react exactly the same.

@sindresorhus sindresorhus merged commit 2c4af94 into master Jul 15, 2017
@sindresorhus sindresorhus deleted the use-new-atom-docks-api branch July 15, 2017 17:17
@sindresorhus
Copy link
Member

Looks great. Thanks for working on this :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use new Atom Docks API
2 participants