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

Persist commissioning packages on refresh #64

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

eoye
Copy link
Contributor

@eoye eoye commented Jan 7, 2025

Pull requests practices for the SSI team

Aim of the PR

This PR fixes AB#208958.

The goal of this PR is to make sure the commissioning packages are persisted and not deleted on refresh of the page.

Implementation

Several changes have been made to achieve this:

  • Instead of cleaning the triplestore and list of commissioning packages on mount, we get the packages from the triplestore.
  • When the app is started and an initial commissioning package is created, the color and name is saved to the triplestore.
  • When a user creates a new commissioning package, the color and name is saved to the triplestore.
  • Instead of getting just the node Ids from the triplestore, we now get node Id, name and color.
  • Added a new "getAllCommissioningPackages" that is called when the page is refreshed. This method gets all commissioning packages, including the name and color.
  • Add SelectedInternal as type a node can have. This is so that we can save which node was clicked as the internal boundary.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • This change requires a documentation update

How Has This Been Tested?

This has been tested by running the demo and testing the UI.

Additional Changes

I deleted some unused code from Triplestore.ts to clean up the file. Let me know if the code that has been removed should be kept there!

@markus-ap
Copy link
Contributor

markus-ap commented Jan 7, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. No issues have been found. (View Details)

@eoye eoye changed the title Story/208958 stop delete on refresh Persist commissioning packages on refresh Jan 7, 2025
@eoye eoye marked this pull request as ready for review January 8, 2025 13:30
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