1) fix qri-io/qri#735
2) Do some work on the export button on the frontend:
Overall behavior we are going for:
click the export button on the dataset page
a modal slides in from the side with an input to select the format, an export button, and a cancel button
clicking export downloads the exported dataset and closes the modal
if there is an error, it displays in the modal
clicking cancel closes the modal.
changes for modal content:
Rename and move dataset/Export to form/ExportForm:
ExportForm should take the exportPath, and onClick as params.
It should have a select input with the options json, yaml, & xlsx (and native??).
Form should also include an "export" button, that uses the exportPath + ?format= + selectedFormat as the button download param, and a dataset specific name with the correct file extension as the downloadName (take a look at what the dataset/Export component does currently)
The form should also include a "cancel" button
The "export" button should be disabled until a format is chosen.
changes for wiring up the modal:
using the pattern found in the Profile component, clicking on the DatasetButtonGroupExport button should open up a modal containing the ExportForm.
exportPath should be taken from the current exportPath that is being passed to DatasetButtonGroup.
-onClick should be the action to close the modal.
This one's a two parter:
1) fix qri-io/qri#735 2) Do some work on the export button on the frontend: Overall behavior we are going for:
export
button on the dataset pageexport
button, and acancel
buttonexport
downloads the exported dataset and closes the modalchanges for modal content:
dataset/Export
toform/ExportForm
:ExportForm
should take theexportPath
, andonClick
as params.json
,yaml
, &xlsx
(andnative
??).exportPath
+?format=
+selectedFormat
as the buttondownload
param, and a dataset specific name with the correct file extension as thedownloadName
(take a look at what thedataset/Export
component does currently)changes for wiring up the modal:
Profile
component, clicking on theDatasetButtonGroup
Export
button should open up a modal containing theExportForm
.exportPath
should be taken from the current exportPath that is being passed toDatasetButtonGroup
. -onClick
should be the action to close the modal.