-
Notifications
You must be signed in to change notification settings - Fork 295
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
[DDW-554] Show "Loading Stake Pools" anytime the pools are loading #2424
[DDW-554] Show "Loading Stake Pools" anytime the pools are loading #2424
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.
@daniloprates I have a feeling we should fix the distance between the label and the spinner as it looks different on English and Japanese.
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.
Functionality working as expected. Great work @daniloprates 👍 . Tested on 16895
@daniloprates Overall, this works fine, but I noticed the spinner goes away after a while, even when the list is still loading (when fetching the data directly). Check the screenshots: 1, 2, 3, 4. |
@gabriela-ponce we don't have an exact way of checking if the pools are still loading. We just keep checking if the number is increasing. If the number increases after our checking, there's not much do be done 🤷🏻♂️ |
@gabriela-ponce @daniloprates I believe we should adjust the checker interval. Especially for the "fetch data directly" case as indeed that one is quite slow when fetching the data... |
…anytime-the-pools-are-loading
…anytime-the-pools-are-loading
@gabriela-ponce @miorsufianiohk please re-test this one. I have added a fix which should resolve the issue you were seeing with the loading spinner disappearing while the stake pools are still loading. |
…anytime-the-pools-are-loading
@nikolaglumac I tested this on testnet which had 253 stake pools in total. During testing, I noticed that when the stake pools number was showing 253, the 'loading stake pools' animation was still going on, it only disappeared after more than 2 minutes. Is this acceptable? My expectation was, when the number was showing 253, that's the end of loading (finished, no animation should be displayed). |
@miorsufianiohk that is indeed correct and expected behavior! |
@@ -239,6 +241,8 @@ export default class StakingStore extends Store { | |||
this.numberOfStakePoolsFetched > 0 | |||
) { | |||
this.cyclesWithoutIncreasingStakePools++; | |||
} else { |
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.
@daniloprates this is just FYI - no response required.
I believe this was a flaw in your original implementation.
We need to make sure the tracker is switched off only in case we don't see an increase in stake pools count for a six consecutive checks. Without this change we don't count consecutive ones at all - we count all of them.
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.
@daniloprates @nikolaglumac The previous issue is no longer reproducing, nice job 👍
This PR enables the "Loading Stake Pools" state anytime the pools are loading.
Todos
Increase the checker interval for "fetching data directly" case (or maybe for all the cases)Screenshots
Testing Checklist
Test Cases
Scenario 1 - Validate Loading on Stake Pools screen after clean installation
Scenario 2 - Validate Loading on Stake Pools screen after switching servers
Scenario 3 - Validate Loading on Stake Pools screen after switching servers and restart
Review Checklist
Basics
feature
/bug
/chore
,release-x.x.x
)yarn test
)yarn dev
)yarn package
/ CI builds)yarn flow:test
)yarn lint
)yarn prettier:check
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review
done
column on the YouTrack board