Auto-save in new Item Submission form breaks the form#4
Closed
Auto-save in new Item Submission form breaks the form#4
Conversation
Disable autosave when timer is equal to 0
Label Add on Form Array inputs.
Notifications are disabled for submission section savings.
Notifications are enable only for manual submission savings.
Store additions: 1. Form AdditionalData: contains the list of the touched metadata 2. Submission metadata: contains the list of the metadata ids assignable for each section We keep also track whether a section ha focused fields or not.
Autosave deactivated
Section formId added to the section state. Error filtering during the parsing of the submission response.
Minor changes and cleanup.
Lint corrections.
Section metadata dispatched to the store and retrieved in subscription. Added test case for hasMetadataEnrichment.
Test FormSetAdditionalAction.
Section Metadata field tested. Form Touched filter tested.
Submission form Save button disabled when no pending operations are present
corrad82-4s
pushed a commit
to corrad82-4s/dspace-angular
that referenced
this pull request
Jan 13, 2021
4science-it
pushed a commit
that referenced
this pull request
Feb 4, 2021
New Finnish keys January 2021
4science-it
pushed a commit
that referenced
this pull request
Apr 9, 2025
atarix83
pushed a commit
that referenced
this pull request
Feb 20, 2026
[DQ-38] adapt info text Approved-by: Giuseppe Digilio
atarix83
pushed a commit
that referenced
this pull request
Feb 20, 2026
Task/ux plus data quality cris/DQ-78
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Major issue related to this PR is #835
Other involved issues are:
#948
#864
#884
#882
#931
Before describing the approach adopted in this PR, it is useful to summarise the problems that it directly or indirectly tries to address.
Having investigated them for a long time, it has been possible to trace the root causes of these problems.
Problems caused by the template/zero row of repeatable fields
Even if the field is correct from an application point of view, the template row is a real form field and follows the validation rules attached to the repeatable field. For this reason we can see a section-level warning. Required repeatable fields get validated incorrectly in submission form DSpace/dspace-angular#931
Problems caused by the repeatable field without form redrawing
This approach forces the native flow from the used angular library and doesn't work with many of the models implemented in DSPACE, which would need custom patching logic. During submission some Repeatable fields stop working after a few inserts DSpace/dspace-angular#948
Problems caused by the repeatable field with redraw
Problems caused by lookup functionality
The selected value is not added to the form, but a save submission is evoked. Once the data returns from the server, the form is redrawn.
Problems caused by form redraw
At this moment all the above problems except (5), (6) and (3) (which is a side effect) are mitigated by the redraw which is extremely frequent. The more you reduce the frequency of redraw, the more these problems arise.
But it is clear that redraw in turn causes many side effects and ideally should be avoided as much as possible.
Current workaround to all this mess
Moreover:
We tried to save the focused state of the section in order to postpone the form redraw which causes the emptying of populated fields and the loss of the focus field (6).
The result is that sometimes the redraw is not evoked at all as the user goes from one field to another without ever leaving the form. So we decided to revert (but still in commit history).
It doesn't solve in any way (1) whose fix, as already stated, is expensive to implement and unmaintainable.
Ideal solution: remove the template row from the repeatable field control
Removing the template row from the repeatable fields immediately fix (1), (2), (3).
The added submission's metadata into the store reduces the redraw so that the user experience is fluid most of the time. The redraw remains in case of interaction with lookups.
Moreover
Implementing the lookup so that it directly patches the form could be more than welcome.
Leave the redraw as the only strategy in case the server actually enriches the form with additional data.
In that case a notification will be displayed to the user and it would probably be acceptable to lose the information about the touched fields and have a solution more clean and mantainable.
Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.