voting: Add user-facing support for poll response types #1976
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The v5.0.0 release includes protocol support for different poll response options besides multiple-choice but deferred the corresponding functionality in the user-facing components. This implements support for single-choice and yes/no/abstain poll response types in the GUI and RPC interface.
The proposed implementation relies on the existing validation in the poll and vote builder classes to provide feedback about the construction of single-choice and yes/no/abstain polls and votes. I did not change the multiple-choice behavior of the GUI for these response types because the effort required is better spent redesigning these widgets entirely, and we will likely do so as part of the GUI overhaul.
Versions 5.0 through 5.1 can cast votes for single-choice polls already. Users will need to upgrade to a release that contains the changes in this PR to vote for polls with a yes/no/abstain response type.