mento-protocol / governance-ui

An open source interface for the Mento protocol governance
https://governance.mento.org
0 stars 0 forks source link

Fix(171): Proposal list subscribe #172

Closed RyRy79261 closed 1 month ago

RyRy79261 commented 1 month ago

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

vercel[bot] commented 1 month ago

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 commented 1 month ago

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

RyRy79261 commented 1 month ago

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?

bayological commented 1 month ago

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.