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

SFD-200: Persist diagram display #127

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

mgriffin-scottlogic
Copy link
Collaborator

SFD-200 Jira ticket

Description of Change

Restore the diagram state when navigating away from the site and returning.

Possibly one for @jantoun-scottlogic to review the approach, as it seemed simplest to just call handleSubmit() if it was done previously, instead of having the diagram store state as well. There are some edge cases, where the form has been changed but not resubmitted before navigating away and it also does not restore which display tab was active when looking at the table.

I also didn't need to update any tests to make this change but I wasn't sure whether to get into checking what the form storage service was called with and how the init process changes when existing state is found.

Checklist

  • tests are updated or added

Don't store the error state as it should be re-generated
@jantoun-scottlogic
Copy link
Contributor

I think this is fine. It would be nice to resolve the edge cases but I think that would take a bit of work. I've created SFD-208 to look into it.

@sdun-scottlogic
Copy link
Contributor

Tested & Approved - SD.

@mgriffin-scottlogic mgriffin-scottlogic merged commit ee9443b into main Sep 10, 2024
3 checks passed
@mgriffin-scottlogic mgriffin-scottlogic deleted the sfd-200-restore-diagram branch September 10, 2024 11:52
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.

3 participants