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

Feature Edit JSON in Diagram View #228

Closed

Conversation

theogainey
Copy link

Description

Edit JSON in Diagram View

  • Enable editing JSON in graph nodes
  • Add Invalid JSON error to graph node modal containers
  • Add graph parser function to parse nodes into JSON

References Issue #147

@theogainey
Copy link
Author

I updated this PR to work with the recent changes

@AykutSarac
Copy link
Owner

I've edited the "powers" key and it gotten a really weird structure. You've made an amazing work, but I think we should keep the PR open for a while for others to contribute to it. Graph to JSON is really hard and hard to implement because the parsing algorithm is also should be working perfectly to do the reverse parsing.

- modify NodeModal to be editable
- Edits that are Valid JSON will be saved to graph nodes

Changes to be committed:
	modified:   src/components/Graph/index.tsx
	modified:   src/containers/Editor/LiveEditor/GraphCanvas.tsx
	modified:   src/containers/Modals/NodeModal/index.tsx
- add ErrorContainer to NodeModal

Changes to be committed:
	modified:   src/containers/Modals/NodeModal/index.tsx
- add graphParser to parse graph Nodes into JSON
- add functionality to update JSON on node edit

References Issue AykutSarac#147
Changes to be committed:
	modified:   src/containers/Modals/NodeModal/index.tsx
	new file:   src/utils/graphParser.ts
@theogainey
Copy link
Author

@AykutSarac All that makes sense. Do you mind describing the weird behavior you're seeing so I can take a look at it. Also if there are any specific issues with the original parser that could use some work I would be interested in taking a look at it. This is cool project and I am planning on continuing to contribute to it if I can.

@AykutSarac
Copy link
Owner

Thanks for your interest in contributing @theogainey that's awesome! #27 and #51 are the highest priority issues of the parser exists since the first release. You can take a look to them if you have any idea on how to fix them.

@AykutSarac
Copy link
Owner

One of the weird behaiours I came across is when I edit the array/object key it gets into weird structure. You may work on it https://www.reddit.com/r/all.jsonhttps://www.reddit.com/r/all.json for a better workaround.

@AykutSarac
Copy link
Owner

Converting this PR to draft as it's currently not ready but could be improved and implemented in future.

@AykutSarac AykutSarac marked this pull request as draft October 30, 2022 10:18
@iolh
Copy link

iolh commented Nov 18, 2022

了不起!期待早日上线。

It's amazing and I'm looking forward to it.

@NielsKorschinsky
Copy link

Please see #262 for additional ideas/options

@AykutSarac
Copy link
Owner

Thanks for your efforts, closing this PR as there's a better way to implement this using the Path to Node data.

@AykutSarac AykutSarac closed this Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants