-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add Editor Selector panel #1055
Conversation
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1055 kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1055", name: che-dashboard}]}}]" |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1055 +/- ##
==========================================
+ Coverage 88.41% 88.86% +0.45%
==========================================
Files 390 396 +6
Lines 40080 40484 +404
Branches 2707 2732 +25
==========================================
+ Hits 35437 35978 +541
+ Misses 4617 4480 -137
Partials 26 26 ☔ View full report in Codecov by Sentry. |
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.
Really nice improvement, but let's merge it after 7.82.0 release (might be too risky to merge it for 3.12)
@artaleks9 @dmytro-ndp folks, will need your approval before merge |
}; | ||
|
||
export type State = { | ||
editorId?: string; |
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.
It is not just the editor ID. It could be the link to a container editor definition, URL, or editor ID.
I propose to change:
editorId
-> editorDefinition
WDYT?
type State = { | ||
activeTabKey: CreateWorkspaceTab; | ||
editorId: string; |
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.
editorId: string; | |
editorDefinition: string; |
A verification of PR is still in progress, but I couldn't run |
We had the next mockup In the main issue eclipse-che/che#22784: I can see the link to the che-docs How to specify and use a custom editor. We already have this part in the che-docs. |
@akurinnoy I found a bug: Try to create a new workspace with the Import from Git widget from the Git repo which includes the custom editor in the For example web-java-spring-boot. And default editor will be applied. So, we can't create a new workspace with the custom editor from the |
if ( | ||
factory.searchParams.has(EDITOR_ATTR) === false && | ||
factory.searchParams.has(EDITOR_IMAGE_ATTR) === false | ||
) { | ||
factory.searchParams.set(EDITOR_ATTR, editorId); |
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.
We can't create a new workspace with the custom editor from the /.che/che-editor.yaml
file with these changes at all.
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.
With these changes, you are still able to create new workspaces with a custom editor. On any dashboard page, paste your repo link into the browser address bar to create a location like this and hit Enter: https://<che_fqdn>#https://github.com/olexii4/web-java-spring-boot.git
. A new workspace with custom editor will be created within a few minutes.
However, I'm not sure if a .che/
file in a repository should have precedence over an explicitly defined editor, rather than vice versa.
cc @ibuziuk
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.
@akurinnoy /.che/che-editor.yaml
should define the default editor for a Git repo. Am I right or am I wrong?
@artaleks9 thanks for trying to test the pull request. About the workspace start failures you observed - that is something not related to this pull request. This issue is reproducible on the dogfooding cluster with As a workaround, I can suggest testing the Editor Selector with the |
@olexii4 thanks for the review!
I'll update the PR to add this link
I believe this statement is not true... You're still able to create workspaces with custom editors defined in a |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
@olexii4 |
From the user perspective, specifying the custom editor in the |
It's interesting to know:
|
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1055 kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1055", name: che-dashboard}]}}]" |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1055 kubectl patch commandkubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1055", name: che-dashboard}]}}]" |
@dmytro-ndp, thanks for these questions
There is no such mode implemented in the dashboard, but this can be a really good improvement. Can you please open an issue?
I discussed this question with @ibuziuk and @olexii4 and we decided to implement it as follows:
This info is not available on the workspaces page, but it is stored in the DevWorkspace object as an annotation. The
Disabling editor tiles is not part of this issue, and I believe it's not possible in the current implementation. Sample cards are not selectable but clicking on any immediately starts the new workspace creation, so there is no chance to choose an editor after. |
@ibuziuk @artaleks9 @olexii4 @dkwon17 folks, I hope I fixed all the feedback, please review the pull request. |
/retest |
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.
These changes work as expected.
Good job!
Verified on Eclipse Che with |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, artaleks9, ibuziuk, olexii4 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?
This PR adds the Editor Selector panel to the Getting Started page. With the Editor Selector users can choose to use one of the provided editors, or define their editor by specifying the editor ID and/or editor container image.
movie-2.mp4
movie-1.mp4
What issues does this PR fix or reference?
resolves eclipse-che/che#22766