-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
(Feature) New pagination view #1928
Conversation
Pull Request Test Coverage Report for Build d3280b17-3fe5-4fcf-b9d2-c87162fd1601
💛 - Coveralls |
Also, if there are no blocks should we show navigation buttons? |
</svg> | ||
</a> | ||
</li> | ||
<li class="page-item"><a class="page-link no-hover" href><%= gettext "Page" %> <%= assigns[:cur_page_number] || "" %> <%= gettext "of" %> <%= assigns[:total_pages_number] || "undefined" %></a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should show only current page if there is no total_pages_number
instead of of undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I think everything else will be addressed in #1930
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pagination view looks good to me. Meanwhile, I guess, there are some changes should be done before merging this:
-
The old pagination messages like this
Showing 10 Validated Transactions
orShowing 50 addresses of 0 total addresses with a balance (page 1)
should be removed as it is implemented in the new pagination view. -
Could we display pagination buttons in the mobile view aligned to the center of the screen (see the screenshot below)?
-
As you correctly mentioned there are some new buttons and missing logic for new pagination. And I created a separate issue to fill those missing parts of the logic Implement logic for new advanced pagination functionality #1930. In the meantime, the logic for left/right pagination buttons exists in the current pagination, but it wasn't ported to the new pagination buttons. Could you return it? Because for now, pagination is rather a mockup.
In addition, we have pagination buttons for transactions list on address details page like this: https://blockscout.com/poa/core/address/0xc76815f3815614f10b78dfe94185e86d9f5250c5/transactions. We should also use new pagination here. |
plus, we should have the same pagination for transactions in the block details page. For example, here https://blockscout.com/eth/mainnet/blocks/7751624/transactions |
I didn't get that part, could you please clarify? Working on fixing everything else. |
Sure, I mean, in the current pagination (that we would like to update) we already have implemented left|right buttons and logic for them: And that logic has been removed from the new left|right buttons (that are from this PR). Could we return that logic to those buttons before merging? |
Oh, sure. I thought that I've left that working, but it seems it's not. |
* master: Update CHANGELOG.md Update sokol_logo.svg Update kovan_logo.svg Update _sokol_variables.scss Update _kovan_variables.scss # Conflicts: # CHANGELOG.md
in addition, the same pagination should be on the address details page for
|
* master: Update CHANGELOG.md Update _modal.scss Update _button.scss # Conflicts: # CHANGELOG.md
Removed all text.
Done.
I've only found the combination I've replaced the pagination in every other section too, but in those cases there was only an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we display pagination buttons in the mobile view aligned to the center of the screen (see the screenshot below)?
Done.
Could we change the paddings for <> buttons to nail them to the left and right sides as shown on the screenshot from my previous review? This request is only for the mobile view.
I've replaced the pagination in every other section too, but in those cases there was only an Older or Next button. In that case, it's going to be replaced by the > button until its implementation is updated.
I see now that the pagination buttons work for Accounts page, but could we also return the logic to the >
button, which is instead of Older or Next button?
* master: feat: add on demand fetching and stale attr to rpc Add CHANGELOG entry check presence of overlap[i]
Sure, done. It should look like this:
Not sure if I follow. For the "Accounts" section there were only For the rest of the pages I only found one These buttons are disabled when there's nothing to paginate ( So, the functionality should be there (unless I screwed something up, which could be the case). Maybe I inadvertently removed some other functionality? |
I am trying to open blocks page, transactions page or other pages with pagination from your PR. On those pages, we have currently in the prod |
Got it now, thank you. It should work as before now, warts and all. Notice that the button will be disabled once there are no more pages, and there's no current way to go back. |
@gabitoesmiapodo yes, seems, pagination buttons work now. The last thing I forgot to mention in the previous review is: we should move the top pagination below the chart because the cart is not responsive on changing pages. It shows the whole data. |
Done. |
Closes #1893
Motivation
Pagination styles need to be updated according to this design:
This is obviously missing some logic which the design shows but it's absent from the current implementation:
First
andLast
buttons.Page 1 of X
needs to calculate the value forX
.Show XXXX Records
, amount of items to show should be implemented too (this can be hidden using a parameter).Sections including the pagination component:
Screenshots
(Colors will obviously be different depending on your current theme)
Changelog
Enhancements
Checklist for your PR
CHANGELOG.md
with this PR