GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

Add action labels #78

Closed krisbitney closed 5 months ago

krisbitney commented 6 months ago

The UI design has what I would call "action labels", e.g. Stewards get G$ 800 each time they log a tree's status.. How can these be obtained?

sirpy commented 6 months ago

@decentralauren @patpedrosa please assist

I'm guessing this has to be part of the fixed attributes of the project

decentralauren commented 6 months ago

@sirpy @krisbitney correct. This is a fixed attribute per project (like the description and social URLs)

krisbitney commented 6 months ago

@decentralauren How would I obtain the attribute?

sirpy commented 6 months ago

@krisbitney from the json file you parse from ipfs add another attribute if it is missing.

krisbitney commented 6 months ago

@krisbitney from the json file you parse from ipfs add another attribute if it is missing.

I can add an optional attribute actionLabel. What should I use as a placeholder when that attribute is missing?

Please keep in mind that the current IPFS data parsing is based on the example IPFS data available to me. The action label value does not exist on the IPFS data I am aware of: ipfs://bafkreidvb2y7arj5q7um4a4dww4uxodwq52dedkb2k2bukodcliac7z254/

krisbitney commented 6 months ago

Based on https://www.notion.so/Pilot-dApp-Collective-Content-98cd3c62a39b4c7b9a8e066f14b6074e, I added a property infoLabel.

In the UI, I use a default statement if infoLabel is missing.

const infoLabel = collective.ipfs.infoLabel ?? 'Stewards get G$ each time they complete an action.';
krisbitney commented 5 months ago

@sirpy @decentralauren I believe this is completed

L03TJ3 commented 5 months ago

@decentralauren @patpedrosa what should be confirmed is the default copy if no info label is defined

decentralauren commented 5 months ago

@L03TJ3 In the event that this value is blank, we should display: "Please see the smart contract for information regarding payment logic."

krisbitney commented 5 months ago

Please see the smart contract for information regarding payment logic.

Fixed in https://github.com/GoodDollar/GoodCollective/pull/132

decentralauren commented 5 months ago

Thanks @krisbitney! I still see the same copy for all collectives rather than the dummy copy for "dummy" collectives. Screenshot 2024-01-30 at 3 45 45 PM

krisbitney commented 5 months ago

@decentralauren yes, I had forgotten that the default label is also used in the user profile. The fix for that has been added to the other PR.

decentralauren commented 5 months ago

Thanks @krisbitney