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

Paginate by action #861

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Paginate by action #861

merged 2 commits into from
Jul 11, 2024

Conversation

pmjanus
Copy link
Contributor

@pmjanus pmjanus commented Jun 22, 2024

Fixes #860

Description

Paginates transaction table by actions, since each row is an action that references a transaction, we will show 10 or whatever number selected of rows per page instead of all actions for a single transaction.

Test scenarios

Verify that block pages are paginating accurately, try blocks around :1289 and newer blocks as well as any blocks you might have knowledge of being special in any way.
Verify filters are working at least as well as in the production release, create a separate issue for any issues found here that are also present in release.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage
  • I have updated relevant documentation and/or opened a separate issue to cover the updates (Issue URL: )

Copy link

netlify bot commented Jun 22, 2024

Deploy Preview for obe-testnet ready!

Name Link
🔨 Latest commit de40061
🔍 Latest deploy log https://app.netlify.com/sites/obe-testnet/deploys/668de02c99f90a0008461b76
😎 Deploy Preview https://deploy-preview-861--obe-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 22, 2024

Deploy Preview for open-block-explorer ready!

Name Link
🔨 Latest commit de40061
🔍 Latest deploy log https://app.netlify.com/sites/open-block-explorer/deploys/668de02ca9ecd10008f33a74
😎 Deploy Preview https://deploy-preview-861--open-block-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pmjanus pmjanus requested a review from Viterbo July 9, 2024 12:50
@pmjanus pmjanus changed the title paginate by action Paginate by action Jul 9, 2024
@Viterbo
Copy link
Collaborator

Viterbo commented Jul 10, 2024

@pmjanus, your solution works flawlessly!!! Good Job !!!

However, I took the opportunity to make some extra improvements.
1 - Now it shows the block number and a loading spinner while the block is still being fetched.
image

2 - I encountered that many times it fails to fetch the entire block silently giving no feedback to the user so I decided to make a function to retry the fetch transparently for the user with a maximum of 3 tries. Here's a capture of a two-tries case fetching the block successfully on the last try. (See the console)
image

3 - I added an error text to show feedback when the block couldn't be fetched even after three times.
image

Copy link

cloudflare-workers-and-pages bot commented Jul 10, 2024

Deploying open-block-explorer with  Cloudflare Pages  Cloudflare Pages

Latest commit: de40061
Status: ✅  Deploy successful!
Preview URL: https://04087cf9.open-block-explorer.pages.dev
Branch Preview URL: https://860-paginate-transactions-by.open-block-explorer.pages.dev

View logs

Viterbo
Viterbo previously approved these changes Jul 10, 2024
Copy link
Collaborator

@Viterbo Viterbo left a comment

Choose a reason for hiding this comment

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

I did not touch your code changes because they work perfectly, so Good Job!
However, I added some improvements. See the comments above.

@Viterbo Viterbo marked this pull request as ready for review July 10, 2024 01:16
@pmjanus pmjanus changed the base branch from master to develop July 11, 2024 12:43
@pmjanus pmjanus dismissed Viterbo’s stale review July 11, 2024 12:43

The base branch was changed.

@pmjanus pmjanus merged commit 7a02e9b into develop Jul 11, 2024
10 checks passed
@pmjanus pmjanus deleted the 860-paginate-transactions-by-actions branch July 11, 2024 12:44
@pmjanus pmjanus restored the 860-paginate-transactions-by-actions branch August 1, 2024 14:42
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.

BUG- Pagination ignored on block page transactions.
3 participants