json-schema-org / website

JSON Schema website
https://json-schema.org
Other
66 stars 172 forks source link

✨ Enhancement: Review the implementation of the JSON editor to better management of state/style #560

Open benjagm opened 7 months ago

benjagm commented 7 months ago

Is your feature request related to a problem? Please describe

Related: #417

As of now we are using 2 different code editors: 1 JSON and JSON Schema (json editor) and another for the rest of languages based on react-syntax-highlighter library.

This is providing an inconsistent experience in terms of formatting but also in terms of features. Ideally we'll use one single document that provides:

Screenshot 2024-03-18 at 19 01 55

Describe the solution you'd like

Use or extend a code editor or improve the current implementation using 2 different editors.

Use only the react-syntax-highlighter and explore how to better do the customizations required:

For copy paste see: https://www.bojanjagetic.com/post/react-syntaxhighlighter-copy-clipboard

For line numbers and line highlight see https://www.dhiwise.com/post/crafting-beautiful-code-blocks-with-react-syntax-highlighter

Describe alternatives you've considered

No response

Additional context

No response

Are you working on this?

No

Adity20 commented 7 months ago

Shall I continue working on this @benjagm as I have the idea of code components

AdityaSingh-02 commented 7 months ago

Heyy @benjagm Can I work on this??

akkshitgupta commented 7 months ago

I totally agree with you @benjagm to improve or extend the code editor, however, we can go with next-mdx-remote npm package that can handle rendering of mdx, formatting of any valid language or syntax on the client side. It provides a great User and Developer experience. very nicely go with NextJs as well :)

Adity20 commented 7 months ago

Hello @akkshitgupta I tried using that but somehow it wasn't supporting some styles which needed to be applied to the rendered code. But can give it one more chance 👍

benjagm commented 7 months ago

This is a big feature to be developed. Are you sure @Adity20 ?

Adity20 commented 7 months ago

Maybe me and @AdityaSingh-02 can work together on this one if he is okay as he also worked on one issue related to this. So that we can complete this task a bit early

benjagm commented 7 months ago

It will be fine for me if at least to make an analysis and a proposal, even thought you don't implement it

Adity20 commented 7 months ago

Okay, then I'll make a plan and will present it to you soon.

AdityaSingh-02 commented 7 months ago

Yup we can work together on this @Adity20

DarhkVoyd commented 7 months ago

Just checking back in on this issue. Is anyone actively working to resolve this issue?

Adity20 commented 7 months ago

Yes

benjagm commented 5 months ago

Hi everyone! There has been no updates for the last 3 months and this is an important feature. Therefore i am going to make this issue available for other contributors.

Thanks a lot for your efforts!

benjagm commented 5 months ago

I just updated the description of the issue suggesting to focus all the solutions on using the same library we use for the standard code editor: react-syntax-highlighter

github-actions[bot] commented 4 months ago

Hello! :wave:

This issue has been automatically marked as stale due to inactivity :sleeping:

It will be closed in 180 days if no further activity occurs. To keep it active, please add a comment with more details.

There can be many reasons why a specific issue has no activity. The most probable cause is a lack of time, not a lack of interest.

Let us figure out together how to push this issue forward. Connect with us through our slack channel : https://json-schema.org/slack

Thank you for your patience :heart:

jayprakash25 commented 4 months ago

Hi @benjagm . Can I start working on this issue?