Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

feat: add two new reveal options for the tree-view - #715

Closed
kumarharsh wants to merge 2 commits into
atom:masterfrom
kumarharsh:revelations
Closed

kumarharsh wants to merge 2 commits into
atom:masterfrom
kumarharsh:revelations

Conversation

@kumarharsh

Copy link
Copy Markdown
Contributor
  1. AutoReveal - control the revealing of files automatically as they
    are switched in the panes.
  2. FocusOnReveal - control whether the focus on the editor panes is
    transferred to the tree-view pane on calling 'reveal-active-file'

This adds a small behaviour which is more in line with what
SublimeText offers. This PR also addresses other open issues/PRs
like: #247 #459 #188

Kumar Harsh added 2 commits January 30, 2016 19:49
1. AutoReveal - control the revealing of files automatically as they
    are switched in the panes.
2. FocusOnReveal - control whether the focus on the editor panes is
    transferred to the tree-view pane on calling 'reveal-active-file'
@kumarharsh

Copy link
Copy Markdown
Contributor Author

@kuychaco can someone review this PR?

@benogle

benogle commented Feb 10, 2016

Copy link
Copy Markdown
Contributor

Can you split these out into 2 PRs, one for each option? The focus option is less controversial, and looks like we'll be able to merge that.

@kumarharsh

Copy link
Copy Markdown
Contributor Author

Meaning the autoreveal is controversial? Even if it's configurable

@benogle

benogle commented Feb 10, 2016

Copy link
Copy Markdown
Contributor

I think we need to think about that one a little more.

@kumarharsh

Copy link
Copy Markdown
Contributor Author

What are the concerns if any, if I may know.

@benogle

benogle commented Feb 10, 2016

Copy link
Copy Markdown
Contributor

It's yet another option. Do we really need it? We'd really like to limit the number of options if we can. Maybe it can be the default behavior? Does it have to do with the focus option? Like is the behavior different when the focus option is checked? Basically someone needs to look at it a little more deeply. So by splitting the PR, it allows us the merge the one that seems like a no brainer, and think about the other.

@kumarharsh

Copy link
Copy Markdown
Contributor Author

Yeah sure, I'd do that tomorrow. Although both options play well with each other and everything else. I thought to keep the autoreveal as an option because some people might like the default functionality (since it's been given with atom for so long)

@iolsen iolsen added the atom label Feb 10, 2016
@laughedelic

Copy link
Copy Markdown

@benogle

It's yet another option. Do we really need it?

There are at least 3 packages (that I know) with this functionality:

Looking at the downloads I would say that people use them. But none of them is perfect, so having it as a native option which plays well with all the others would be much better.

@kumarharsh 👍

@kumarharsh

Copy link
Copy Markdown
Contributor Author

@laughedelic thanks. Didn't know these many were already there... Actually didn't even search for it 😝

This is a small init script I wrote before deciding to contribute here:

atom.workspace.observeActivePane (pane) ->
  pane.onDidChangeActiveItem ->
    workspace = atom.views.getView(atom.workspace)
    # Reveal the current file in sidebar when switched to that tab
    atom.commands.dispatch(workspace, 'tree-view:reveal-active-file')

@lee-dohm

Copy link
Copy Markdown
Contributor

Since it seems this was split into two separate PRs, should this one be closed @kumarharsh?

@kumarharsh

Copy link
Copy Markdown
Contributor Author

yes! forgot to do that 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants