che icon indicating copy to clipboard operation
che copied to clipboard

Improve devfile editing UX

Open l0rd opened this issue 3 years ago • 12 comments

Is your enhancement related to a problem? Please describe

To simplify the day 1 activities (start a sample workspace, start a workspace from a git repository) we have removed the Devfile editor from the Dashboard as editing a YAML file to create a workspace was a daunting activity for new users.

As a consequence we have sacrificed a day 2 activity, something that more experienced users loved: the devfile editor. From devfile editor in the dashboard allowed to create and edit a devfile (re)start a workspace from it.

Describe the solution you'd like

There will be multiple alternatives:

The progressive editing flow is the following one:

  1. start a workspace without Devfile: empty or from a git repository (passed as a URL parameter)
  2. in the IDE it will be possible to use a GUI tool to generate or to edit the devfile (no YAML)
  3. from the IDE it will be possible to restart a workspace from the created / modified devfile
  4. for advanced configuration it will be possible to edit a Devfile YAML with code completion and API documentation in the IDE itself

Subtasks:

  • https://github.com/eclipse/che/issues/21554
  • https://github.com/eclipse/che/issues/20738
  • https://github.com/eclipse/che/issues/21340
  • https://github.com/eclipse/che/issues/21184
  • https://github.com/eclipse/che/issues/18670
  • https://github.com/eclipse/che/issues/22422
  • https://github.com/eclipse/che/issues/22115
  • https://github.com/eclipse/che/issues/22228
  • https://github.com/eclipse/che/issues/18671
  • https://github.com/eclipse/che/issues/22612
  • https://github.com/eclipse/che/issues/22640

Describe alternatives you've considered

We want to avoid the re-introduction of the user dashboard devfile editor because we want that to happen in the IDE. That's where a developer has the best development experience and that's where they expect to edit their workspace. Having to go back to the dashboard to edit the workspace is awkward. This is a feedback we got recurrently from users.

Additional context

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

l0rd avatar Aug 03 '22 09:08 l0rd

Thank you for considering these important usability issues. There is a 'catch-22' to consider. If we want to use the IDE to edit the devfile, we need to consider the case of the user that has an invalid devfile (which will prevent starting of the workspace.)

Example: A user wants to develop a new piece of software. They may start with some minimal set of source code, maybe copied from a blog, previous project or generated by something like spring initializer. Any way they do it, they start with some source code, which they probably commit to git. At this point, we are in the 'problem zone'. The user cannot start a workspace-- they have no devfile. They could take an existing one and add it to the git repo, but the devfile must be perfect (without benefit of some UI to validate it!) or the dev workspace will not start. The cycle to resolve the issue is:

  1. Edit the devfile (without a validating IDE)
  2. Commit the change
  3. Try again to start the dev space, hoping this time it will succeed and provide the IDE that will allow editing the devfile. (Repeat as needed).

One possibility: Provide a known minimal devfile that is very robust and should almost always be able to start a dev space. In the above scenario, the user would add this 'bulletproof devfile' to the project along with the initial source. The user could then start the dev space and use the available IDE to edit the 'bulletproof' devfile, transforming it into whatever is needed.

There are probably other good paths forward also. Just please keep in mind that we cannot use the IDE to validate/edit the devfile if the workspace cannot start because of an invalid devfile.

RickJWagner avatar Aug 03 '22 20:08 RickJWagner

@RickJWagner do you think that https://github.com/eclipse/che/issues/20738 and the following warning message would help?

warning-invalid-devfile

l0rd avatar Aug 04 '22 08:08 l0rd

Yes, thanks for that @l0rd . I hadn't seen #20738, that will help nicely.

RickJWagner avatar Aug 04 '22 17:08 RickJWagner

any further progress on this? we were at 5 of 7 tasks complete in December... should the other two be raised as priority for the next sprint?

nickboldt avatar Jan 24 '23 04:01 nickboldt

Both remaining issues are in Team B sprint backlog

l0rd avatar Jan 27 '23 10:01 l0rd

Exluding JetBrains from the epic - https://github.com/eclipse/che/issues/22487 and adding to https://issues.redhat.com/browse/CRW-3398 We can resolve the issue once we publish the walkthrough extension and add it by default to Dev Spaces

ibuziuk avatar Jan 26 '24 14:01 ibuziuk

@vitaliy-guliy I believe we can close the epic once vscode walkthrough extension is added by default to che-code

ibuziuk avatar Jan 31 '24 15:01 ibuziuk

A pull request that includes the extension into built-ins https://github.com/che-incubator/che-code/pull/326 I would like to have the latest tag for the extension at open-vsix. It will allow us to update and publish a new version of the extension without updating the reference in che-code.

vitaliy-guliy avatar Feb 01 '24 11:02 vitaliy-guliy

latest should work. Does it fail for you?

image

Anyway @vitaliy-guliy if you have an open-vsx.org user I would like to add you as a member of the Devfile namespace. @ibuziuk that's for you as well.

l0rd avatar Feb 01 '24 13:02 l0rd

latest should work. Does it fail for you?

It's strange I missed it.

But it seems vs code builder wants to have a precise version

2283.6 [14:14:39] Error: Request https://open-vsx.org/vscode/gallery/publishers/devfile/vsextensions/vscode-devfile/latest/vspackage failed with status code: 404

With 0.0.2 the following request is succeeded

https://open-vsx.org/vscode/gallery/publishers/devfile/vsextensions/vscode-devfile/0.0.2/vspackage

vitaliy-guliy avatar Feb 01 '24 14:02 vitaliy-guliy

There is a regression in VS Code that made not possible to add a container endpoint, environment variable and a command https://github.com/microsoft/vscode/issues/204522

From the good news, the issue was added to February milestone and should be fixed soon.

vitaliy-guliy avatar Feb 08 '24 09:02 vitaliy-guliy

@vitaliy-guliy I believe we can close the epic once the regression is fixed on VS Code end

ibuziuk avatar Feb 08 '24 14:02 ibuziuk

@vitaliy-guliy the issue you opened has been autoclosed. is it fixed now in 7.82.0 - https://github.com/microsoft/vscode/issues/204522

ibuziuk avatar Mar 01 '24 11:03 ibuziuk

@vitaliy-guliy the issue you opened has been autoclosed. is it fixed now in 7.82.0 - microsoft/vscode#204522

Have just checked it on Dev Spaces 3.12 with Che Code 7.82.1 (VS Code 1.87.0) and can confirm the bug is still there.

vitaliy-guliy avatar Mar 04 '24 14:03 vitaliy-guliy

The extension is working fine in che-code 7.84.0, bug with popups was fixed in the upstream.

vitaliy-guliy avatar Mar 27 '24 14:03 vitaliy-guliy