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

React Code Editor - Replace react-monaco-editor with @monaco-editor/react #8578

Closed
Tracked by #147
jonkoops opened this issue Jan 19, 2023 · 9 comments · Fixed by #9842
Closed
Tracked by #147

React Code Editor - Replace react-monaco-editor with @monaco-editor/react #8578

jonkoops opened this issue Jan 19, 2023 · 9 comments · Fixed by #9842
Assignees
Labels
Milestone

Comments

@jonkoops
Copy link
Contributor

jonkoops commented Jan 19, 2023

The react-monaco-editor package should be replaced with @monaco-editor/react. The latter is much more mature and receives more frequent updates, specifically:

  • It has much better documentation
  • Doesn't need a WebPack plugin
  • Has a stable version

I think this would be a good candidate for the next major version of PatternFly React.

@jonkoops
Copy link
Contributor Author

Alternatively a new package could be created and published under a new major of @patternfly/react-code-editor. The 'legacy' version could then be published under a new @patternfly/react-code-editor-legacy package to provide a migration path.

@mcarrano
Copy link
Member

Consider for post v5 as an Editor-Next component.

@stale
Copy link

stale bot commented Apr 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Apr 1, 2023
@jonkoops

This comment was marked as off-topic.

@stale stale bot removed the wontfix label Apr 3, 2023
@stale
Copy link

stale bot commented Jun 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jun 8, 2023
@jonkoops

This comment was marked as off-topic.

@stale stale bot removed the wontfix label Jun 8, 2023
@mcarrano mcarrano added DevX and removed Feature labels Jun 12, 2023
@tlabaj tlabaj added the Pinned label Jun 20, 2023
@Chip-L
Copy link

Chip-L commented Jun 22, 2023

I like the idea behind this. We are using Vite for our product, which doesn't use Webpack. Making Patternfly independent of frameworks should be a requirement.

@Chip-L
Copy link

Chip-L commented Jun 24, 2023

So having explored @monaco-editor/react further, this uses a CDN to get the monaco editor. This may or may not be a problem for others. However, it is really easy to bypass because you can globally configure the loader so that it will work with whichever framework you need to include.

@KKoukiou
Copy link
Collaborator

hi, In cockpit we are implementing a new plugin for FS browsing. https://github.com/KKoukiou/cockpit-navigator

We tried using this editor - but it's partially broken due to CSP. Nothing unexpected since the used module has the same CSP issues. microsoft/monaco-editor#271

Did you try the suggested alternative module, but it looks like the CSP issues are fixed. suren-atoyan/monaco-react#83

Thanks for prioritizing this.

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

Successfully merging a pull request may close this issue.

8 participants