rawgraphs / rawgraphs-app

A web interface to create custom vector-based visualizations on top of RAWGraphs core
https://rawgraphs.io
Apache License 2.0
8.66k stars 1.84k forks source link

Saving the URL and not the data in the .rawgraphs project #256

Open giorgiouboldi opened 3 years ago

giorgiouboldi commented 3 years ago

In which part of the interface would this feature applies?

[ x] 1. Load your data [ ] 2. Choose a chart [ ] 3. Mapping [ ] 4. Customize [ x] 5. Export

Is your feature request related to a problem? Please describe. When i import data from a URL and then I save the project, the .rawgraphs file export the data and not the URL. When i open the project i see the button "Refresh data from URL" but it doesn't work anymore and the data is not updated.

Describe the solution you'd like It would be nice to export just the URL and not the data to be able to open and refresh the data if it changed.

Describe alternatives you've considered i can simply go to change data and paste the url again but it's not intuitive

osioalberto commented 3 years ago

The URL is already saved in the .rawgraphs project file, and the "Refresh data from URL" actually triggers a network call. This issue depends on a bug related to the way data are managed after the network call. In order to fix this, the following problem arises: when the network call returns json data, we need to take the user back to the "select an array" screen of the json parsing flow.

What do you think about this?

mikima commented 3 years ago

Is it possible to avoid the "select an array" screen if the JSON structure is the same (meaning it doesn't create any error)? How would it work with CSV/TSV files?

osioalberto commented 3 years ago

CSV/TSV files are not a problem, since they can be parsed without user action. In order to skip the path selection in JSON files, we need to persist the path the user selected the first time both in the app state and in the project file. What do you mean by "it doesn't create any error"?