altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

Users are not warned of unsaved data when leaving data model editor

Open lorang92 opened this issue 2 years ago • 3 comments

Describe the bug

Until #7246 is implemented we should warn the users that they have unsaved data when leaving the data model editor tool.

To Reproduce

Steps to reproduce the behavior:

  1. Go to data model editor
  2. Make some changes
  3. Try navigating away from the data model tool
  4. See that no warning is displayed and when returning to the editor the changes are lost

Expected behavior

Should present a warning that we have unsaved changes. An alert is probably enough.

lorang92 avatar Oct 25 '21 14:10 lorang92

If you can trigger alert (or confirm to give a cancellation option), you can probably trigger a save as well?

ivarne avatar Oct 25 '21 16:10 ivarne

We will implement this (alert with confirm leaving or cancel to go back and save) now as a quick fix to be able to enable the new data modelling tool asap. Will create new issue to analyze/implement a more long term solution. F.ex. autosave without model generation.

nkylstad avatar Aug 12 '22 07:08 nkylstad

This can be closed when autosave #9068 is merged.

nkylstad avatar Oct 17 '22 06:10 nkylstad

JSON schema is autosaved. Closing this issue.

nkylstad avatar Oct 24 '22 06:10 nkylstad