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 Staking DApp first loading #3505

Merged
merged 1 commit into from
Dec 3, 2020
Merged

Conversation

varasev
Copy link
Contributor

@varasev varasev commented Dec 3, 2020

Motivation

Currently, when loading the Staking DApp it makes an async call (request) to load items several times because of duplicated firstPageLoad calls in apps/block_scout_web/assets/js/lib/async_listing_load.js. This PR adds an ability to not call the firstPageLoad when we don't need it. It can be turned on by a separate HTML attribute data-no-first-loading in a div with data-async-load attr for any module. This PR turns this on only for the staking module.

Without this PR we observe the pool list disappearing when using any tab within the Staking DApp UI because of the excess calls. They visually disappear until the next block arrives.

I think this also relates to other modules but propose to optimize it in separate PRs by removing excess requests when using the async_listing_load.js.

Checklist for your Pull Request (PR)

@varasev varasev requested a review from vbaranov December 3, 2020 13:56
@coveralls
Copy link

coveralls commented Dec 3, 2020

Pull Request Test Coverage Report for Build 862f76fc3f3608be946e4a2c79298e429779e61d-PR-3505

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.09%) to 67.023%

Totals Coverage Status
Change from base Build 2b305fdd7decd0ad621aa1cd31aabb55451c0418: -1.09%
Covered Lines: 2071
Relevant Lines: 3090

💛 - Coveralls

@vbaranov vbaranov merged commit 0f6fb85 into master Dec 3, 2020
@vbaranov vbaranov deleted the va-staking-dapp-fix-first-loading branch December 3, 2020 15:14
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.

None yet

3 participants