diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b3d6cdd72..cdab433d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,13 @@ - [#2456](https://github.com/poanetwork/blockscout/pull/2456) - fetch pending transactions for geth ### Fixes +- [#2520](https://github.com/poanetwork/blockscout/pull/2520) - Hide loading message when fetching is failed +- [#2523](https://github.com/poanetwork/blockscout/pull/2523) - Avoid importing internal_transactions of pending transactions +- [#2519](https://github.com/poanetwork/blockscout/pull/2519) - enable `First` page button in pagination - [#2515](https://github.com/poanetwork/blockscout/pull/2515) - do not aggregate NFT token transfers - [#2512](https://github.com/poanetwork/blockscout/pull/2512) - alert link fix - [#2508](https://github.com/poanetwork/blockscout/pull/2508) - logs view columns fix +- [#2506](https://github.com/poanetwork/blockscout/pull/2506) - fix two active tab in the top menu - [#2503](https://github.com/poanetwork/blockscout/pull/2503) - Mitigate autocompletion library influence to page loading performance - [#2502](https://github.com/poanetwork/blockscout/pull/2502) - increase reward task timeout - [#2463](https://github.com/poanetwork/blockscout/pull/2463) - dark theme fixes diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 9b367a8dc8..4f889b7304 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -35,5 +35,5 @@ - [ ] If I added new functionality, I added tests covering it. - [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [ ] I checked whether I should update the docs and did so if necessary - - [ ] If I added/changed/removed ENV var, I should update the list of env vars in https://github.com/poanetwork/blockscout/blob/master/docs/env-variables.md to reflect changes in the table here https://poanetwork.github.io/blockscout/#/env-variables?id=blockscout-env-variables + - [ ] If I added/changed/removed ENV var, I should update the list of env vars in https://github.com/poanetwork/blockscout/blob/master/docs/env-variables.md to reflect changes in the table here https://poanetwork.github.io/blockscout/#/env-variables?id=blockscout-env-variables. I've set `master` in the `Version` column. - [ ] If I add new indices into DB, I checked, that they don't redundant with PGHero or other tools diff --git a/apps/block_scout_web/assets/__tests__/lib/async_listing_load.js b/apps/block_scout_web/assets/__tests__/lib/async_listing_load.js index 6e86d8a6b5..adae2d6033 100644 --- a/apps/block_scout_web/assets/__tests__/lib/async_listing_load.js +++ b/apps/block_scout_web/assets/__tests__/lib/async_listing_load.js @@ -46,14 +46,12 @@ describe('REQUEST_ERROR', () => { describe('FINISH_REQUEST', () => { test('sets loading status to false', () => { const state = Object.assign({}, asyncInitialState, { - loading: true, - loadingFirstPage: true + loading: true }) const action = { type: 'FINISH_REQUEST' } const output = asyncReducer(state, action) expect(output.loading).toEqual(false) - expect(output.loadingFirstPage).toEqual(false) }) }) diff --git a/apps/block_scout_web/assets/js/lib/async_listing_load.js b/apps/block_scout_web/assets/js/lib/async_listing_load.js index 8477a7d728..1c1fec4baa 100644 --- a/apps/block_scout_web/assets/js/lib/async_listing_load.js +++ b/apps/block_scout_web/assets/js/lib/async_listing_load.js @@ -51,8 +51,6 @@ export const asyncInitialState = { requestError: false, /* if response has no items */ emptyResponse: false, - /* if it is loading the first page */ - loadingFirstPage: true, /* link to the next page */ nextPagePath: null, /* link to the previous page */ @@ -80,8 +78,7 @@ export function asyncReducer (state = asyncInitialState, action) { } case 'FINISH_REQUEST': { return Object.assign({}, state, { - loading: false, - loadingFirstPage: false + loading: false }) } case 'ITEMS_FETCHED': { @@ -134,7 +131,7 @@ export const elements = { }, '[data-async-listing] [data-loading-message]': { render ($el, state) { - if (state.loadingFirstPage) return $el.show() + if (state.loading) return $el.show() $el.hide() } @@ -143,7 +140,7 @@ export const elements = { render ($el, state) { if ( !state.requestError && - (!state.loading || !state.loadingFirstPage) && + (!state.loading) && state.items.length === 0 ) { return $el.show() @@ -201,6 +198,16 @@ export const elements = { $el.attr('href', state.prevPagePath) } }, + '[data-async-listing] [data-first-page-button]': { + render ($el, state) { + if (state.pagesStack.length === 0) { + return $el.hide() + } + $el.show() + $el.attr('disabled', false) + $el.attr('href', window.location.href.split('?')[0]) + } + }, '[data-async-listing] [data-page-number]': { render ($el, state) { if (state.emptyResponse) { @@ -216,7 +223,7 @@ export const elements = { }, '[data-async-listing] [data-loading-button]': { render ($el, state) { - if (!state.loadingFirstPage && state.loading) return $el.show() + if (state.loading) return $el.show() $el.hide() } diff --git a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex index f9992c6d86..dfe7c51f30 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_pagination_container.html.eex @@ -14,15 +14,14 @@