-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix(171): Proposal list subscribe #172
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Tested this and it looked fine for the list of proposals, however the state above that shows the # of proposal, voters, total veMento was a bit clunky. Don't have exact repro steps but switching back and forth a few times the # of voters was not updated properly after switching from alfajores to mainnet and it was staying at 7 |
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.
I can't even navigate to a proposal details page on this PR, i.e. try https://governance-pn6h80a5w-mentolabs.vercel.app/proposals/76852543598626010309184355681141482743859825585547539168614458156040950326608
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.
aight, works now!
@nvtaveras I'm not following, what was switching and what page were you on where you expected proposal data not to change when changing the network? |
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.
tested that voting does update the proposal list without full reload now 👍
@RyRy79261 It's definitely a weird one but I'm not sure if it's related to the changes in this PR. I was able to reproduce it once and have added an issue with steps here. However this is very low priority so we should address it later. |
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 👍
Description
This PR swaps the suspense hook to use the standard Apollo query hook which allows for auto polling.
Testing
I used a local instance & the development instance to create a proposal on the development instance & watch on the local instance for changes
Notes
This removes suspense logic, this could be resolved by tightly binding to the loading state of the query. However, given that we will be refactoring to React Query/Tanstack for GraphQL in future, allocating time to a soon to be removed package simply for a loading bar to appear seems low priority
Related issues