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
Poltieia proposals page #331
Conversation
Kindly add a more detailed description. There are commits that are quite large like hoverable, tooltip, grid. These should be included in your description, what they do and why they were added. |
9e98cc2
to
fb28e63
Compare
type proposalNotificationListeners struct { | ||
page *proposalsPage | ||
} | ||
|
||
func (p proposalNotificationListeners) OnNewProposal(proposal *dcrlibwallet.Proposal) { | ||
p.page.addDiscoveredProposal(*proposal) | ||
} | ||
|
||
func (p proposalNotificationListeners) OnProposalVoteStarted(proposal *dcrlibwallet.Proposal) { | ||
p.page.updateProposal(*proposal) | ||
} | ||
|
||
func (p proposalNotificationListeners) OnProposalVoteFinished(proposal *dcrlibwallet.Proposal) { | ||
p.page.updateProposal(*proposal) | ||
} | ||
|
||
func (p proposalNotificationListeners) OnProposalsSynced() { | ||
p.page.isSynced = true | ||
} |
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.
would this work if it were in the wallet package like other listeners?
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.
This is what i intend to do in the next PR reason i requested we have this merged.
I have already started but it started getting complicated. Once this is merged it will be easier to migrate.
proposalCategoryTitles = []string{"In discussion", "Voting", "Approved", "Rejected", "Abandoned"} | ||
proposalCategories = []int32{ | ||
dcrlibwallet.ProposalCategoryPre, | ||
dcrlibwallet.ProposalCategoryActive, | ||
dcrlibwallet.ProposalCategoryApproved, | ||
dcrlibwallet.ProposalCategoryRejected, | ||
dcrlibwallet.ProposalCategoryAbandoned, | ||
} |
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.
A proposal category type can be created here. And instead of two slices, a single slice of the type containing the title and id of the proposal category would be used.
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.
Can we move this review to the other PR as well?
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.
Can we move this review to the other PR as well?
* add hoverable and tooltip widgets
* fix bug with page clickables
* fix bug with hoverable widget when hovered fix irregular scroll container height issue
* make proposal tab scrollable * update proposal tab to mockup design
* remove date and use proposal state on for discussion tab * modify tooltip widget to use inset layout * update label colors to mockup colors * update proposal section dimension to mockup design
* add extraText field to subpagelayout * align proposal detail page header to mockup design
add redirect to github and politeia functionality add download proposal and comments options clean up code
* fix info popup positioning bug * update info pupup dimentions to mockup ui * remove scrollcontainer and use list on proposal page * fix lint error * fix page refresh issue * reset proposal details description layout to the top when back btn is clicked
* move gotoURL() to util.go * fix lint error and rebase pr
* add hoverable and tooltip widgets * Add proposal details page * Add proposal active and inactive icons to side navigation * make proposal tab scrollable * Add info icon and tooltip to in discussion view * modify tooltip widget to use inset layout * use subpagelayout for proposals detail page * add extraText field to subpagelayout * add in discussion details state layout Co-authored-by: morrison <edonomorrison@gmail.com>
This adds a page that displays poiliteia proposals. Fixes #236 .
It adds a proposals list page. Proposals are grouped by categories, and these categories are displayed as tabs.
It also adds a proposal description page that is navigated to when a proposal item on the list is displayed.
It also adds and makes use of 4 widgets: