telosnetwork / open-block-explorer

The Open Block Explorer (OBE) is the first open source block explorer that is designed to support all AntelopeIO-based blockchains.
https://explorer.telos.net
Apache License 2.0
27 stars 24 forks source link

Paginate by action #861

Closed pmjanus closed 4 months ago

pmjanus commented 4 months ago

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:

netlify[bot] commented 4 months ago

Deploy Preview for obe-testnet ready!

Name Link
Latest commit de400611869431c484915c173e5cdaf4f271bd63
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.

netlify[bot] commented 4 months ago

Deploy Preview for open-block-explorer ready!

Name Link
Latest commit de400611869431c484915c173e5cdaf4f271bd63
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.

Viterbo commented 4 months ago

@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

cloudflare-workers-and-pages[bot] commented 4 months ago

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