-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Data Explorer] Serialize redux state to share link #21
Comments
Comment from Paul Walker: A bit of further analysis. Unloading widgets -> datapackagePros:
I'm guessing that this should have an interface as follows:
Questions:
Cons Complicated Save initial config on storeSave the initial config and use it to reload app, along with controls which could be updated. So an application could be rehydrated with two attributes and one function call:
The output of this would be the application state, including data |
Comment from Paul Walker: Most of this is done:
There is a problem that the state is too long for the url which has a limit of 20000k
I could do further research on redis solution. I'm sure there is a freemium hosted solution Open to other suggestions :) |
Comment from Paul Walker: Also maybe we can use JSONC.pack which is url friendly zip... it's very ugly / unreadable / looks kind of sketchy (ie - it looks like obfuscated code which I would probably not paste into a url myself because I wouldn't trust it) JSON: {"widgets":[{"active":true,"name":"Map","datapackage":{"views":[{"id":0,"title":"Murales%20en%20format%20geojson","resources":["murales_en_format_geojson"],"specType":"map"}]},"loading":false}],"datapackage":{"resources":[{"path":"https://montreal.l3.ckan.io/en/dataset/587de1ea-817b-4e10-b387-83ec89f94e1b/resource/bc1e71e4-269a-4fa9-a278-ab6bfd80ec23/download/murales.geojson","pathType":"remote","name":"murales_en_format_geojson","format":"geojson","mediatype":"application/geo+json","mimetype":"application/json","cache_url":null,"hash":"","description":"Cet%20ensemble%20de%20données%20présente%20les%20murales%20financées%20par%20la%20Ville%20de%20Montréal%20depuis%202007.%20Les%20murales%20répertoriées%20sont%20celles%20financées%20par%20les%20programmes%20suivants:%20Graffitis%20et%20murales%20(2007-2015),%20Projet%20pilote%20d%27art%20mural%20(2014-2015)%20et%20Programme%20d%27art%20mural%20(2016-).\r\n\r\nVeuillez%20noter%20que%20les%20photographies%20des%20murales%20liées%20dans%20l%27ensemble%20de%20données%20ne%20sont%20pas%20soumises%20à%20la%20licence%20de%20données%20ouvertes%20Creatives%20Commons%204.0.%20Les%20œuvres%20sont%20protégées%20par%20les%20droits%20d%27auteur%20d%27usage.%20Pour%20toute%20utilisation,%20veuillez%20contacter%20les%20ayant%20droits%20afin%20d%27obtenir%20les%20licences%20nécessaires.","created":"2019-08-20T13:04:09.502529","datastore_active":false,"package_id":"587de1ea-817b-4e10-b387-83ec89f94e1b","cache_last_updated":null,"state":"active","mimetype_inner":null,"archiver":{"is_broken_printable":"Downloaded%20OK","updated":"2019-08-20T13:04:15.236769","cache_filepath":"/tmp/archive/bc/bc1e71e4-269a-4fa9-a278-ab6bfd80ec23/murales.geojson","last_success":"2019-08-20T13:04:15.236769","size":126010,"is_broken":false,"failure_count":0,"etag":"\"7575193e1c3c66dfd425bf61e5f46787\"","status":"Archived%20successfully","url_redirected_to":"https://cc-p-minio.ckan.io/ckan/montreal/resources/bc1e71e4-269a-4fa9-a278-ab6bfd80ec23/murales.geojson?AWSAccessKeyId=2effdd1004072cb9&Expires=1566306315&Signature=eKO3AI%2BGPGUaRtMApJNZ%2Fflma4M%3D","hash":"d023a02c1f1646fcaded3a8075eb4059accf1088","status_id":0,"reason":"","last_modified":"2019-08-20T13:04:10","resource_timestamp":"2019-08-20T13:04:09.461130","mimetype":"application/json","cache_url":"https://montreal.l3.ckan.io/bc/bc1e71e4-269a-4fa9-a278-ab6bfd80ec23/murales.geojson","created":"2019-08-20T13:04:15.258228","first_failure":null},"last_modified":"2019-08-20T13:04:09.440232","position":0,"revision_id":"e82aa157-d0bd-48f4-91f1-8135ba972fec","url_type":"upload","id":"bc1e71e4-269a-4fa9-a278-ab6bfd80ec23","resource_type":null,"size":null,"title":"Murales%20en%20format%20geojson","encoding":"utf-8"}],"controls":{"showChartBuilder":false,"showMapBuilder":false}},"datastoreFilters":{}}
JSONC compression isn't a definitive solution since we will still easily exceed the url limit in some cases - if the resource description is long, for instance |
Comment from Rufus: let's not do key value stuff in redis. For now we can see if we could keep it simple e.g. strip the data package down to essentials. Longer terms we just store views explicitly i.e. login to store and share ... (that's a separate issue). |
Moved from gitlab, originally created by @starsinmypockets
As a user I want to share a link the data explorer in the state it is currently in so I can share insight and have fun exploring data with friends
Accptance
Tasks
Analysis
(from hackmd w/ Rufus + Anuar 2019-09-02)
Data Explorer can take and run ...
view-embed?redux= .....
Boot a data explorer and load that redux ...
/core/xyz ... looking at an explorer
share https://mysite.com/view-explorer?redux=...
iframe src=/view-explorer?redux=....&embed=true
I go to showcase page and play with one of the xplorerers
I take the link now in the share field which is
/view-explorer?redux=xxx
I paste this in my browser
/view-explorer?redux=xxx
ACTIONS
The text was updated successfully, but these errors were encountered: