Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
110 stars 72 forks source link

Data model is autosaved without clicking the save button #11649

Open mlqn opened 9 months ago

mlqn commented 9 months ago

Description of the bug

The data model field is automatically saved when the value changes. You don't need to click the save button to actually save the changes, which makes the save button somewhat obsolete. It also feel strange that, in edit mode, the button next to save is not a discard/cancel button but the delete button.

One possible solution could be to remove the edit/save buttons and making the select element always visible.

Steps To Reproduce

https://github.com/Altinn/altinn-studio/assets/24462611/e11af387-2ba0-47c8-9f18-9fa2006f7708

Additional Information

No response

Annikenkbrathen commented 6 months ago

Instead of having an edit and save button, I suggest we create a solution similar to the example in the video.

You would see the edit icon when hovering, and upon clicking it, the field would open for editing. Clicking outside the field would finalize the edits and save them

https://github.com/Altinn/altinn-studio/assets/100292724/386bcfb3-2796-4a63-a0ec-f355493921e9

Annikenkbrathen commented 1 month ago

I assume that we can close this after implementing the new design for data model binding in the components. Now we are using cards, which solve the save/not save problem. It's autosaved, but to close the card, the user has to click on the 'save' button @nkylstad