New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse all directories even when nothing is selected #1287

Merged
merged 1 commit into from Nov 14, 2018

Conversation

Projects
None yet
2 participants
@edahlseng
Contributor

edahlseng commented Nov 13, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This pull request updates the collapseDirectory method so that when the allDirectories parameter is set to true, all directories will be closed, even if nothing is selected in the tree view. Previously, if nothing was selected in the tree view, this method would return before collapsing anything (even if allDirectories was set to true.

Alternate Designs

N/A

Benefits

Triggering collapse-all will always collapse all directories, even if an item isn't currently selected in the tree-view.

Possible Drawbacks

None that I'm aware of.

Applicable Issues

None that I'm aware of.

@50Wliu

This comment has been minimized.

Member

50Wliu commented Nov 13, 2018

Looks good to me. Can you please write some tests to cover this updated behavior?

@edahlseng

This comment has been minimized.

Contributor

edahlseng commented Nov 13, 2018

@50Wliu sure thing, happy to. How can I run the tests on my local machine? Looking through the CONTRIBUTING file and the package.json, I don't see a test command.

@50Wliu

This comment has been minimized.

Member

50Wliu commented Nov 13, 2018

You can run them using atom --test spec in the tree-view directory or the window:run-package-specs command.

(Also, ignore the Appveyor failure. We have a few known flakes on it.)

@edahlseng edahlseng force-pushed the edahlseng:collapse-all branch 7 times, most recently from 2c0a3e7 to d6a4099 Nov 14, 2018

@edahlseng

This comment has been minimized.

Contributor

edahlseng commented Nov 14, 2018

@50Wliu, updated!

@edahlseng edahlseng force-pushed the edahlseng:collapse-all branch from d6a4099 to f155e56 Nov 14, 2018

@50Wliu 50Wliu merged commit cdc299a into atom:master Nov 14, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@50Wliu

This comment has been minimized.

Member

50Wliu commented Nov 14, 2018

Thank you! 🌟

@edahlseng

This comment has been minimized.

Contributor

edahlseng commented Nov 14, 2018

Thanks for merging @50Wliu! When is this expected to work into a release of Atom/what can I follow along with?

@edahlseng edahlseng deleted the edahlseng:collapse-all branch Nov 14, 2018

@50Wliu

This comment has been minimized.

Member

50Wliu commented Nov 14, 2018

I'll be cutting a new release of tree-view today, which should make its way into Atom 1.34.0.

@50Wliu 50Wliu referenced this pull request Nov 15, 2018

Merged

Update tree-view #18444

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