-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: vote modal with reason #427
Conversation
@Sekhmet I got this working on offchain, but will need some help indexing the vote for evm, and also maybe starknet |
@bonustrack The vote reason is now working for offchain, and you can start testing the UI and UX. Main testing area will be the UI/UX on the modal when the user don't have enough voting power, or failing to fetch voting power. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flow works well for me just added a small suggestion
@@ -27,7 +27,7 @@ withDefaults( | |||
</button> | |||
</template> | |||
|
|||
<style scoped lang="scss"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it no longer scoped? That's generally not good because it will leak styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the UILoading icon can not be styled when inside the button with the scope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link to where do you use it like this (couldn't find it in the diff) so I can take a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to fix the loading icon, on the vote modal CONFIRM button, when pressed, and while waiting for wallet confirmation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
@wa0x6e typechecks are failing there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that it looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
Summary
Closes: #386
This PR moves the vote UI inside a vote modal, similar to v1, and allow attaching a reason to a vote.
Features
reason
field has been added in the vote modal, where the voter can attach a reason to his vote.getVotingPower
logic into a store and composable, similar to how we handleSpace
, enabling caching and avoid code duplicateHow to test
CONFIRM
button should be disabled if you don't have sufficient voting power to votemetadataUri
(onchain) orreason
(offchain) field if setRETRY
button to refetch the voting power, in case of fetching errorTODO
Future