NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

view json hard to edit and merge; remove the IDs? #1312

Open bradNASA opened 9 months ago

bradNASA commented 9 months ago

Checked for duplicates

Yes - I've already checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

I'm frustrated when I cut and paste parts of views into other views, and it doesn't work, seemingly because ids need to be unique and are not. This also happens when merging view edits made in parallel. Merging view json files can easily result in duplicate IDs, corrupting the view even though there's no merge conflict. Thus, we have to use the UI to manually make the changes again, and we often miss some of the changes or make mistakes because we're in a hurry, and they go uncaught until we give a demo.

In addition, I don't feel comfortable adding json elements manually or generating view json from code, maybe because I'm confused by the IDs. For example, if the view is large, and I add a new timeline element, I need to pic an ID that hasn't been used. I'm inclined to use something like "id": 100001, but given that it's not obvious how the IDs are used, someone not familiar with the json format would be reluctant to try and edit at all.

Describe the feature request

Make cut/paste and merges of views more robust.

One way to do this may be to get rid of IDs. Are the IDs necessary? For example, if the timeline IDs are not referenced anywhere else in the JSON, then they could be left out. Assuming the code somehow needs these as indices/unique identifiers, the IDs could be generated on the fly in the code. It's not just the timeline IDs, but the IDs of all of the underlying elements. I could see how maybe a y-axis ID might be referenced in multiple places, so maybe they can't all be removed.