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

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

Open
benjagm opened this issue Mar 18, 2024 · 18 comments
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@benjagm
Copy link
Collaborator

benjagm commented Mar 18, 2024

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:

  • Consistent formating/color/linting
  • Availability of copy/pasting
  • In cases of JSON and availability to add labels to express that is a valid JSON. See:
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:

  • Lang labels for JSON and JSON Schema.
  • Copy paste button.
  • line number
  • line highlight
  • For json instances availability to highlight if is a valid instance, like the previous custom instance.

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

@benjagm benjagm added ✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: Triage This is the initial status for an issue that requires triage. labels Mar 18, 2024
@benjagm benjagm moved this to Waiting for Contributions in Website Contributor Board Mar 18, 2024
@benjagm benjagm added Status: Available No one has claimed responsibility for resolving this issue. and removed Status: Triage This is the initial status for an issue that requires triage. labels Mar 18, 2024
@Adity20
Copy link
Contributor

Adity20 commented Mar 18, 2024

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

@AdityaSingh-02
Copy link
Contributor

Heyy @benjagm Can I work on this??

@akkshitgupta
Copy link

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
Copy link
Contributor

Adity20 commented Mar 19, 2024

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
Copy link
Collaborator Author

benjagm commented Mar 20, 2024

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

@Adity20
Copy link
Contributor

Adity20 commented Mar 20, 2024

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
Copy link
Collaborator Author

benjagm commented Mar 20, 2024

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

@Adity20
Copy link
Contributor

Adity20 commented Mar 20, 2024

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

@AdityaSingh-02
Copy link
Contributor

Yup we can work together on this @Adity20

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Mar 21, 2024
@benjagm benjagm moved this from Waiting for Contributions to In Progress in Website Contributor Board Mar 21, 2024
@DarhkVoyd
Copy link
Member

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

@Adity20
Copy link
Contributor

Adity20 commented Apr 14, 2024

Yes

@benjagm
Copy link
Collaborator Author

benjagm commented Jun 7, 2024

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 benjagm moved this from In Progress to Waiting for Contributions in Website Contributor Board Jun 7, 2024
@benjagm benjagm removed the Status: In Progress This issue is being worked on, and has someone assigned. label Jun 7, 2024
@benjagm benjagm added the Status: Available No one has claimed responsibility for resolving this issue. label Jun 7, 2024
@benjagm
Copy link
Collaborator Author

benjagm commented Jun 7, 2024

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

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Available No one has claimed responsibility for resolving this issue. labels Jun 7, 2024
@benjagm benjagm moved this from Waiting for Contributions to In Progress in Website Contributor Board Jun 7, 2024
Copy link

Hello! 👋

This issue has been automatically marked as stale due to inactivity 😴

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 ❤️

@github-actions github-actions bot added the Status: Stale It's believed that this issue is no longer important to the requestor. label Jul 14, 2024
@jayprakash25
Copy link
Contributor

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

@github-actions github-actions bot removed the Status: Stale It's believed that this issue is no longer important to the requestor. label Jul 21, 2024
@29deepanshutyagi
Copy link
Contributor

hi , i want to work on this issue , kindly assign me , if it open to contribute , @benjagm

@DhairyaMajmudar DhairyaMajmudar removed their assignment Jan 19, 2025
@jagpreetrahi
Copy link

Hey @DhairyaMajmudar, I’d love the opportunity to work on this issue. Please let me know if I can contribute!

@Karan-Palan
Copy link
Contributor

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

I created a document where I have stated my approach @benjagm and @DhairyaMajmudar here - https://gist.github.com/Karan-Palan/073f23767c77c2040e9694345d194572

I believe I can solve this issue as I am familiar with codes for both StyledMarkdown which uses react-syntax-highlight and JsonEditor.

I would like some suggestions that could better my proposal and help me solve this issue.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Indicates that the issue suggests an improvement or new feature. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
Status: In Progress
Development

No branches or pull requests

10 participants