cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.08k stars 3.5k forks source link

Textual and Voting Options #19228

Open julienrbrt opened 5 months ago

julienrbrt commented 5 months ago

When introducing multiple choice proposal, we've aliased the voting options to keep backward compatibility: https://github.com/cosmos/cosmos-sdk/blob/41c84d6/proto/cosmos/gov/v1/gov.proto#L30-L54 The choice has been made to have the options: option 1, 2, 3,.. as default while the previous options: yes, no, abstain, ... as alias.

These option can be used interchangeably in sign mode direct, which is perfect for the use case of multiple choice proposal, however in sign mode textual it does not work.

It has been investigated to create a custom message render option (https://github.com/cosmos/cosmos-sdk/pull/18849#issuecomment-1867560107) for gov voting, however at voting we do not know the proposal type for make the choice. The quick solution is to inverse the alias, leaving yes, no, abstain as default and option 1, 2, 3 as the alias. The drawback is that voting for a multiple choice proposal using textual will be weird (it will display vote yes, no, abstain) while you are actually voting on an option.

julienrbrt commented 3 months ago

The workaround has been implemented in https://github.com/cosmos/cosmos-sdk/pull/19718, but this should still be investigated for a better UX.