snapshot-labs / sx-ui

An open source interface for Snapshot X protocol.
https://snapshotx.xyz
MIT License
34 stars 29 forks source link

SX-UI: create proposal on Snapshot #849

Closed bonustrack closed 7 months ago

bonustrack commented 9 months ago

SX-UI: offchain proposal editor

Framing

Design/UX

Image

You can test here on second step of proposal creation:

https://testnet.snapshot.org/#/testsnap.eth/create

Technical spec

  1. I recommend starting with just basic voting (For, Against, Abstain) as that's voting types we support right now -> we will likely need some design input for both editor and voting part).
  2. We will need remove this check so we can access editor: https://github.com/snapshot-labs/sx-monorepo/blob/5279ba93d606c5744891307509eb0e3906b1c1e9/apps/ui/src/views/Space/Overview.vue#L66
  3. Editor checks for VP before user can create proposal. SX spaces have separate strategies for voting and proposing (I'm not familiar with Snapshot v1) - we will need to fill in proper strategies there (to either use the same, or different values if Snapshot v1 has different strategies for proposing as well) - will need to adjust types to make sense: https://github.com/snapshot-labs/sx-monorepo/blob/75315e017c7361c93ef7d5a8d5303f5fc3ef4351/apps/ui/src/networks/offchain/api/index.ts#L75-L77
  4. Next step will be to add propose method (remember to change useActions to use getNetwork instead of getReadWriteNetwork for propose), similar to vote and add support to propose method in sx.js (similar as vote). https://github.com/snapshot-labs/sx-monorepo/blob/737bfe872936f8372490a56aae109075a56c7c9d/apps/ui/src/networks/offchain/actions.ts#L32-L52
wa0x6e commented 8 months ago

We're not allowing user to choose the voting period and delay here. What arbitrary values should we set if the space did not set them ?