Wire UI to database instead of mock data#26
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… and exclude Defeated from active onchain stats
…, replace Category column with Last Activity, fix tooltip styling
Pabl0cks
left a comment
There was a problem hiding this comment.
Awesome job Shiv! I've been playing with the dashboard with "real" data, and have done some tweaks "on the fly". Please take a look to make sure everything makes sense and the code pushed is not too bad.
Bug fixes
- Recognize
crosschainexecutedTally status: map to "Cross-chain Executed" in Tally column, "Executed" globally - Handle "Defeated" tally status explicitly instead of falling through to "Awaiting On-chain Vote"
- Fall back to Snapshot votes in the Votes column when Tally stage does not exist
- Use
startsWithmatching for Snapshot vote labels (e.g. "For DVP Quorum") => Maybe for this one is just to show the multi-choice? Maybe this is too hacky? - Display multi-choice Snapshot votes (truncated labels + hover tooltip) instead of "No votes yet"
- Show "Active On-chain Vote" for Tally proposals with
Activestatus instead of "Draft" - Show "Active Off-chain Vote" for Snapshot proposals with
Active/Pendingstatus instead of "Draft" - Exclude "Defeated" from "Active Onchain Votes" stats count
- If a proposal has several tally or snapshot stages, sort tally stages by
last_activityand snapshot stages byvoting_endinstead ofupdated_at(import timestamp)
Tweaks
- Sort table rows by most relevant stage date: tally > snapshot > forum
- Group status filter options by stage: Forum → Snapshot → Tally
- Add filter options for Active On/Off-chain Vote
- Rename fallback status from "Draft" to "Unknown" (draft was missleading for a fallback, unless you did it for a reason 🙏)
- Replace "Category" column with "Last Activity" (relative timestamps). Let's not overcomplicate having to catalog the proposals, last activity is a useful field to have, so you know how fresh each proposal is.
- Make vote stage badges clickable links to their Snapshot/Tally pages. That's specially useful when there is more than 1 tally or snapshot stage.
- Count "Cross-chain Executed" in "Executed / Pending Execution" stats
- Add clarification on "Active Discussions" dashboard stat and checkbox
Haven't done a deep testing, but I think this is good enough for the demo, we can continue testing and fixing whatever looks not OK.
Was thinking about what was the best "Proposal title" to show in the table, if the one linked to proposal (current) or the snapshot/tally title, was not sure so did not change it
|
TYSM Pablo! Everything looks great to me and more readable UI 🫶!
Ohh it was just AI :( "Unknown" makes more sense actually!
I just compared the different title from proposal with the stages and it seems like most of them were almost 50% were almost exact match, 30-45% differed just because of html entities (& → &) or prefix differences ([CONSTITUTIONAL]), not real content differences, and the remaining 5-10% were a bit differnt for example: PROPOSAL: AIP: Timeboost + Nova Fee Sweep So I think maybe the forum proposal is best canonical choice. Maybe in future the expanded history items can show the stage specfic titles if we want 🙌 |
Pabl0cks
left a comment
There was a problem hiding this comment.
TYSM Pablo! Everything looks great to me and more readable UI 🫶!
Great!
So I think maybe the forum proposal is best canonical choice. Maybe in future the expanded history items can show the stage specfic titles if we want 🙌
Yep! Let's start like this, approving 🙏
Summary
Closes #25
Handled the wiring of the UI till now. The subsection from #25 still remaining.
Subissues from #25:
null proposal_id. Decide whether tally/snapshot items should support linking to multiple proposals. Example: "[CONSTITUTIONAL] Remove Cost Cap, Update Executors, Disable Legacy USDT Bridge",Test plan
Xd agofor recent,Xy Xmo agofor older🤖 Generated with Claude Code