ProjectDrawdown / global-research-platform

Drawdown Global Research Platform - UI
Other
20 stars 19 forks source link

As a user, I can upload a custom VMA #5

Open colleenskemp opened 3 years ago

colleenskemp commented 3 years ago

Time estiamte: 17 hours

Proposed change: As a researcher, I am able to upload a new VMA table.

Description: You will not find this designed in current approved designs. However, there is a design for this in an archived version. Please use this section of this archived version to direct your implementation: https://www.figma.com/file/QImAyi1guE4AICGMN7uODK/Drawdown-Portfolio-UI-Figma-Chakra-UI?node-id=1256%3A65707

drawer right

Open needs for this:

Currently there is the API ability to upload a new VMA table.

Acceptance criteria:

As a user, I can upload my own data to mean, high, and low

Question: Can I upload my data source also?

eethann commented 3 years ago

There are a few core functionalities needed for this ticket (we might want to split them, might not):

  1. The ability to upload new VMA source CSVs for each VMA from the "Source" dropdown.
  2. The ability to view and select uploaded VMA CSVs once uploaded.
  3. The ability to see the calculated results of an uploaded VMA CSV.

2 and 3 appear to be already implemented, but might need to be split into additional tickets if additional updates are needed.

3 might require updates once @denised has completed data loader architecture updates, but we should be able to defer that integration.

The basic upload can use the /vma_csv API endpoint.

eethann commented 3 years ago

This is an old UX concept that can provide guidance for the upload feature. Other features are probably a good deal out of sync with the current implemented UX.

pdd-discovery-draft-ui-concept

eethann commented 3 years ago

Quick notes that this ticket deals with the middle of the 3 upload columns. Primarily the "Available VMAs" screen. Instead of a button we can just add an "Upload New" option to the dropdown.

The upload modal would then have a name field as well as a file upload field. The UI would submit the file and name to the API, as well as the Variable ID with which it's associated. The Variable ID should be determined automatically based on the active VMA. E.g. if First Cost VMA was the visible one that the user clicked "Upload New" from, the UI should automatically determine that firstcost is the variable ID (that's not the right Variable name, but should be sufficient).

eethann commented 3 years ago

Also deferred for later: restricting the list of available VMAs to those the user uploaded, and later those that have been shared with the user.

sutjin commented 3 years ago

Want to add in the acceptance criteria, since we are uploading a file - an addtional UI that would indicate success/failure on upload

also referencing this ticket https://github.com/ProjectDrawdown/global-research-platform/issues/6, we should be able to create new VMA from the input also?

litenull commented 3 years ago

Time estimate: 17 hours