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

Adjust the number of transaction displays on the page #486

Closed
rabbitz opened this issue Nov 15, 2023 · 6 comments
Closed

Adjust the number of transaction displays on the page #486

rabbitz opened this issue Nov 15, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request UserStory a brief, plain-language explanation of a feature or functionality

Comments

@rabbitz
Copy link

rabbitz commented Nov 15, 2023

Problem:

#478
nervosnetwork/ckb-explorer#1498

After optimization, it was found that the number of transactions for some addresses was still too large, resulting in slow query counting and paging, so I wanted to optimize the query speed by limiting the number of queries.

Possible Solution:

  1. Need to determine the maximum number of query transactions
  2. Determine how to add prompts to the page, such as refactor: address transaction query nervosnetwork/ckb-explorer#1498 (comment)

image

@Danie0918 @Sven-TBD

Related issues

Frontend: #484

@Kirl70
Copy link

Kirl70 commented Nov 20, 2023

We can provide users with a prompt next to the pagination component, which only appears on address pages that exceed the maximum transaction count:
https://www.figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=5679%3A26337&mode=design&t=CxmNtkb7XiJUOSgW-1
image

@Keith-CY
Copy link
Member

We can provide users with a prompt next to the pagination component, which only appears on address pages that exceed the maximum transaction count: figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=5679%3A26337&mode=design&t=CxmNtkb7XiJUOSgW-1 image

cc @Danie0918 @Sven-TBD

@Sven-TBD
Copy link
Contributor

I had a conversation with @rabbitz , where I asked some questions. Assuming a limit of 500K transactions and a certain address has 501K transactions:

Q1: If I switch to the last page, does it show the last page of the 500K transactions, not the last page of all transactions?
A1: Yes, the overall query is limited to 500K transactions, so it will show the last page of these 500K.

Q2: If so, will the front end continue to query the next 500K transactions?
A2: No. The total number (501K) will be displayed on the page, but only 500K will be shown.

Q3: If I use time sorting, does it also display the time sorting of 500K transactions?
A3: When using time sorting, it sorts the first 500K transactions after the sorting.

Q4: If our limit is 30K and an address has 31K transactions , will the browser be aware of this situation?
A4: Yes, it's easy to know that.


cc @Keith-CY @Kirl70

So I think it's also important to notify users especially when they're going to use the function of Sort by time and go to the Last page.


So my suggestion is that :

  1. We either add a separate notification for features like Sort on this UI

  2. Or we provide a dismissible alert for the detail pages of addresses with a large number of transactions.

image

@Keith-CY
Copy link
Member

Keith-CY commented Nov 21, 2023

I had a conversation with @rabbitz , where I asked some questions. Assuming a limit of 500K transactions and a certain address has 501K transactions:

Q1: If I switch to the last page, does it show the last page of the 500K transactions, not the last page of all transactions? A1: Yes, the overall query is limited to 500K transactions, so it will show the last page of these 500K.

Q2: If so, will the front end continue to query the next 500K transactions? A2: No. The total number (501K) will be displayed on the page, but only 500K will be shown.

Q3: If I use time sorting, does it also display the time sorting of 500K transactions? A3: When using time sorting, it sorts the first 500K transactions after the sorting.

Q4: If our limit is 30K and an address has 31K transactions , will the browser be aware of this situation? A4: Yes, it's easy to know that.

cc @Keith-CY @Kirl70

So I think it's also important to notify users especially when they're going to use the function of Sort by time and go to the Last page.

So my suggestion is that :

  1. We either add a separate notification for features like Sort on this UI
  2. Or we provide a dismissible alert for the detail pages of addresses with a large number of transactions.
image

This prompt 该地址交易数量超过页面展示最大数, 排序, 分页, 筛选, 将以 30k(页面展示最大数)进行 should be updated

  1. The limit is not of counts on (per) page. It's of a single query;
  2. Only pagination (of sorting, filtering) is affected by the limit, the algorithm of sorting/filtering is not impacted. How about 500,000 entries that best meet the condition are listed.
  3. The prompt can be displayed only when total amount > limit, which means an exact count will be displayed without a prompt when total amount <= limit

@Sven-TBD
Copy link
Contributor

I had a conversation with @rabbitz , where I asked some questions. Assuming a limit of 500K transactions and a certain address has 501K transactions:
Q1: If I switch to the last page, does it show the last page of the 500K transactions, not the last page of all transactions? A1: Yes, the overall query is limited to 500K transactions, so it will show the last page of these 500K.
Q2: If so, will the front end continue to query the next 500K transactions? A2: No. The total number (501K) will be displayed on the page, but only 500K will be shown.
Q3: If I use time sorting, does it also display the time sorting of 500K transactions? A3: When using time sorting, it sorts the first 500K transactions after the sorting.
Q4: If our limit is 30K and an address has 31K transactions , will the browser be aware of this situation? A4: Yes, it's easy to know that.
cc @Keith-CY @Kirl70
So I think it's also important to notify users especially when they're going to use the function of Sort by time and go to the Last page.
So my suggestion is that :

  1. We either add a separate notification for features like Sort on this UI
  2. Or we provide a dismissible alert for the detail pages of addresses with a large number of transactions.
image

This prompt 该地址交易数量超过页面展示最大数, 排序, 分页, 筛选, 将以 30k(页面展示最大数)进行 should be updated

  1. The limit is not of counts on (per) page. It's of a single query;
  2. Only pagination (of sorting, filtering) is affected by the limit, the algorithm of sorting/filtering is not impacted. How about 500,000 entries that best meet the condition are listed.
  3. The prompt can be displayed only when total amount > limit, which means an exact count will be displayed without a prompt when total amount <= limit

So I think it should work like this:

  • When the number of transaction of current address is below 500,000, nothing happens;
  • However , when the number is over 500,000, it says "The number of transactions for this address exceeds the maximum display limit for a single query result. Sorting and filtering will be conducted with a limit of 500k (the maximum number for page display)", and "该地址交易数量超过单次查询展示结果最大数, 排序, 筛选, 将以 500k(页面展示最大数)进行" in Chinese.

@Kirl70
Copy link

Kirl70 commented Nov 29, 2023

Design Draft:
https://www.figma.com/file/6XNoimRDbFTTNm016rbIdU/Magickbase?type=design&node-id=5679%3A26337&mode=design&t=xXRH2MROpEpbbscz-1
image

@Sven-TBD Sven-TBD added the UserStory a brief, plain-language explanation of a feature or functionality label Nov 29, 2023
@zmcNotafraid zmcNotafraid removed their assignment Dec 1, 2023
@Keith-CY Keith-CY closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UserStory a brief, plain-language explanation of a feature or functionality
Projects
Archived in project
Development

No branches or pull requests

5 participants