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

Monaco DiffEditor does not apply coloring to changed text #2693

Closed
mgalesloot opened this issue Dec 15, 2024 · 1 comment · Fixed by #2752
Closed

Monaco DiffEditor does not apply coloring to changed text #2693

mgalesloot opened this issue Dec 15, 2024 · 1 comment · Fixed by #2752
Assignees
Labels
bug Something isn't working frontend Issues related to the frontend

Comments

@mgalesloot
Copy link

Describe the bug

Monaco DiffEditor does not apply coloring to changed text (regression in Headlamp v0.27)

To Reproduce

Steps to reproduce the bug:

  1. Prepare dev environment
  2. Add the following lines to a Headlamp page.
import { DiffEditor } from '@monaco-editor/react';
 <DiffEditor language="yaml" original={'original'} modified={'fixedYAML'} height="10vh" />
  1. Run the frontend (with make run-frontend)
  2. Navigate to the changed page
  3. Notice that the coloring for different text is not applied. The text is default (black and white).
    Expected was green and red coloring as in the example https://codesandbox.io/p/sandbox/get-values-diffeditor-c6xrg?file=%2Fsrc%2FApp.js

This issue is new in Headlamp v0.27. The previous version v0.26 was OK. Running the DiffEditor on the code of the v0.26 tag ( git checkout headlamp-helm-0.26.0, make run-frontend) shows a proper working DiffEditor.

This issue was first detected in the Kubescape plugin.

Environment

Headlamp v0.27

Are you able to fix this issue?

No

@mgalesloot mgalesloot added the bug Something isn't working label Dec 15, 2024
@dosubot dosubot bot added the frontend Issues related to the frontend label Dec 15, 2024
@joaquimrocha
Copy link
Collaborator

@skoeva Maybe you can take a look

@skoeva skoeva self-assigned this Jan 13, 2025
skoeva added a commit that referenced this issue Jan 16, 2025
This change addresses a regression introduced in #2590 where
conditionally loading the dialog would cause Monaco Editor to
malfunction. The conditional rendering logic is now removed to restore
editor functionality.

Fixes: #2693

Signed-off-by: Evangelos Skopelitis <[email protected]>
@skoeva skoeva linked a pull request Jan 16, 2025 that will close this issue
2 tasks
@github-project-automation github-project-automation bot moved this from Queued to Done in Release Plan / Roadmap Jan 22, 2025
@github-project-automation github-project-automation bot moved this from Queued to Done in Release Plan / Roadmap Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Issues related to the frontend
Projects
Development

Successfully merging a pull request may close this issue.

3 participants