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

fix(bridge-ui): correct display of forward arrow and handling of invalid pagination input #16485

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

courage-ugwuanyi
Copy link
Contributor

@courage-ugwuanyi courage-ugwuanyi commented Mar 19, 2024

This pull request addresses:

  1. A bug related to pagination in the transactions page. Previously, the forward arrow button was incorrectly displayed even beyond the last page, leading to confusion for users. This bug has been fixed to ensure that the forward arrow button is displayed only when there are additional pages to navigate to.

  2. Previously, when users input a number greater than the total number of pages in the pagination input field, the application would attempt to navigate to the specified page, leading to unexpected behaviour. This commit addresses this issue by adding validation in the handleKeydown function to check if the input number exceeds the total number of pages. If the input is invalid, the application ignores the input and does nothing.

Changes:

  • Modified the pagination logic to accurately determine when to display the forward arrow button.
  • Added validation in the handleKeydown function to handle input of a number greater than the total number of pages.
  • Implemented a mechanism to ignore invalid input, ensuring consistent and expected behaviour in the pagination component.

How to Test:

  1. Navigate to the transaction records page: https://bridge.katla.taiko.xyz/transactions
  2. Verify that the forward arrow button is not displayed on the last page.
  3. Verify that nothing happens if a number greater than the last page number is entered.
  4. Input a number greater than the total number of pages and ensure that the forward arrow button remains hidden.

closes #16468

…page and handle input of number greater than total pages.
…page. Previously, the forward arrow button was incorrectly displayed even beyond the last page. Also, when users input a number greater than the total number of pages in the pagination input field, the application would attempt to navigate to the specified page, leading to unexpected behavior. This commit addresses this issue.
…page. Previously, the forward arrow button was incorrectly displayed even beyond the last page. Also, when users input a number greater than the total number of pages in the pagination input field, the application would attempt to navigate to the specified page, leading to unexpected behavior. This commit addresses this issue.
@courage-ugwuanyi
Copy link
Contributor Author

courage-ugwuanyi commented Mar 19, 2024

@KorbinianK, Sorry, I was having so many issues to fix the lint error. So I had to delete the repo and start afresh. Hopefully it works okay now.

@courage-ugwuanyi courage-ugwuanyi changed the title fix(bridge-ui): correct display of forward arrow button beyond last page fix(bridge-ui): correct display of forward arrow and handling of invalid pagination input Mar 19, 2024
@KorbinianK
Copy link
Contributor

KorbinianK commented Mar 20, 2024

@courage-ugwuanyi it still fails when linting. Run pnpm svelte:check && pnpm lint:fix https://github.com/taikoxyz/taiko-mono/pull/16485/files

@courage-ugwuanyi
Copy link
Contributor Author

@courage-ugwuanyi it still fails when linting. Run pnpm svelte:check && pnpm lint:fix https://github.com/taikoxyz/taiko-mono/pull/16485/files

@KorbinianK Please check if it works now. Thanks

@KorbinianK KorbinianK added this pull request to the merge queue Mar 21, 2024
Merged via the queue into taikoxyz:main with commit d4d9ce9 Mar 21, 2024
4 checks passed
Copy link

gitpoap-bot bot commented Mar 21, 2024

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2024 Taiko Contributor:

GitPOAP: 2024 Taiko Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

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

Successfully merging this pull request may close these issues.

Pagination Bug: Negative Page Input Displays a Trucated Data on the Transaction Page
4 participants