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

Always show Tree View #1315

Merged
merged 12 commits into from
Jun 20, 2019
Merged

Always show Tree View #1315

merged 12 commits into from
Jun 20, 2019

Conversation

winstliu
Copy link
Contributor

@winstliu winstliu commented May 6, 2019

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

The Tree View isn't created if no projects are open in a window, limiting discoverability of how to add a project. To make it easier to add projects, this PR now always shows the Tree View. If no projects are open, the Tree View prompts to add projects:
tree-view-add-projects

Alternate Designs

None.

Benefits

Easier to add projects directly through the Tree View.

Possible Drawbacks

Tree View will now appear, even when no projects are open.

Applicable Issues

Refs #1313. There currently is no way to "promote" a single file to a full project without manually selecting its project root.
Closes #1312
Fixes #68

Todo

  • A lot of the styles for the new view were copied over from the GitHub package. Is there a way to improve on that situation, somehow...?
  • Some potential functionality-changing behavior with regards to consuming file icons. I did this so that updateRoots wasn't called twice in a row on startup, which sometimes led to two of the add-project-views being added to the DOM.

@nathansobo nathansobo self-assigned this Jun 19, 2019
@nathansobo
Copy link
Contributor

nathansobo commented Jun 19, 2019

@50Wliu The code and test coverage look good, but I adjusted the wording a bit and got rid of the H1. I want to make it clear that a workspace is always associated with a project, but sometimes that project is empty. You can add folders to it, or you can reopen a previous project. I played with the second button being "Reopen A Previous Project" but it felt a little long. What do you think? Happy to iterate on this.

Screen Shot 2019-06-19 at 4 59 41 PM

@winstliu
Copy link
Contributor Author

Looks great to me! Thanks :)

@nathansobo nathansobo merged commit b0debd0 into master Jun 20, 2019
@nathansobo nathansobo deleted the wl-add-projects-view branch June 20, 2019 15:36
@nathansobo
Copy link
Contributor

Thanks for doing this. It's a really nice UX improvement.

@gianmichelemariani
Copy link

Not really a huge fan of this, especially when opening single files.
Can at least add an option in the preferences so that it can be disabled?

@pneedle-rh
Copy link

pneedle-rh commented Dec 16, 2020

Not really a huge fan of this, especially when opening single files.
Can at least add an option in the preferences so that it can be disabled?

I completely agree with this request to include an option to disable this feature. I have created this RFE.

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.

treeview not working Allow Tree-View when no file/folder
4 participants