-
Notifications
You must be signed in to change notification settings - Fork 120
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
[governance] "Finished Vote" tab filters #2854
[governance] "Finished Vote" tab filters #2854
Conversation
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.
The filters buttons work nicely and solve my issue reported in #2786, but there is an expanse of blank space now (red on screenshot). I think this can be reduced by reducing the height of the buttons and the margin above/below them.
This diff adds the possibility to filter finished voting proposals by its approved or rejected status. Also, this fixes an infinite scroller bug caused by long height screens.
lgtm |
5015d8e
to
10080ac
Compare
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, added couple of small suggestions.
@@ -7,6 +7,8 @@ import * as gov from "actions/GovernanceActions"; | |||
import { usePrevious } from "hooks"; | |||
import { setLastPoliteiaAccessTime } from "actions/WalletLoaderActions"; | |||
|
|||
const MAX_PAGE_SIZE = 20; // TODO: Get proposallistpagesize from politeia's request: /v1/policy |
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.
Worth creating an issue
@@ -18,7 +20,7 @@ export function useProposalsTab() { | |||
const [tab, setTab] = useReducer(() => getProposalsTab(location)); | |||
|
|||
useEffect(() => { | |||
dispatch(setLastPoliteiaAccessTime()); | |||
return () => dispatch(setLastPoliteiaAccessTime()); |
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.
👍
@@ -157,7 +156,7 @@ const onLoadMoreProposals = async ( | |||
|
|||
const proposalBatch = inventory.slice(proposalLength, proposalNumber); | |||
try { | |||
await getProposalsAndUpdateVoteStatus(proposalBatch); | |||
return await getProposalsAndUpdateVoteStatus(proposalBatch); |
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 you please ditch the console.log in the catch block ?
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
This diff adds the possibility to filter finished voting proposals by its approved or rejected status.
I think we cannot filter proposals by timestamp, since timestamp filtering is not implemented on politeia, but we can add some filters into the Finished Vote tab, so we could filter props by Approved and Rejected status.
Closes #2786