drips-network / app

💧 Funding that flows — Drips Frontend
https://drips.network
GNU General Public License v3.0
30 stars 16 forks source link

Allow importing splits from CSV #1143

Closed efstajas closed 1 month ago

efstajas commented 1 month ago

When populating Drip List or Project splits, it should be possible to import splits from a CSV.

CSV format:

account,percentage
0x79756b6C2f913271fc0ee29A877fbd98258972BF,33.3334
https://github.com/wevm/wagmi,33.3333
https://www.drips.network/app/drip-lists/31017209032870028068280040871339261037749177808773684797297972107972,33.3333

if there is no percentage (e.g. setting collaborators on a collab. drip list):

account
0x79756b6C2f913271fc0ee29A877fbd98258972BF
...
efstajas commented 1 month ago

Considerations

brandonhaslegs commented 1 month ago

Design coming along here https://www.figma.com/design/vyI7f996JF8zwhnXwAwXdC/%F0%9F%92%A7-Drips?node-id=10036-25650&t=xuFCcHkQrTzgo7fv-1

Still need to do

nya-elimu commented 1 month ago

@efstajas As it relates, also see #1102

Here is an example of a CSV file we want to import data from: https://github.com/elimu-ai/web3-wiki/blob/main/funding-splits/content/FUNDING_SPLITS_HIN.csv

(We update these files once per month, before manually copying the data into our Drip Lists, which is a tedious task.)

brandonhaslegs commented 1 month ago

@nya-elimu This is great to know! I think if you switch contributor ID and impact percentage your CSV import for what we're building will work. We will sipmly ignore contributor ID (as long as it comes after address and percentage). @efstajas correct me if I'm wrong 😄

nya-elimu commented 1 month ago

Design coming along here https://www.figma.com/design/vyI7f996JF8zwhnXwAwXdC/%F0%9F%92%A7-Drips?node-id=10036-25650&t=xuFCcHkQrTzgo7fv-1

@brandonhaslegs The "↓ Import from CSV" option is missing from the "Edit your Drip List" view:

efstajas commented 1 month ago

@nya-elimu This is great to know! I think if you switch contributor ID and impact percentage your CSV import for what we're building will work. We will sipmly ignore contributor ID (as long as it comes after address and percentage). @efstajas correct me if I'm wrong 😄

Ideally our implementation would just look for the expected column names (presumably account & percentage), and ignore all others — then the order of the columns wouldn't matter.

nya-elimu commented 1 month ago

Ideally our implementation would just look for the expected column names (presumably account & percentage), and ignore all others — then the order of the columns wouldn't matter.

@efstajas Did some testing of the new "Import from CSV" feature, and the column name matching doesn't seem to work for us:

1. Create a Drip List:

2. Prepare CSV file with recipient and percentage as column names:

3. Upload the CSV file:

FUNDING_SPLITS_HIN.csv

recipient,contributor_id,percentage
0x0fa31ed0fa8e2d2a958b5b5d3c9e9b565abe3e93,1,58.50
0x754a9162678eaae9b8949eebd85ed1936b5abce3,2,24.30
0xec35e628dbf08ae096addb187a485e01d39e7560,3,10.20
0xda0bc9ecd14d0346ee41085edbc46a950bebd73d,4,4.0
0x2fab1fa377cb2631f0bb002fbcd0178819cd33ac,5,3.0

4. The percentage column is not imported correctly:

efstajas commented 1 month ago

Hey @nya-elimu, thanks a lot for giving this a try. You're right, that part didn't make it in the implementation. It expects the format to 100% match the provided example (only two columns, second with percentage).

efstajas commented 1 month ago

I just created #1166 to track improving this. 👍