Skip to content
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

[redesign][governance] proposal details view. #3345

Merged
merged 21 commits into from Apr 6, 2021

Conversation

amass01
Copy link
Member

@amass01 amass01 commented Mar 29, 2021

Main changes:

  • Split ProposalsDetials.module.css helpers styling into components own css modules.
  • Add vote end event & blocks left number.
  • Define proposal status & vote status as constants.
  • Add Join component to display subtitle separated fields.
  • Add global helper css classes.
  • Ditch OverviewField component.
  • Replace EligibleTickets component with new VoteSection.
  • Delete TxHsitory/EligibleRow.jsx and it's styling.
  • Move Vote Pref. component to VoteSection according to new specs.
  • Improve viewedProposal state obj to avoid duplicated fields.
  • Declarative Proposals Details Page helpers.
  • Replace shared classes with new components (ie VoteButton & NoTicketsMsg)
  • Finish Vote Preference section & introduce VotedCheckmark.
  • Rename ChooseOptions component to VotePreference.
  • Rename ChooseVoteOption to VotePreferenceWrapper.
  • Move CastVoteModalButton to a separate dir with css module.
  • Tweak proposal body & politeia proposal button/link.
  • Re-arrange proposal card.
  • Tweak subtitle.
  • Add proposal card back button.
  • Add title tooltip.

Note: before reviewing the code I'd suggest comparing components/viewed/ProposalDetailsPage dir and it's structure on master and on this branch.

Screenshots:

Voting proposal & user voted:
image

Abandoned:
Screenshot 2021-04-05 at 3 11 40

Rejected:
Screenshot 2021-04-05 at 3 11 53

Closes #3288.

@amass01 amass01 force-pushed the proposaldetail branch 8 times, most recently from e70d902 to c464813 Compare April 2, 2021 23:56
@amass01 amass01 changed the title [WIP][redesign] Governance: proposal details view. [redesign][governance] proposal details view. Apr 5, 2021
@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

Tested and found two issues:

  1. Approved proposals showing currently rejected status tag.
  2. Minor alignment issue in vote section:
    image

@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

Note: This was implemented & tested against pre-tlog poltieia code, I'll address the two issues listed above
and then will test it against latest politeia commit and see how it plays.

@@ -32,18 +32,19 @@ const ProposalDetailsPage = () => {
</div>
);
case "success":
// XXX this should move to redux logic, we should parse proposal body
Copy link
Member Author

Choose a reason for hiding this comment

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

will followup with a PR for this XXX

@@ -1,5 +1,7 @@
// XXX change all files to small letters!
Copy link
Member Author

Choose a reason for hiding this comment

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

will followup with this change.

@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

Tested and found two issues:

1. Approved proposals showing currently rejected status tag.

2. Minor alignment issue in vote section:
   ![image](https://user-images.githubusercontent.com/10324528/113525647-d2ecef00-95be-11eb-9fe5-9106c4dad5fa.png)
  1. Looks like BE returns in votesummary approved: false for the proposal in the screenshot, others have the right
    approved tag with latest commit:
    Screenshot 2021-04-05 at 4 10 40

  2. Improved.

@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

Need few last touches in smaller screens.

@alexlyp
Copy link
Member

alexlyp commented Apr 5, 2021

Needs a rebase

- Deletes TxHsitory/EliginleRow.jsx and it's styling.
- Moves Vote Pref. component to VoteSection according to new specs.
- Improves viewedProposal state obj to avoid duplicated fields.
- Introduces ChooseVoteOption.module.css
…odules .

+ Declarative Proposals Details Page helpers.
+ ChooseOptions.module.css
+ VoteButton.module.css
+ Replace shared classes with new components ie VoteButton & NoTicketsMsg
define proposal status & vote status as constants.
- add global helper css classes
- ditch OverviewField
- re-arrange proposal card
@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

@alexlyp rebased & improved smaller screens as well.

@alexlyp
Copy link
Member

alexlyp commented Apr 5, 2021

Getting an error when I go to the top result in the Finished category (Underwater Citadel):
hooks.js:16 Uncaught TypeError: Cannot destructure property 'viewedProposalDetails' of 'undefined' as it is undefined.

This wallet has no live tickets currently if that helps reproduce.

@amass01
Copy link
Member Author

amass01 commented Apr 5, 2021

@alexlyp updated

@alexlyp
Copy link
Member

alexlyp commented Apr 6, 2021

Seeing some text in dark theme show as white on white. Voting power and the short hash below the status on the proposal details page

@alexlyp alexlyp merged commit 23da0b8 into decred:master Apr 6, 2021
@amass01 amass01 deleted the proposaldetail branch April 6, 2021 22:03
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.

Governance Proposals Cards update
2 participants