sp-dev-fx-property-controls icon indicating copy to clipboard operation
sp-dev-fx-property-controls copied to clipboard

Any interest in a Monaco-based code editor?

Open hugoabernier opened this issue 4 years ago • 5 comments

Category

  • [x] Enhancement
  • [ ] Bug
  • [ ] Question

Expected / Desired Behavior / Question

I created a property pane control that uses the Monaco editor for code editing. I have added the ability to support custom languages, custom syntax highlighting, and custom theming and validation. Of course, it also supports all languages supported by Monaco.

Is this something that would be useful for the community?

Observed Behavior

The current version of the code editor is awesome, but in scenarios where you need more than the supported languages (json, javascript, sass, typescript, HTML, handlebars, XML) or you need full custom syntax, it is difficult to use.

Steps to Reproduce

Use the code editor control, and try to use a non-supported language.

My suggestion is to retrofit the existing code control so that it remains backwayrd compatible, while replacing the guts of the control to use Monaco and add support for more languages, themes, and validators.

hugoabernier avatar Jul 29 '21 16:07 hugoabernier

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msftbot[bot] avatar Jul 29 '21 16:07 msftbot[bot]

Hey @hugoabernier

Sounds great 🙂 Would that be a breaking change to the existing control or a new control? From your message it seems like a new control, but just to be sure. And would it be possible to easily transition from one to the other if users wanted to upgrade to your control as it would offer more features? If so, I guess we could consider going with only one at some point in the future...just trying to see all options 🙂

joelfmrodrigues avatar Jul 29 '21 19:07 joelfmrodrigues

@joelfmrodrigues My thought was to do it a compatible of the existing control, so that existing solutions continue to work (but with a minor look and feel difference in the editor window).

hugoabernier avatar Jul 29 '21 20:07 hugoabernier

@hugoabernier sounds great 🙂 @AJIXuMuK any comments?

joelfmrodrigues avatar Jul 29 '21 20:07 joelfmrodrigues

@hugoabernier @joelfmrodrigues - sorry for the delay. As I know, devs change the properties of the current code editor directly (AceEditor). I don't think we can switch one with another without breaking some of the implementations. So I'd do MonacoCodeEditor control with the same set of properties (maybe reuse interface or extend it).

AJIXuMuK avatar Jan 08 '22 17:01 AJIXuMuK