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

Viewing yaml for a resource logs two warnings to the developer console #244

Open
ChristopherFry opened this issue Jan 31, 2023 · 1 comment
Labels
area/ui bug Something isn't working good first issue Good for newcomers

Comments

@ChristopherFry
Copy link
Collaborator

Expected Behavior

Viewing a resource's yaml should not log any warnings to the developer console.

Current Behavior

Currently, two warnings are logged to the developer console when a resource yaml is viewed:

Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq

You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker

Steps to Reproduce

The easiest way to reproduce this is by viewing a package resource's yaml:

  1. Open the simplens team blueprint created by Namespace Provisioning Guide
  2. Click on any resource within in the team blueprint to bring up the resource viewer dialog
  3. With the developer console open, click on the 'Show YAML View' button in the dialog, and the two warnings are written to the console

Possible Solution

A possible solution is to implement the web worker being requested by the editor.

Context

The Monaco Editor is used in the Resource Editors and Viewers in the Config as Data UI to give us a rich editor experience with syntax highlighting. These warnings do not seem to impact the user experience however we should see these warnings can be resolved.

@ChristopherFry ChristopherFry converted this from a draft issue Jan 31, 2023
@ChristopherFry ChristopherFry added bug Something isn't working good first issue Good for newcomers area/ui labels Jan 31, 2023
@ChristopherFry ChristopherFry moved this from Backlog (Not Prioritized) to Ready in kpt Backstage Plugins Tasks Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui bug Something isn't working good first issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

2 participants
@ChristopherFry and others