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

Implement option to hid tree pane on startup #1389

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

joaotmartins
Copy link
Contributor

Issue or RFC Endorsed by Atom's Maintainers

Refers to issues:
#1370 #1375

Description of the Change

Adds a new configuration option, hiddenOnStartup, that allows a user to ask for the project pane to be hidden when Atom starts.
If option isn't present or set to false, behavior stays the same, i.e., project pane is shown on startup.
Option is checked on package activation function, pane is hidden/shown accordingly.

Alternate Designs

None that I could see.

Possible Drawbacks

None that I could see. Default behavior is preserved, so users do not have to update any configuration file.

Verification Process

Added corresponding tests in package spec to verify that:

  • Absence of option preserves default behavior
  • Default of option is to be false, preserving old behavior
  • Setting flag hides panel as designed.

Release Notes

Adds new configuration option 'hiddenOnStartup', that allows starting atom with the tree-view collapsed (hidden).

@joaotmartins
Copy link
Contributor Author

Hi @sadick254 the build seems to have failed due to some CI issue - it fails very early pulling the latest Atom release.
I'm a newbie at this, but it doesn't seem related to the modifications / tests I've written.
Are you able to check?

@52454D434F
Copy link

Can not wait till this feature is available. Very annoying the tree-pane always opens when opening the application.

@sadick254
Copy link
Contributor

@joaotmartins The failing CI has nothing to do with this change.

@joaotmartins
Copy link
Contributor Author

@sadick254 thanks for checking!
Do I need to do anything on my side to help? Or is this being looked at...

Copy link
Contributor

@sadick254 sadick254 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already looks great. Thanks for adding tests to this.

@sadick254 sadick254 merged commit 1cdc298 into atom:master Jul 19, 2021
@pokono
Copy link

pokono commented Oct 23, 2021

On Atom 1.60.0-nightly25 and tree-view 0.229.1 hidden on startup does nothing. The panel keeps showing at startup, am I missing something?
Screen Shot 2021-10-23 at 8 57 51 PM

@joaotmartins
Copy link
Contributor Author

joaotmartins commented Oct 24, 2021

On Atom 1.60.0-nightly25 and tree-view 0.229.1 hidden on startup does nothing. The panel keeps showing at startup, am I missing something?

Can you check what's in your .atom/config.cson file?

There should be something there like:

"*":
  "tree-view":
    hiddenOnStartup: true

If not try adding something like that manually to your config and see if it works. If that fixes it then I need to investigate the configuration pane mechanism, maybe I messed something up there...

@joaotmartins
Copy link
Contributor Author

joaotmartins commented Oct 24, 2021

Weird.. Double checking this on Mac, it seems to work fine if I reload the window using developer tools, but when starting the application from scratch the setting seems to be ignored...
But starting it from the command line works fine, i.e., the flag is honoured if set and the pane starts hidden... 🤷‍♂️

This is working (as described here) since nightly-14, when the code first showed up, so it doesn't seem to be any regression introduced between then and nightly-25.

@pokono
Copy link

pokono commented Oct 28, 2021

@joaotmartins Yes, the configuration is there but I stumble in the same issue you're also seeing..

@joaotmartins
Copy link
Contributor Author

I think you guys should file a bug.
I can repro this on my Mac, but only if I install from fresh - after starting it a few times it will work fine everytime.
I'm guessing it has to do with some caching behaviour that causes the pane to not be ready when the config is checked.

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.

None yet

4 participants