Skip to content

add consensus UI#729

Merged
Sirmorrison merged 78 commits intoplanetdecred:masterfrom
dreacot:consensus_ui
Mar 18, 2022
Merged

add consensus UI#729
Sirmorrison merged 78 commits intoplanetdecred:masterfrom
dreacot:consensus_ui

Conversation

@dreacot
Copy link
Collaborator

@dreacot dreacot commented Dec 24, 2021

Requires planetdecred/dcrlibwallet#216

resolves #655
Fix #776

Screenshot from 2022-01-21 14-59-46
Screenshot from 2022-01-21 15-00-01
Screenshot from 2022-01-21 15-00-30

@dreacot dreacot force-pushed the consensus_ui branch 3 times, most recently from 4927804 to 69f0f9f Compare January 19, 2022 19:21
@dreacot dreacot force-pushed the consensus_ui branch 3 times, most recently from d43b8ae to fbd04ba Compare February 7, 2022 19:36
@dreacot dreacot marked this pull request as ready for review February 7, 2022 19:41
@dreacot dreacot changed the title W.I.P add consensus UI add consensus UI Feb 7, 2022
@dreacot dreacot force-pushed the consensus_ui branch 2 times, most recently from e168d4d to 95c9691 Compare February 9, 2022 12:33
Copy link
Contributor

@Sirmorrison Sirmorrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

* The vote/change vote button text is wrapped and not properly aligned. * Every word on the agenda subject/title should be capitalized.

image

The vote button should not be visible for finished vote.
Also, use a shadow widget for the agendas when they are hovered so the background is not hidden when hovered.
Something similar was done for the more page and the security page.
image

The navigation does not conform to the mock up.
image

mock up
image

@dreacot
Copy link
Collaborator Author

dreacot commented Feb 21, 2022

Screenshot 2022-02-21 at 4 52 50 PM

  1. the data returned from the blockchain doesn't come capitalised, and is displayed as is in decredition as well

  2. why shouldn't the vote button be visible for finished votes?, that's the mockup style, visible but grayed out

  3. the mockup wasn't done with proper research which is why the wallet dropdown is missing from it

  4. I used the existing search bar as used on the proposals page, designing a new search bar is outside the scope of this work, if someone designs it, i'd gladly update the proposals and consensus pages with it, moreover, the search bar would be commented out as we aren't releasing with the search functionality

@dreacot dreacot force-pushed the consensus_ui branch 2 times, most recently from ffc22cf to 04ef2d9 Compare February 23, 2022 18:49
@Sirmorrison Sirmorrison force-pushed the consensus_ui branch 3 times, most recently from 56299ae to caf49ae Compare February 26, 2022 22:28
@dreacot dreacot force-pushed the consensus_ui branch 2 times, most recently from 232bb01 to 2da1908 Compare February 28, 2022 13:53
Copy link
Contributor

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass. General feedback from testing.

  • Do you really need to have live tickets to be able to set voting preferences? Remember that locally saved preferences are applied to new tickets, so I suppose it is fine to let users save preferences locally only, if there's no ticket purchased yet.
  • Governance page -> Proposals tab shows one prop in discussion. Decrediton has none.
  • Governance page -> Consensus tab shows 4 in progress agendas, Decrediton has none in progress. Also, the link to the voting dashboard for testnet should be https://voting.decred.org/testnet.

Lastly, and this may be something for after this PR is merged. The green tick icon for finished agendas is meant to show that the agenda voting passed. Decrediton uses dcrdata API to get this info.

Copy link
Contributor

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't looked too deep, but here's for now.

@dreacot
Copy link
Collaborator Author

dreacot commented Mar 2, 2022

"Governance page -> Proposals tab shows one prop in discussion. Decrediton has none.", can't replicate this, there are no proposals in discussion on godcr

@dreacot
Copy link
Collaborator Author

dreacot commented Mar 2, 2022

"Governance page -> Consensus tab shows 4 in progress agendas,", looking into this

@itswisdomagain
Copy link
Contributor

"Governance page -> Proposals tab shows one prop in discussion. Decrediton has none.", can't replicate this, there are no proposals in discussion on godcr

Screenshot 2022-03-04 at 14 11 44

Copy link
Contributor

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have left review comments but did some tinkering while testing and want to share the thoughts in this commit instead: itswisdomagain@4d1dfeb.

That should resolve the slowness issue @Sirmorrison experienced, must have been due to the network call being made on the UI thread.

Also bump the dcrlibwallet mod version to master once the related dcrlibwallet PR is merged.

@Sirmorrison
Copy link
Contributor

LGTM @itswisdomagain kindly review before we merge.

itswisdomagain
itswisdomagain previously approved these changes Mar 17, 2022
Copy link
Contributor

@itswisdomagain itswisdomagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the status of one of the agendas to upcoming in order to test how updating the voting preference works, noticed this slight issue (may not even be an issue).

When my wallet launched, it showed I had 2 immature tickets, although they had actually voted but my wallet isn't synced yet, so it doesn't know. When I tried to update voting preferences for the agenda I modified to upcoming, it gave an error about ticket already voted. The issue resolved itself when the wallet finished syncing.

I'm currently unable to buy another ticket to test with, to ensure the vsp associated with the ticket gets the correct voting preference set. But this should be good to merge after the go mod tidy stuff below. There'd be more testing to be done after this hits master, such as ensuring that tickets purchased before and after setting the vote preference gets the correct preference set with the vsp.

@Sirmorrison Sirmorrison merged commit bc9a209 into planetdecred:master Mar 18, 2022
song50119 pushed a commit to song50119/godcr that referenced this pull request Apr 24, 2022
* add tab to governance page to switch between proposal and consensus pages
* implement consensus page

* add consensus listeners
- implement vote for consensus
- cleanup code

* remove notification listeners implementations

* remove syncing section

* reload page after voting

* add dcrlibwallet PR requirement

* fix bug where agenda page wasn't reloaded after voting

* add ticket dropdown

* fix bug where ticket list wasn't gotten per wallet, but gotten for all wallets

* fix error where pubkey was 0 length
- handle getting agenda status from dcrlibwallet

* fix bug where the vote modal voting options wasn't 
- updating based on the selected wallet

* remove validation check for if a ticket is selected while trying to vote on agendas

* use proper background color for agenda status

* update UI for voting modal

* adjust governance page tab UI

* update dcrlibwallet implementation

* move vsp selector to components file
- delete vsp.go file
- cleanup code

* code cleanup

* simplified code structure
- remove unwanted comments
- cleanup code

* add hover effect to icon on consensus page

* fix vote button wrapping

* remove redundant boolean call

* change H6 to Label

* add shadow to agenda items

* add open in browser section

* Rearrange widget position, label font size and code clean up

* implement shadow on clickable_list widget
- remove redundant lines of codes
- fix excess padding and general code clean up

* move consensus and proposal handle properties to individual pages.
- clean up and optimize code

* some modifications were made to dcrlibwallet on how some consensus 
-methods were called, the necessary changes were implemented in this commit;
- mainly changing the consensus methods from multiwallet methods to wallet methods

* show modal when the info icons on the governance page is clicked
 - make the voting dashboard redirect to the correct URL
 - fix crash that occurred when navigating from the governance page

* update dcrlibwallet dep

* update dcrlibwallet dep

* add testnet host for the voting dashboard

* remove vsp selector from the agenda vote modal
update  with dcrlibwallet

* rename AgendaList to AgendaItemWidget
- use dcrlibwallet agenda status constants

* move WalletLiveTickets() method to dcrlibwallet
- document StakeToTransactionItems()
- update dcrlibwallet dep
- change vote text on agenda button"

* fix update preference button width

* fix bug where voting options were being re-arranged
cleanup code

* update agenda status call

* don't store cl.shadow property

* give variables in agenda modal proper names
 - change "Voting wallet" to selected "wallet"
 - use an array instead of a map for the vote choices

* use call back to reload agenda list after updating the voting preference

* move stakeToTransactionItems back to staking utils page

* fix delay while opening consensus tab
* bump dcrlibwallet dep

* allow users vote for upcoming agendas

Co-authored-by: sirmorrison <edonomorrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refine Agenda UI to match Figma mock-up Add concensus voting capability

4 participants