Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Feature Request: pagination instead of lazy load scroll #796

Closed
JesusTheHun opened this issue Aug 18, 2018 · 6 comments
Closed

Feature Request: pagination instead of lazy load scroll #796

JesusTheHun opened this issue Aug 18, 2018 · 6 comments
Assignees
Milestone

Comments

@JesusTheHun
Copy link

JesusTheHun commented Aug 18, 2018

On a wallet page, the list of the most recent transactions is displayed. Going at the bottom, you can hit the "more" button, to add previous transactions to the list. This system is nice for short lists, when you don't necessarily need to browse the list. However, for a blockchain transaction list, it is unappropriate, for several reasons :

  • I cannot go to the last page, to see the first transactions
  • I cannot share to a friend a group of transaction by telling the page number
  • I cannot bookmark a specific range of transactions
  • If I load more and more and more transactions, it becomes a memory issue on smallest mobile device
  • Still on mobile device I have to do an endless finger scroll to go back to the top after loading more transactions

Please replace this system with an old fashion pagination.

@MichalTuleja MichalTuleja added this to the Version 2.1.5 milestone Aug 31, 2018
@MichalTuleja MichalTuleja changed the title Feature Request : pagination instead of lazy load scroll Feature Request: pagination instead of lazy load scroll Sep 6, 2018
@MichalTuleja MichalTuleja removed this from the Version 2.1.5 milestone Sep 7, 2018
@MichalTuleja
Copy link
Contributor

The current implementation requires accessing more data by clicking more multiple time.
The planned pagination improvement concerns the following views:

@lsilvs
Copy link
Contributor

lsilvs commented Sep 12, 2018

Lisk Core API does not return the total amount of items for /blocks and /accounts endpoints as it does for /transactions endpoint. The lack of total amount of items make it impracticable to implement a proper pagination with the number of pages and link to the last page for example.
A work around for blocks would be using the current block height as the total amount of blocks.
I can't think of a work around for accounts though.

@lsilvs lsilvs closed this as completed Sep 12, 2018
@lsilvs lsilvs reopened this Sep 12, 2018
@lsilvs
Copy link
Contributor

lsilvs commented Sep 12, 2018

Closed by mistake...

@JesusTheHun
Copy link
Author

For blocks, indeed you can use this method. It's simple and efficient.

For the top accounts, the total number will be the total number of Lisk addresses.

I don't know how it's done internally since the public API does not provide such ranking system, but seeing the http request I would say a) you hit the blockchain database directly or b) it's a fetch of a cached sorted list. If it's cached it's length-fixed. Eitheir way you can count the number of items.

But ironically, this kind of page is ok to have a lazy load, since the position of each account is likely to move. It's almost always better to have a pagination, but for this very specific page, it's ok.

@MichalTuleja
Copy link
Contributor

@lsilvs I agree, block height should be enough.
Assuming that the number of accounts is difficult to get without significant changes to the backend is not worth doing that now. I would suggest leaving Top Accounts as it is and change it once the new API is ready.

@MichalTuleja MichalTuleja added this to the Version 2.2.0 milestone Nov 6, 2018
@MichalTuleja MichalTuleja self-assigned this Dec 7, 2018
@MichalTuleja
Copy link
Contributor

Further development will be continued in the #850 #851.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants