UX/UI: Provide some form of indication what data was entered after save #34

Closed
opened 2025-04-30 07:34:14 +00:00 by adina · 4 comments
Owner

If I click through the Person annotation to submit my orcid and then "save" this record, I don't see any indication that this was successful or that my data is anywhere. This makes me think "oh, something went wrong - did it save properly?". Reopening the editor for a person entry also doesn't have my entered data anymore.

I get a success message when submitting the record, but it would be nice to have some of the following:

  • after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P )
  • having the possibility to see saved entries and potentially editing them afterwards (maybe I forgot something)
  • getting a summary of what I have submitted in the success message upon upload
If I click through the Person annotation to submit my orcid and then "save" this record, I don't see any indication that this was successful or that my data is anywhere. This makes me think "oh, something went wrong - did it save properly?". Reopening the editor for a person entry also doesn't have my entered data anymore. I get a success message when submitting the record, but it would be nice to have some of the following: - after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P ) - having the possibility to see saved entries and potentially editing them afterwards (maybe I forgot something) - getting a summary of what I have submitted in the success message upon upload
Owner

Thanks @adina. If you save the record, the correct behaviour is that you should see an item with the entered information. I will investigate the issue and provide a fix for this.

after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P )

Having a count is not a bad idea, and is easy to add

having the possibility to see saved entries and potentially editing them afterwards (maybe I forgot something)

This is already possible, the bug is just preventing you from seeing/doing this after the first save.

getting a summary of what I have submitted in the success message upon upload

Good idea. This would ideally be tracked as a separate issue.

Some comments:

  • I have reproduced the issue and can confirm that no record is shown
  • However, when I click on a different data type (e.g. Dataset) and then again on Person (for which a record was just added), then I do see the record. So there's code running correctly when selecting a data type to view, which isn't run correctly after saving a record.
  • It seems to be related to #11
  • Another (or perhaps the same) possibility: it could be an edge case related to the fact that there's a specific type of token involved. This token is write-only, and the user interface tries to fetch more records of a certain type when there is an update. In this case, the fetch operation will (and should) return a 403 because this is not a read-token. I think the error handling that I introduced in a recent commit in shacl-vue is not operating as it should yet.
Thanks @adina. If you save the record, the correct behaviour is that you should see an item with the entered information. I will investigate the issue and provide a fix for this. > after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P ) Having a count is not a bad idea, and is easy to add > having the possibility to see saved entries and potentially editing them afterwards (maybe I forgot something) This is already possible, the bug is just preventing you from seeing/doing this after the first save. > getting a summary of what I have submitted in the success message upon upload Good idea. This would ideally be tracked as a separate issue. Some comments: - I have reproduced the issue and can confirm that no record is shown - However, when I click on a different data type (e.g. `Dataset`) and then again on `Person` (for which a record was just added), then I do see the record. So there's code running correctly when selecting a data type to view, which isn't run correctly after saving a record. - It seems to be related to https://hub.psychoinformatics.de/inm7/annotate.inm7.de-simplesubmit/issues/11 - Another (or perhaps the same) possibility: it could be an edge case related to the fact that there's a specific type of token involved. This token is write-only, and the user interface tries to fetch more records of a certain type when there is an update. In this case, the fetch operation will (and should) return a 403 because this is not a read-token. I think the error handling that I introduced in a [recent commit in `shacl-vue`](https://github.com/psychoinformatics-de/shacl-vue/commit/db31d55e625fcf04f645a4715f2d7f98bae1e259) is not operating as it should yet.
Owner

Ok, i have found a fix for this issue, but not the exact cause.

Some background for interested people:
What I know is that Vue's reactivity system isn't as foolproof as one would want it to be. The items that are (or rather, should be) shown in the list are all part of a computed property. This computed property should update reactively based on updates to the variables that it uses to compute the reactive property. But this does not happen consistently, partly because the specific vue component itself is quite complex. This was already evident some time ago, and a fix was put in place in the form of a trigger variable. This variable's value is then explicitly changed, in order to trigger reactivity of the computed property, whenever there is a point in the workflow that we expect the list of items to be updated. This has worked seamlessly and predictably.

So the fix is to change the value of the trigger variable when a form is closed (i.e. when a user saves the record), which was apparently not done up to this point.

The root cause is not the absence of this trigger variable change though. Because even without the trigger variable change, the system works as expected for the case where no token was present. This is the confusing part, which I'll need to investigate further. ( Also, this does not seem to be related to #11. The cause of that is likely the order in which records are fetched from the server, and some records not being available yet at the time that other records that reference them are viewed.)

For a quick and hopefully persistent fix, though, I will deploy this one liner.

Ok, i have found a fix for this issue, but not the exact cause. **Some background for interested people:** What I know is that Vue's reactivity system isn't as foolproof as one would want it to be. The items that are (or rather, should be) shown in the list are all part of a computed property. This computed property should update reactively based on updates to the variables that it uses to compute the reactive property. But this does not happen consistently, partly because the specific vue component itself is quite complex. This was already evident some time ago, and a fix was put in place in the form of a trigger variable. This variable's value is then explicitly changed, in order to trigger reactivity of the computed property, whenever there is a point in the workflow that we expect the list of items to be updated. This has worked seamlessly and predictably. So the fix is to change the value of the trigger variable when a form is closed (i.e. when a user saves the record), which was apparently not done up to this point. The root cause is not the absence of this trigger variable change though. Because even without the trigger variable change, the system works as expected for the case where no token was present. This is the confusing part, which I'll need to investigate further. ( Also, this does not seem to be related to https://hub.psychoinformatics.de/inm7/annotate.inm7.de-simplesubmit/issues/11. The cause of that is likely the order in which records are fetched from the server, and some records not being available yet at the time that other records that reference them are viewed.) For a quick and hopefully persistent fix, though, I will deploy this one liner.
Owner

after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P )

this is tracked here: https://github.com/psychoinformatics-de/shacl-vue/issues/118

getting a summary of what I have submitted in the success message upon upload

this is tracked here: https://github.com/psychoinformatics-de/shacl-vue/issues/119

> after saving an edited class, the front page could display a little counter of what I've added (like a shopping basked - Person(1) :P ) this is tracked here: https://github.com/psychoinformatics-de/shacl-vue/issues/118 > getting a summary of what I have submitted in the success message upon upload this is tracked here: https://github.com/psychoinformatics-de/shacl-vue/issues/119
Owner
https://github.com/psychoinformatics-de/shacl-vue/pull/137
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
inm7/annotate.inm7.de-simplesubmit#34
No description provided.