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

bug: unsaved form, if open, remembers deleted magnetic module ID #6042

Closed
IanLondon opened this issue Jul 1, 2020 · 0 comments · Fixed by #6040
Closed

bug: unsaved form, if open, remembers deleted magnetic module ID #6042

IanLondon opened this issue Jul 1, 2020 · 0 comments · Fixed by #6040
Assignees
Labels
bug protocol designer Affects the `protocol-designer` project

Comments

@IanLondon
Copy link
Contributor

IanLondon commented Jul 1, 2020

Overview

An unsaved form will remember the old magnetic module ID if you leave it open while you delete and re-add a magnetic module, causing a whitescreen.

Steps to reproduce / Current behavior

  • Make a protocol with a magnetic module
  • Make a Magnet step form. Leave it open
  • Delete the Magnetic Module and create a new one
  • Go back and save the Magnet step form that you left open
  • Whitescreen! The form you saved retained the ID of the first magnet module, which now points to nothing

Expected behavior

Unsaved form should automatically close (and lose any changes) if a module is deleted, the same way it does if a module is edited

Bonus bug! 2-in-1!

Similarly, if you delete a module, open a Magnet step, and then add a magnet module, the unsaved form retains the null module ID, and prevents you from saving the open Magnet form. (If you cancel the form and open it again, now you can save it). This one isn't a whitescreen, just a confusing UX because for the user, the module ID is not visible or modifiable in the form.

But instead, the unsaved form should just close and lose any changes if a module is added.

Future work??

Maybe we want to add a warning upon adding/deleting a module, or alternatively we could deal with adding/deleting a module updating the unsaved form on a case-by-case basis for different form types (like we do for the saved step forms).

@IanLondon IanLondon added bug protocol designer Affects the `protocol-designer` project 🕷️ SPDDRS labels Jul 1, 2020
@IanLondon IanLondon self-assigned this Jul 1, 2020
IanLondon added a commit that referenced this issue Jul 2, 2020
…ved changes (#6040)

* clear unsavedForm reducer upon CREATE_MODULE and DELETE_MODULE actions

Closes #5472 and also closes #6042
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug protocol designer Affects the `protocol-designer` project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant