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

Fix(171): Proposal list subscribe #172

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

RyRy79261
Copy link
Contributor

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

@RyRy79261 RyRy79261 requested a review from a team June 6, 2024 15:29
@RyRy79261 RyRy79261 self-assigned this Jun 6, 2024
@RyRy79261 RyRy79261 requested review from nvtaveras and denviljclarke and removed request for a team June 6, 2024 15:29
Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
governance-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2024 3:14pm

@nvtaveras
Copy link
Contributor

nvtaveras commented Jun 6, 2024

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

Copy link
Contributor

@chapati23 chapati23 left a 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

I'm getting this in the console
image

Copy link
Contributor

@chapati23 chapati23 left a comment

Choose a reason for hiding this comment

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

aight, works now!

@RyRy79261
Copy link
Contributor Author

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

@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?

Copy link
Contributor

@chapati23 chapati23 left a 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 👍

@bayological
Copy link
Member

bayological commented Jun 10, 2024

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

@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?

@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.

Copy link
Member

@bayological bayological left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bayological bayological merged commit 2aedd65 into develop Jun 10, 2024
3 checks passed
@bayological bayological deleted the fix/proposal-list-subscribe-171 branch June 10, 2024 09:16
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.

4 participants