-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
navigator: handle empty multi-root workspace #8608
Conversation
c04c230
to
cd3abea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be something funny happening here. I'll look into it, thanks! |
cd3abea
to
d244f9c
Compare
@colin-grant-work @vince-fugnitto ok I added a bit of documentation because I got confused with how the tree model worked for single vs multi root workspaces. The logic should be fixed. |
The functionality is working for me, and the code looks good. 👍 This message and behavior is very similar to the 'no workspace' message, so a case could be made for combining the two renderers, but I think it's likely better to keep them separate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested and confirm the functionality works as described. The code also looks good to me.
Just a small nitpick is I dont know if we should avoid contractions in theia UI?
Your workspace doesn't contain any folders.
d244f9c
to
3098982
Compare
When a multi-root workspace is opened, the navigator will try to draw the file tree because `model.root` is a `WorkspaceNode` with no children. This commit handles this case by adding a bit of ui to help the user add folders to his workspace, instead of displaying a blank view. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
3098982
to
e94ca97
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes work well 👍
Thank you for also including documentation in the updates.
When a multi-root workspace is opened, the navigator will try to draw
the file tree because
model.root
is aWorkspaceRootNode
with nochildren.
This commit handles this case by adding a bit of ui to help the user add
folders to his workspace, instead of displaying a blank view.
Signed-off-by: Paul Maréchal paul.marechal@ericsson.com
How to test
Review checklist
Reminder for reviewers