Add DAO vote transaction submission#1441
Draft
dnlbui wants to merge 8 commits into
Draft
Conversation
* Updated the Proposal Info Modal to dynamically display the proposal title based on transaction data, improving clarity for users. * Introduced a new rendering function for recent votes, providing users with insights into voting activity. * Added a new section for displaying total vote statistics, including a pie chart representation and detailed legends for better understanding of voting distribution. * Implemented styling adjustments to enhance the visual presentation of voting information, ensuring a more user-friendly experience. These changes significantly improve the functionality and usability of the Proposal Info Modal, offering users clearer insights into voting activities and outcomes.
* Added a new function to format and display weighted votes, improving clarity in vote representation. * Removed the outdated recent votes rendering function to streamline the modal. * Updated the display of total voting power to reflect weighted votes, enhancing user understanding of voting metrics. * Made various CSS adjustments to improve layout and alignment of voting information, ensuring a more user-friendly experience. These changes significantly enhance the functionality and usability of the Proposal Info Modal, providing users with clearer insights into voting metrics and improving overall presentation.
* Updated the HTML structure in the Proposal Info Modal to improve the display of voting metrics, separating total votes and share into distinct elements for better clarity. * Removed unused voter list properties from the proposal mapping functions to streamline data handling. * Adjusted CSS styles for the voting metrics section, enhancing layout and alignment for a more user-friendly experience. These changes enhance the clarity and usability of the voting metrics in the Proposal Info Modal, providing users with clearer insights into voting statistics.
…mprovements * Updated the getDaoProposalVotingWindow function to accept a timestamp parameter, allowing for more accurate voting window calculations. * Introduced a new function, formatDaoEstimatedVotingPower, to provide a clearer representation of estimated voting power. * Refactored the Proposal Info Modal to utilize the new estimated voting power function, improving the display of voting metrics. * Adjusted the getVoteSubmission and getVotePreviewValidation functions to incorporate the timestamp for enhanced validation accuracy. These changes improve the accuracy and clarity of voting window calculations and estimated voting power in the Proposal Info Modal, enhancing user experience and understanding of voting metrics.
* Introduced the Decimal.js library to improve precision in calculations related to DAO voting weights and estimates. * Updated various functions to utilize Decimal for handling large numbers and ensuring accurate arithmetic operations. * Added new utility functions for formatting and scaling voting power, enhancing clarity in the Proposal Info Modal. These changes significantly enhance the accuracy and reliability of voting metrics, providing users with a more precise understanding of their voting power and estimates.
* Added a maximum length constraint for DAO proposal titles, enforcing a limit of 100 characters. * Updated the title input field in the Add Proposal Modal to reflect the new maximum length. * Enhanced validation logic to display an error message if the title exceeds the specified length. These changes improve the user experience by ensuring that proposal titles adhere to the defined character limit, preventing submission errors.
…Info Modal * Deleted the external Decimal.js library to simplify the codebase and reduce dependencies. * Refactored voting metrics calculations in the Proposal Info Modal to eliminate reliance on Decimal, ensuring continued accuracy with native JavaScript types. * Updated the display logic for voting totals and estimates, enhancing clarity and user experience. These changes streamline the voting metrics implementation, improving maintainability while preserving functionality.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Changed
This PR connects the DAO voting UI to real
dao_votetransaction submission.daoRepo.castVotenow builds and submits signeddao_votetransactions with proposal ID, option weights, spend, timestamp, and network ID.ProposalInfoModalenables vote submission only after local eligibility checks for voting window, wallet, spend plus fee, vote threshold, minimum spend, and option weights.Fixed Flow
dao_votetransaction, then refreshes DAO proposal data.Why
The voting UI previously stopped at preview-only behavior. This adds the transaction path while keeping the client-side estimate separate from the server's authoritative Decimal-based vote-weight calculation.
Validation
node --check app.jsnode --check dao.repo.jsgit diff --check issue-1422-voting-flow-ui...HEADCloses #1423