qri-io / frontend

frontend application for our qri.cloud site
GNU General Public License v3.0
3 stars 2 forks source link

feat: dataset editing + new dataset convergence #631

Closed boandriy closed 2 years ago

boandriy commented 2 years ago

added functionality to edit Meta and Readme of a dataset

closes #273

chriswhong commented 2 years ago

Added a commit with a major refactor, consolidating the previous work done on this branch to edit readme and meta for an existing dataset with the new dataset creation flow that was recently merged into master.

Both new dataset creation and existing dataset are now consolidated into the same feature in /src/datasetEditor. There are two top-level components, NewDatasetEditor and ExistingDatasetEditor, both of which render DatasetEditorLayout in different ways for their respective UXs.

Both also share the same state, which includes a Dataset which will be mutated when the user edits components, loading and error booleans, and a File for body updates

export interface DatasetEditorState {
  dataset: Dataset
  loading: boolean
  error: string
  // file is used to store the file reference when POSTing a body via form data
  file?: File
}

There is a lot more to do, but as of dc08ea8 the user can create a new dataset from a CSV, and modify the readme and meta before committing. They can also edit existing datasets via a button in the history list.

Still TODO:

PUNT

PUNT

Follow-on issues