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

Support JSON in kibana_react CodeEditor #107733

Closed
timroes opened this issue Aug 5, 2021 · 3 comments · Fixed by #143739
Closed

Support JSON in kibana_react CodeEditor #107733

timroes opened this issue Aug 5, 2021 · 3 comments · Fixed by #143739
Labels
enhancement New value added to drive a business result Feature:kibana-react impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@timroes
Copy link
Contributor

timroes commented Aug 5, 2021

It would be nice if we would support JSON highlighting in our CodeEditor component that we're having in kibana_react. Currently we don't have any JSON highlighting available, thus a lot of people might fall back to using the XJSON we have available (allowing you e.g. to use triple quotes), and then get a syntax highlighting that actually differs from the implementation behind (still expecting JSON). See #107723 for an example.

I think we should offer JSON as syntax highlighting in CodeEditor and exchange all current XJsonLang usages that are actually not using XJson with the JSON highlighter. Since only one place is not readOnly (the one mentioned in the issue above), this isn't really a huge problem right now, but might create more confusion if more people add JSON write editors using CodeEditor, which might be likely, given that we're trying to get everyone to move to CodeEditor atm (see #106931).

@timroes timroes added enhancement New value added to drive a business result Team:AppServices Feature:kibana-react labels Aug 5, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@jportner
Copy link
Contributor

Another place where we use CodeEditor for editing JSON is in the Role Mappings page. I used XJSON highlighting for the initial implementation in #107459, but it would be great to use regular JSON highlighting instead.

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Sep 10, 2021
@Dosant Dosant added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:AppServicesSv labels Mar 16, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:kibana-react impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants