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

Advanced Styling codemirror errors #11705

Open
SDScandrettKint opened this issue Dec 20, 2024 · 0 comments
Open

Advanced Styling codemirror errors #11705

SDScandrettKint opened this issue Dec 20, 2024 · 0 comments

Comments

@SDScandrettKint
Copy link
Member

SDScandrettKint commented Dec 20, 2024

If a user modifies the Advanced Styling in the UI, the style is saved as a formatted string:

image

It's not very pretty, but codemirror can load this and it render it as formatted 'json'. The issue for HER is that the tab and newline characters have all been removed, so codemirror is rendering the data exactly as expected - as a single line.

I tested Advanced Styling with properly formatted json by exporting a graph, cleaning up the data and reloading it. The data loaded as valid json in the database, but codemirror threw an error when I tried to load it in Advanced Styling. I suspect the issue isn't with codemirror, but with how it's being used. Unfortunately a fix for this (so that only valid json is managed) might mean cleaning up data that is not formatted as valid json and most likely means a migration to do it. For the time being @CWDamm-Kint's solution addresses the problem of being unable able to edit Advanced styling in cases such as Arches for HERs.

Originally posted by @chiatt in #11673 (review)

@chiatt chiatt added this to pipeline Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant