Skip to content
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

Enhancement: When a workspace has no projects show welcome buttons in the file explorer #19645

Closed
Tracked by #19958
benoitf opened this issue Apr 22, 2021 · 9 comments
Closed
Tracked by #19958
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che area/plugins kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. status/release-notes-review-done Issues that have been reviewed by the doc team for the Release Notes wording
Milestone

Comments

@benoitf
Copy link
Contributor

benoitf commented Apr 22, 2021

Is your task related to a problem? Please describe.

Today, If I open CheTheia with a devfile without any projects I've a empty project explorer
image

I can't create new files until I open/add /projects as workspace folder for example so it may be hard to figure out for newcomers

Describe the solution you'd like

If there is no project, add PROJECT_ROOT as default workspace folder

Describe alternatives you've considered

N/A

Additional context

related to multi-root

https://issues.redhat.com/browse/CRW-2051

Release Notes Text

Before this update, when a workspace contained no projects, the Che-Theia editor was displaying an empty file explorer.
For the user it was not obvious how to create a file or clone a repository.
With this update, when a workspace contains no project, the Che-Theia editor displays Open Folder and Clone Repository buttons in the file explorer.

@benoitf benoitf added kind/task Internal things, technical debt, and to-do tasks to be performed. area/editor/theia Issues related to the che-theia IDE of Che area/plugins labels Apr 22, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Apr 22, 2021
@skabashnyuk skabashnyuk removed the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Apr 27, 2021
@azatsarynnyy azatsarynnyy added this to the 7.32 milestone Apr 27, 2021
@azatsarynnyy azatsarynnyy mentioned this issue May 25, 2021
14 tasks
@azatsarynnyy azatsarynnyy added sprint/next team/editors severity/P1 Has a major impact to usage or development of the system. sprint/current and removed sprint/next labels May 25, 2021
@RomanNikitenko
Copy link
Member

@benoitf
Hello!
I see some problems related to adding /projects as default workspace folder.
It's due to /projects is projects root, but we are going to use it as a workspace folder for the case when a devfile has empty list of projects.
Taking into account that a user can face with some confusing state of projects tree.

For example:

  • we automatically add /projects as workspace folder after starting a workspace from a devfile without projects
  • /projects is default directory when user goes to a terminal
  • a user clones a project using a terminal
  • the project is placed in /projects
  • /projects - is projects root - we track it using file watchers
  • the system detects that a new project appears - the systems adds it as a workspace folder to a config file

As result the user can see in projects tree:
projects_clone

I think we could consider another way to resolve the problem related to workspaces which starts from a devfile without projects.

For example, we could automatically create a folder in projects and add it to workspace config file. It allows to avoid conflicts at using /projects as projects root and as workspace folder at the same time - /projects - is always projects root, never - workspace folder, we use another hello folder (btw - I'm not sure what's name we should use for it) as workspace folder.

Another way which I see - we could display two buttons in the projects tree view for such use case:

  • Create Folder
  • Clone Repository

VS Code has something similar if there are no projects:
open_clode

But I think we should:

  • use Create Folder instead of Open Folder - otherwise - which folder a user can open for a workspace without projects?
  • has own behavior for Clone Repository - to have an ability to add a project as workspace folder to Che workspace after cloning.

So, I have described above 2 ways how we could handle the use case:

  • hello folder
  • 2 buttons

Any other ideas are welcome!
@benoitf @azatsarynnyy

@benoitf
Copy link
Contributor Author

benoitf commented Jun 7, 2021

hello, I'm unsure about the dummy folder just to not have a /projects as project root folder. It looks more confusing to me.

About actions yes it's helpful as well. The idea is really to not see a blank tree explorer because today it's that you don't know what to do to see files, explorer being empty (so opening /projects was a quick workaround)

About Open folder, maybe users want to still open /projects and clone there as well. Forcing to use create may be a problem as well. Also create does not imply to open it after.
Probably in che the clone button should be first.

@azatsarynnyy
Copy link
Member

The solution with 2 buttons sounds well to me.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Jun 7, 2021

thank you, Florent and Artem, for the feedback!

About

About Open folder, maybe users want to still open / projects and clone there as well.

I would like to clarify the following to be sure that we are on the same page.
As far as I understand - our direction - is Che multi root workspace.
But using Open Folder button by a user leads to a single root workspace.
single-root-workspace

or

Do you mean we should have some custom button Open Folder which will actually add a folder to the Che multi-root workspace?
It can be confusing for VS Code users...

Also - I believe we should add some logic for the use case when a user adds /projects as a workspace folder.
As far as I understand for this use case:

  • user should have only one workspace folder - projects, other projects will be placed inside projects workspace folder and they will not be considered as workspace folders.
  • otherwise, they can be added to multi-root workspace as workspace folders, but they will be duplicated in the Projects Tree view: one time - as workspace folders within multi-root workspace and the second one - as items under projects workspace folder.

@RomanNikitenko
Copy link
Member

@benoitf @azatsarynnyy

Hello!
I'm still looking for the good solution for the use case when a devfile doesn't contain projects.

I described in the comments above my concerns related to:

  • Open Folder action,
  • multi-root vs single root modes
  • /projects as default workspace folder and as root at the same time

Now I'm trying the case when two buttons are displayed for a user:

  • New Folder with a description: You can add a new folder to the Che workspace.
  • Clone Repository with a description You can also clone a repository from a URL

For the New Folderaction the behavior looks like:

NewFolder_multi-root

I haven't worked yet on the behavior for the Clone Repository action.
I guess there is no problem when a user clones a project by https. But probably there is a problem when a user clones a project by ssh.

Please share your opinion about such behavior (New Folder and Clone Repository when a devfile doesn't contain projects).
Any ideas are welcome!
thanks in advance!

@azatsarynnyy
Copy link
Member

I'm okay with such an approach.

@benoitf
Copy link
Contributor Author

benoitf commented Jun 11, 2021

AFAIK for cloning with ssh, user is prompted to upload ssh key if it's not there.
so we should be good.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Jun 11, 2021

AFAIK for cloning with ssh, user is prompted to upload ssh key if it's not there.
so we should be good.

yes, I checked - there is some flow which should be OK for cloning with ssh.

@benoitf
does New Folder behavior look good for you ?

@benoitf
Copy link
Contributor Author

benoitf commented Jun 11, 2021

@RomanNikitenko yes, most of people want to open files that are inside /projects (that are already auto-added)
Opening files in theia filesystem is a corner case and we can do that with proper commands as well

And if they start from blank devfiles, etc then it's fine to ask them to create a new folder

Maybe I would add the clone first (in VS code user may have tons of repositories cloned on its local filesystem while in che probably you may want to start by importing an existing project)

Maybe we should have also a terminal widget open on the user container as well (if there is one) but it's a different story not related to the current issue

@azatsarynnyy azatsarynnyy modified the milestones: 7.32, 7.33 Jun 16, 2021
@azatsarynnyy azatsarynnyy mentioned this issue Jun 29, 2021
2 tasks
@l0rd l0rd added the new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes label Jul 6, 2021
@l0rd l0rd changed the title Add /projects as default project when opening the IDE without any projects in the devfile When a workspace has no projects show welcome buttons in the file explorer Jul 6, 2021
@l0rd l0rd added the status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording label Jul 6, 2021
@MichalMaler MichalMaler changed the title When a workspace has no projects show welcome buttons in the file explorer Enhancement: When a workspace has no projects show welcome buttons in the file explorer Jul 15, 2021
@MichalMaler MichalMaler added status/release-notes-review-done Issues that have been reviewed by the doc team for the Release Notes wording and removed status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording labels Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che area/plugins kind/task Internal things, technical debt, and to-do tasks to be performed. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system. status/release-notes-review-done Issues that have been reviewed by the doc team for the Release Notes wording
Projects
None yet
Development

No branches or pull requests

7 participants