Implement local save and load buttons #28
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sfb1451/z03-assessment-center-data-entry!28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "local-save"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR implements https://github.com/psychoinformatics-de/sfb1451_org/issues/33
Added two buttons:
I am not sure if the save / load implementation is optimal, but that's what I came up with.
I was able to save - load - save entered data, but manual testing is always welcome.
If "Probanden-Pseudonym" is not set, a file name
jsonis locally saved.Either saving should be refused, if "Probanden-Pseudonym" is unset, or there should be the possibility to choose a name manually in case it is unset
Generally looks good to me. Can be merged if the comments are addressed.
Just for my understanding: why is
subject-groupnot present ingetContentString()-results?@ -3070,9 +3092,278 @@updatedLines();If
subject-pseudonymis not set,fnamewill be.json(there is also a comment in the PR discussion). Maybe decline to save withoutsubject-pseudonymor ask for a value?Maybe remove element
aagain?Generally it would be nice if you could unify tab and space, more precisly, replace tabs with 4 spaces
It wasn't when I started. The old
getContentStringexplicitly defines an array with a list of ids, andsubject-groupwasn't there. May be a simple omission.I chose to tack it on to contentObj (for saving) rather then change the existng getContentString behaviour.
@ -3070,9 +3092,278 @@updatedLines();I'm going for "decline to save" - it makes little sense to save records not attributed to any subject.
I also don't know an easy way to ask for value. I found showSaveFilePicker in JS, but it's new and currently supported only by Chromium-based browsers.
@ -3070,9 +3092,278 @@updatedLines();I thought I knew my editor, but apparently not... I'll clean it up (probably I'll run prettier on the script blocks).
I made the suggested changes (commented above). I used prettier to clean up not only tabs, but also quotes, semicolons, spaces, and the like.
LGTM, will merge
Thx a lot