-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make form input persist through page reload #17
Comments
Deployed to http://test.lobid.org/playground/: @acka47 I thought it would be nicer if different tabs could have different persisted data, so that changing the inputs of one tab does not change the inputs of another open tab of metafacture playground when reloading. |
I agree. I played around with it a bit. Unfortunately, this does not work consistently. Adjusting the example workflow and then closing and reopening the tab or reloading works (whether I ran the workflow or not). But I also added a workflow from oersi-etl with a bigger input JSON document, a longer flux and a the edusharing fix and it didn't work. Does the feature currently somehow rely on the share URL for a workflow? If yes, it didn't work because the URL was too long to be loaded. (I assume, we will have to think of another solution for share URLs soon, latest when implementing examples with more input in #25 . As an aside: I noticed that there are suggestions from a dictionary when typing. I think we should disable it as it is of not much help but rather overwrites the names of flux parameters one has typed in. |
Could you please provide the input of the editors @acka47, so I can analyze this behaviour.
The feature does not rely on the share URL for a workflow, but it's possible that it may have something to do with long editor inputs.
I'm sure I can disable this. |
I just repeated the test, using the following input. The workflow does not run but is should work for testing this feature. Result:
Data{
"remote":null,
"content":{
"url":"https://www.zoerr.de/edu-sharing/components/render/038b8b6a-f51d-49f7-aa40-fd0b6adab60f",
"hash":null,
"version":"1.0"
},
"license":{
"icon":"https://www.oerbw.de/edu-sharing/ccimages/licenses/cc-0.svg",
"url":"https://creativecommons.org/publicdomain/zero/1.0/deed.en"
},
"isDirectory":false,
"commentCount":0,
"rating":{
"overall":{
"sum":0,
"count":0,
"rating":0
},
"affiliation":{
},
"user":0
},
"usedInCollections":[
],
"accessOriginal":[
"Read",
"ReadAll"
],
"originalRestrictedAccess":false,
"ref":{
"repo":"uni-tuebingen.de",
"id":"038b8b6a-f51d-49f7-aa40-fd0b6adab60f",
"archived":false,
"isHomeRepo":true
},
"parent":{
"repo":"uni-tuebingen.de",
"id":"b24ee9a4-1bc7-4866-8cfe-1450644b031b",
"archived":false,
"isHomeRepo":true
},
"type":"ccm:io",
"aspects":[
"cclom:lifecycle",
"cclom:technical",
"cm:versionable",
"ccm:iometadata",
"sys:referenceable",
"ccm:basemetadata",
"cm:metadataset",
"ccm:commonlicenses",
"cclom:rights",
"cm:thumbnailed",
"cm:auditable",
"cclom:meta-metadata",
"ccm:positionable",
"ccm:educontext",
"ccm:eduscope",
"ccm:usageaspect",
"ccm:collection_io_reference",
"sys:localized",
"cm:thumbnailModification",
"cclom:schema",
"ccm:published",
"ccm:licenses",
"cm:copiedfrom",
"ccm:lomreplication",
"cclom:general"
],
"name":"Funktionsweise eines Seismometers",
"title":"Funktionsweise eines Seismometers",
"metadataset":"mds",
"repositoryType":"ALFRESCO",
"createdAt":"2018-10-01T13:19:07Z",
"createdBy":{
"profile":null,
"firstName":"Andreas",
"lastName":"Barth",
"mailbox":null
},
"modifiedAt":"2019-07-19T08:26:57Z",
"modifiedBy":{
"profile":null,
"firstName":"unknown",
"lastName":"unknown",
"mailbox":null
},
"access":[
"Read",
"ReadAll"
],
"downloadUrl":"https://www.oerbw.de/edu-sharing/eduservlet/download?nodeId=038b8b6a-f51d-49f7-aa40-fd0b6adab60f",
"properties":{
"ccm:lifecyclecontributer_authorVCARD_ORG":[
""
],
"ccm:lifecyclecontributer_authorVCARD_TITLE":[
""
],
"ccm:original":[
"82cee92b-12e6-4666-a908-e50976ca3ca8"
],
"cm:created":[
"1538399947925"
],
"virtual:commentcount":[
"0"
],
"ccm:metadatacontributer_creatorVCARD_ORG":[
""
],
"cclom:version":[
"1.0"
],
"cm:original":[
"82cee92b-12e6-4666-a908-e50976ca3ca8"
],
"ccm:university_DISPLAYNAME":[
"- Alle -"
],
"cclom:general_language":[
"en"
],
"virtual:licenseicon":[
"https://www.oerbw.de/edu-sharing/ccimages/licenses/cc-0.svg"
],
"virtual:usagecount":[
"0"
],
"sys:node-uuid":[
"038b8b6a-f51d-49f7-aa40-fd0b6adab60f"
],
"ccm:lifecyclecontributer_authorVCARD_SURNAME":[
""
],
"ccm:taxonid_DISPLAYNAME":[
"Geowissenschaften (ohne Geographie)"
],
"ccm:classification_keyword":[
"Seismologie (Erdbebenkunde)",
"Seismometer (Seismograf, Seismograph)",
"Seismometrie (Erdbebenmessung)"
],
"virtual:licenseurl":[
"https://creativecommons.org/publicdomain/zero/1.0/deed.de"
],
"ccm:lifecyclecontributer_authorVCARD_URL":[
""
],
"virtual:childobjectcount":[
"0"
],
"cclom:title":[
"Funktionsweise eines Seismometers"
],
"ccm:lifecyclecontributer_authorVCARD_COUNTRY":[
""
],
"ccm:lifecyclecontributer_author":[
"BEGIN:VCARD\r\nVERSION:3.0\r\nN:;;;;\r\nFN:\r\nEND:VCARD\r\n"
],
"ccm:lifecyclecontributer_authorVCARD_REGION":[
""
],
"sys:store-protocol":[
"workspace"
],
"ccm:lifecyclecontributer_authorVCARD_STREET":[
""
],
"ccm:lifecyclecontributer_authorVCARD_PLZ":[
""
],
"sys:store-identifier":[
"SpacesStore"
],
"cclom:general_language_DISPLAYNAME":[
"Englisch"
],
"ccm:version_comment":[
"MAIN_FILE_UPLOAD"
],
"ccm:metadatacontributer_creatorVCARD_URL":[
""
],
"ccm:educationallearningresourcetype":[
"https://w3id.org/kim/hcrt/index"
],
"ccm:create_version":[
"true"
],
"ccm:university":[
""
],
"cm:modifiedISO8601":[
"2019-07-19T08:26:57.317Z"
],
"ccm:author_freetext":[
"USGS"
],
"ccm:metadatacontributer_creatorVCARD_REGION":[
""
],
"sys:node-dbid":[
"16935"
],
"ccm:wwwurl":[
"http://earthquake.usgs.gov/learn/glossary/?term=seismograph"
],
"cm:edu_metadataset":[
"mds"
],
"ccm:metadatacontributer_creatorVCARD_PLZ":[
""
],
"cclom:otherplatformrequirements":[
""
],
"cm:autoVersion":[
"false"
],
"cm:creator":[
"[email protected]"
],
"virtual:permalink":[
"https://www.oerbw.de/edu-sharing/components/render/038b8b6a-f51d-49f7-aa40-fd0b6adab60f/1.0"
],
"ccm:metadatacontributer_creatorVCARD_GIVENNAME":[
"Mark"
],
"cm:versionLabel":[
"1.0"
],
"cm:versionable":[
"true"
],
"ccm:lifecyclecontributer_authorVCARD_GIVENNAME":[
""
],
"ccm:published_handle_id":[
"10900.3/OER_HVLBPPeD"
],
"ccm:metadatacontributer_creatorVCARD_COUNTRY":[
""
],
"cm:created_LONG":[
"1538399947925"
],
"ccm:lifecyclecontributer_authorVCARD_TEL":[
""
],
"virtual:primaryparent_nodeid":[
"b24ee9a4-1bc7-4866-8cfe-1450644b031b"
],
"cm:lastThumbnailModification":[
"imgpreview:1538399948862"
],
"ccm:metadatacontributer_creator":[
"BEGIN:VCARD\r\nVERSION:3.0\r\nN:Wienöbst;Mark;;;\r\nFN:Mark Wienöbst\r\nTITLE:\r\nORG:\r\nURL:\r\nADR;TYPE=INTL,POSTAL,PARCEL,WORK:;;;;;;\r\nTEL;TYPE=WORK,VOICE:\r\nEND:VCARD\r\n"
],
"ccm:metadatacontributer_creatorVCARD_TEL":[
""
],
"ccm:lifecyclecontributer_authorVCARD_CITY":[
""
],
"ccm:metadatacontributer_creatorVCARD_STREET":[
""
],
"cm:createdISO8601":[
"2018-10-01T13:19:07.925Z"
],
"cclom:general_description":[
"Funktionsweise eines Seismometers mit Abbildung eines Horizontalseismometers"
],
"cm:modified":[
"1563524817317"
],
"ccm:metadatacontributer_creatorVCARD_CITY":[
""
],
"ccm:taxonid":[
"https://w3id.org/kim/hochschulfaechersystematik/n43"
],
"cm:edu_forcemetadataset":[
"false"
],
"cm:modifier":[
"System"
],
"ccm:educationallearningresourcetype_DISPLAYNAME":[
"Nachschlagewerk"
],
"ccm:published_date":[
"1535627398060"
],
"cm:autoVersionOnUpdateProps":[
"false"
],
"cclom:location":[
"ccrep://uni-tuebingen.de/ce72bc7f-9cfd-492d-9a77-480c5e02a2e9"
],
"ccm:educontextname":[
"default"
],
"ccm:lifecyclecontributer_authorFN":[
""
],
"ccm:metadatacontributer_creatorFN":[
"Mark Wienöbst"
],
"cm:modified_LONG":[
"1563524817317"
],
"ccm:metadatacontributer_creatorVCARD_TITLE":[
""
],
"ccm:published_dateISO8601":[
"2018-08-30T11:09:58.060Z"
],
"ccm:questionsallowed":[
"true"
],
"cm:automaticUpdate":[
"true"
],
"cm:name":[
"Funktionsweise eines Seismometers"
],
"ccm:published_date_LONG":[
"1535627398060"
],
"cm:initialVersion":[
"false"
],
"ccm:metadatacontributer_creatorVCARD_SURNAME":[
"Wienöbst"
],
"cclom:general_keyword":[
"Horizontalseismometer"
],
"ccm:commonlicense_key":[
"CC_0"
]
},
"mimetype":null,
"mediatype":"link",
"size":null,
"preview":{
"isIcon":false,
"isGenerated":false,
"type":"TYPE_USERDEFINED",
"mimetype":null,
"data":null,
"url":"https://www.oerbw.de/edu-sharing/preview?nodeId=038b8b6a-f51d-49f7-aa40-fd0b6adab60f&storeProtocol=workspace&storeId=SpacesStore&dontcache=1623846484768",
"width":null,
"height":null
},
"iconURL":"https://www.zoerr.de/edu-sharing/themes/default/images/common/mime-types/svg/link.svg",
"collection":null,
"owner":{
"profile":null,
"firstName":"Andreas",
"lastName":"Barth",
"mailbox":null
},
"originalId":"82cee92b-12e6-4666-a908-e50976ca3ca8"
} Flux
Fix
|
Thank you for the providing the inputs @acka47 |
Which browser do you use @acka47? I have observed the same behaviour with firefox, in Chrome everything works as expected. Since sharing workflows with long inputs does not work anymore and persisting input not in firefox I will move this issue to 'working' again. |
Yes, I am using Firefox. |
Unfortunately, it seems to be a firefox problem that session storage is not properly saved when restore a tab and the storage data is big. |
I am not sure as well. I tested some other web apps I use how they do this:
So, only GitHub reaches the high bar I have set. If you can easily find out how GitHub (or the JSON Formatter) achieve persistence over closing/reopening a tab in FF I'd be happy if you implemented it here as well. If it takes too much effort, I think we can deploy it as is. |
It seems like that Github uses cookies instead of webstorage. Since I believe in our case webstorage is the right solution and it works for shorter examples, I would like to deploy it as is. |
As a user I want my input into the form to be saved if I accidentally close and reopen the tab or reload the page to not have to do double work.
The text was updated successfully, but these errors were encountered: