-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Qt: Adds Governance tab #4351
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
Qt: Adds Governance tab #4351
Conversation
|
Views of the new functionality: Questions:
|
|
Nice! 👍
Would be nice to have "Voting status" implemented in a similar way it's done in DMT imo. Also, cycles (e.g. current/total) and total amount might be useful in this list. URL, yes/no/abstain counts etc. can be shown in a separate panel like it's done in DMT (i.e. you select a proposal and this populates "Details" panel below).
The list is small here (10s comparing to 1000s in mn list), periodic updates should be ok I think (assuming they won't cause issues with "Details" panel I mentioned above).
Yeah, I think it would be better to start with proposals first. We can get back to triggers later when we polish proposals list(/vote?) functionality. |
|
This pull request has conflicts, please rebase. |
|
This pull request has conflicts, please rebase. |
WIP: basically ready to be filled out, most of the infra in place now.
Governance table now contains real values for current columns. Display columns may potentially change. - want url in table if right click option opens url? - What set of cols wanted? Show yes/no votes? - Decide refresh functionality. - Do we even want filter func? (checkbox show: proposal, trigger, active coming)
Towards DMT like Governance page, now shows voting status, but needs to look at super blocks to determine if proposal period has passed and show final funded or unfunded for past proposals.
Refactors the QT Governance tab to use a Model-View architecture. The list of Proposals is stored in a QAbstractItemModel, and a QTableView is used to display. This makes a much cleaner separation of concerns in the implementation. Also, can now use the QSortFilterProxyModel to get responsive filtering. Less internal state inside the GovernanceList, critical sections removed. - Needs update loop implemented. - Needs Proposal detail widget implemented.
Periodically update list of governance related proposals.
- Adds LOCK(cs_main) for call to pGovObj->IsValidLocally.
- retab, removes trailing whitespace in governancelist.{cpp,h}
|
Please see formatting changes https://github.com/dashpay/dash/pull/4351/checks?check_run_id=3878279015 |
UdjinM6
left a comment
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.
pls see https://github.com/UdjinM6/dash/commits/pr4351 for some suggestions
|
@UdjinM6, sorry I think your pr4351 branch may have been deleted? |
|
oops, sorry, should be available again |
|
No worries, thanks! I like those changes. Just caught one extra place that should refer to the full column name. |
UdjinM6
left a comment
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.
LGTM
ACK
PastaPastaPasta
left a comment
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.
ACK for squash merge
|
Things for future changes: We should consider adding a pop-up warning before opening the proposal URL |
* Qt: Adds settings option to showGovernanceTab
* Qt: Adds not-yet-functional Governance tab to UI
* library: adds hook into governance rom node interface
* Qt: WIP: puts CGovernanceObject hashes on Governance tab
WIP: basically ready to be filled out, most of the infra in place
now.
* Qt: Populates Governance table values
Governance table now contains real values for current columns. Display
columns may potentially change.
- want url in table if right click option opens url?
- What set of cols wanted? Show yes/no votes?
- Decide refresh functionality.
- Do we even want filter func? (checkbox show: proposal, trigger, active coming)
* qt: Shows Voting Status on Governance page
Towards DMT like Governance page, now shows voting status, but needs to
look at super blocks to determine if proposal period has passed and show
final funded or unfunded for past proposals.
* Qt: refactor governance tab to use Model-View arch
Refactors the QT Governance tab to use a Model-View architecture. The
list of Proposals is stored in a QAbstractItemModel, and a QTableView is
used to display.
This makes a much cleaner separation of concerns in the implementation.
Also, can now use the QSortFilterProxyModel to get responsive filtering.
Less internal state inside the GovernanceList, critical sections
removed.
- Needs update loop implemented.
- Needs Proposal detail widget implemented.
* qt: adds periodic update to gov proposal list
Periodically update list of governance related proposals.
* qt: populates governancelist voting status column
* qt: governancelist Porposal shows extra info on doubleClick
* qt: governancelist: reorder .cpp impl to match .h
* qt: governancelist: fixup based on CI
- Adds LOCK(cs_main) for call to pGovObj->IsValidLocally.
- retab, removes trailing whitespace in governancelist.{cpp,h}
* qt: clang-format for governancelist
* Fixes
- drop unused include
- use proper univalue "get_" functions
- shorter/translatable statuses
- shorter dates
- add missing css styles
* qt: addresses governancelist code review items
* qt: use enum to name columns of governancelist
* fix: clear context menu before adding new items
* fix: skip potential nullptr proposals
* improve: show proposal url in context menu
* refactor: tweak enum name, make sure it's int starting from 0, use full name
* fix: column count
* improve: make it sortable, sort by start_date by default
* qt: use full col name in voting status col change signal emit
* better sorting
* use mapToSource to fix data fetching
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
* Qt: Adds settings option to showGovernanceTab
* Qt: Adds not-yet-functional Governance tab to UI
* library: adds hook into governance rom node interface
* Qt: WIP: puts CGovernanceObject hashes on Governance tab
WIP: basically ready to be filled out, most of the infra in place
now.
* Qt: Populates Governance table values
Governance table now contains real values for current columns. Display
columns may potentially change.
- want url in table if right click option opens url?
- What set of cols wanted? Show yes/no votes?
- Decide refresh functionality.
- Do we even want filter func? (checkbox show: proposal, trigger, active coming)
* qt: Shows Voting Status on Governance page
Towards DMT like Governance page, now shows voting status, but needs to
look at super blocks to determine if proposal period has passed and show
final funded or unfunded for past proposals.
* Qt: refactor governance tab to use Model-View arch
Refactors the QT Governance tab to use a Model-View architecture. The
list of Proposals is stored in a QAbstractItemModel, and a QTableView is
used to display.
This makes a much cleaner separation of concerns in the implementation.
Also, can now use the QSortFilterProxyModel to get responsive filtering.
Less internal state inside the GovernanceList, critical sections
removed.
- Needs update loop implemented.
- Needs Proposal detail widget implemented.
* qt: adds periodic update to gov proposal list
Periodically update list of governance related proposals.
* qt: populates governancelist voting status column
* qt: governancelist Porposal shows extra info on doubleClick
* qt: governancelist: reorder .cpp impl to match .h
* qt: governancelist: fixup based on CI
- Adds LOCK(cs_main) for call to pGovObj->IsValidLocally.
- retab, removes trailing whitespace in governancelist.{cpp,h}
* qt: clang-format for governancelist
* Fixes
- drop unused include
- use proper univalue "get_" functions
- shorter/translatable statuses
- shorter dates
- add missing css styles
* qt: addresses governancelist code review items
* qt: use enum to name columns of governancelist
* fix: clear context menu before adding new items
* fix: skip potential nullptr proposals
* improve: show proposal url in context menu
* refactor: tweak enum name, make sure it's int starting from 0, use full name
* fix: column count
* improve: make it sortable, sort by start_date by default
* qt: use full col name in voting status col change signal emit
* better sorting
* use mapToSource to fix data fetching
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>


Towards #4337, implementing DMT-like Governance Functionality.