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

chore: migrate to react-codemirror #1307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore: migrate to react-codemirror #1307

wants to merge 1 commit into from

Conversation

olexii4
Copy link
Contributor

@olexii4 olexii4 commented Jan 31, 2025

What does this PR do?

Reworked the Devfile Viewer widget to use the react-codemirror library, which includes all proper stiles. This solution increases the bundle size from 1.91MB to 2.15MB.

Screenshot/screencast of this PR

Знімок екрана 2025-01-31 о 18 14 07

Знімок екрана 2025-02-01 о 21 26 28

What issues does this PR fix or reference?

fixes eclipse-che/che#23324

Is it tested? How?

  1. Deploy Eclipse-Che with the image from this PR.
  2. Try to create a new workspace from the source.
https://gist.githubusercontent.com/olexii4/dfb21012e08eedf8fc17ae608708fe87/raw/bec54efa905b915695dcb7fc5806cb4b456aa343/devfile.yaml
  1. Open Workspace Detail / Devfile page and Devfile Viewer styles should be correct:

Знімок екрана 2025-01-31 о 18 12 57

Release Notes

Docs PR

Copy link

openshift-ci bot commented Jan 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@olexii4 olexii4 requested review from vinokurig and removed request for ibuziuk and akurinnoy January 31, 2025 16:16
@che-bot
Copy link
Contributor

che-bot commented Jan 31, 2025

Click here to review and test in web IDE: Contribute

@olexii4 olexii4 requested a review from akurinnoy January 31, 2025 16:17
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 12.50000% with 56 lines in your changes missing coverage. Please review.

Project coverage is 91.82%. Comparing base (900f6ef) to head (342df66).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rd-frontend/src/components/DevfileViewer/index.tsx 0.00% 46 Missing ⚠️
...oard-frontend/src/components/BasicViewer/index.tsx 0.00% 7 Missing ⚠️
.../pages/WorkspaceDetails/DevfileEditorTab/index.tsx 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1307      +/-   ##
==========================================
+ Coverage   91.58%   91.82%   +0.23%     
==========================================
  Files         498      499       +1     
  Lines       45447    45467      +20     
  Branches     3165     3167       +2     
==========================================
+ Hits        41622    41748     +126     
+ Misses       3793     3690     -103     
+ Partials       32       29       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@olexii4 olexii4 requested a review from ibuziuk January 31, 2025 17:47
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1307

kubectl patch command
kubectl 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-1307", name: che-dashboard}]}}]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UD] Devfile Viewer styles are broken if the target workspace includes just several lines
2 participants