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/sckan 300 #315

Merged
merged 10 commits into from
Oct 11, 2024
Merged

Feature/sckan 300 #315

merged 10 commits into from
Oct 11, 2024

Conversation

afonsobspinto
Copy link
Member

Closes https://metacell.atlassian.net/browse/SCKAN-300

  • Adds GraphRenderingState model (one to one with ConnectivityStatement) to store the serialized_graph json.
  • Adds save icon to the graph diagram.
  • Updates custom node to serialize and deserialize custom data.
  • On click of save icon makes a patch request with the serialized_graph json data.
  • Refactors out of graph component the algorithm to position the nodes and updates it to use the positions of the serialized_graph when possible:
2024-10-08.17-36-01.mp4

serialized_graph = models.JSONField() # Stores the serialized diagram model
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
saved_by = models.ForeignKey(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afonsobspinto question, are the update_at and saved_by used to update the change in the notes? Thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. At the moment they are not used but I added them anyway because I can see it being useful for something like that.

Copy link
Member Author

@afonsobspinto afonsobspinto Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also have a note in the graph container saying. "Last saved by: {saved_by}" and on hover shows the {updated_at}

@ddelpiano ddelpiano merged commit f815df4 into develop Oct 11, 2024
1 check passed
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.

2 participants