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

Use platform editor component instead of our own #5039

Open
2 of 3 tasks
Tracked by #5040
gdiazlo opened this issue Dec 23, 2022 · 7 comments
Open
2 of 3 tasks
Tracked by #5040

Use platform editor component instead of our own #5039

gdiazlo opened this issue Dec 23, 2022 · 7 comments
Assignees
Labels
level/task Task issue request/operational Operational requests type/research Spikes, researchs, PoCs

Comments

@gdiazlo
Copy link
Member

gdiazlo commented Dec 23, 2022

Describe the solution you'd like

Evaluate if we can reuse the platform editor instead of our own as an editor component.

Additional context

This will allow us to use less dependencies.

Related issues

@gdiazlo gdiazlo added the type/enhancement Enhancement issue label Dec 23, 2022
@yenienserrano yenienserrano self-assigned this Feb 28, 2023
@yenienserrano
Copy link
Member

Currently, opensearch/oui in the ouiCodeEditor component is using Ace, and they are going to deprecate the component, while opensearch dashboard can use Monaco as an option, but they have version 0.17.1 and Monaco is already on version 0.36.1.

They have this issue to update Monaco in 2.7.0

And in OUI they have this issue that from what I understand is not a priority for them, the code editor component.

I have been testing the Monaco implementation offered by Opensearch, but I can't get the formatting right.

Monaco
image

EuiCodeEditor
image

@yenienserrano
Copy link
Member

Looking at the opensearch code, I saw that they still have the Ace plugin, but they deprecated it and suggest you to use Monaco.

And I also saw that you intend to add more information about Monaco.

@yenienserrano
Copy link
Member

I have seen that the custom version of monaco offered in opensearch uses react-monaco-editor in addition to monaco-editor, and I created a new project to see how it works and by default the same thing happens to me, it does not look with styles, so I am testing to see what configuration would be the most appropriate for the project.

Image

@yenienserrano
Copy link
Member

Reviewing the implementation of Moncaco that offers OSD I saw that it does not give much variety of languages, maybe it is because of the version that uses that is 0.17.1 and goes by the 0.36.1, or maybe in its modifications only let see those languages.

Image

@yenienserrano
Copy link
Member

I created this issue in the OpenSerach Dashboards repository, and they replied that you have to add the file with the language you want to add.

I was testing, and we would have to first integrate the language and then make the change from the current editor to the one that OpenSearch Dashboard tested.

Image

Image

@yenienserrano
Copy link
Member

I share the file with the one I managed to make it look similar, but it needs to be finished.

xml.txt

@gdiazlo gdiazlo added the level/task Task issue label Mar 16, 2023
@Desvelao
Copy link
Member

These problems

This will allow us to use less dependencies.

is related to the codemirror. This editor is used in the API Console.

For this case, and due to the syntax and behavior being similar to the Console, we could review the implementation and see how is built the editor.

@gdiazlo gdiazlo added request/operational Operational requests type/research Spikes, researchs, PoCs and removed type/enhancement Enhancement issue labels Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue request/operational Operational requests type/research Spikes, researchs, PoCs
Projects
None yet
Development

No branches or pull requests

3 participants