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

Paginationnumber #536

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Paginationnumber #536

merged 4 commits into from
Sep 19, 2023

Conversation

waelhanfi04
Copy link
Contributor

Summary of Changes

This pull request introduces a modification to the maxButtonsPerPage logic in response to changes in the window's width of token info page. The setMaxButtonsPerPage method has been updated to dynamically adjust the maxButtonsPerPage value based on the screen width, ensuring a more responsive user experience.

Details of Changes

Code Modifications

  1. Added an @HostListener to the window's resize event to trigger the setMaxButtonsPerPage method whenever the window is resized.
@HostListener('window:resize', ['$event'])
onResize(event: Event): void {
  this.setMaxButtonsPerPage();
}
  1. Updated the setMaxButtonsPerPage method to calculate the maxButtonsPerPage value based on the screen width. The logic is as follows:
    • If the screen width is less than or equal to 530px, maxButtonsPerPage is set to 5.
    • If the screen width is between 531px and 768px, maxButtonsPerPage is set to 10.
    • If the screen width is between 769px and 992px, maxButtonsPerPage is set to 15.
    • If the screen width is greater than 992px, maxButtonsPerPage is set to 20.

## Testing

The changes have been tested to ensure that the `maxButtonsPerPage` value is correctly updated when the window is resized, and that it aligns with the specified screen width breakpoints.

## Impact

This modification enhances the responsiveness of the `maxButtonsPerPage` behavior, providing a better user experience by adjusting the number of visible buttons based on the screen size.

Please review and merge this pull request to incorporate these improvements into the codebase.

Thank you!

@hichri-louay hichri-louay merged commit 8001b81 into develop Sep 19, 2023
3 checks passed
@hichri-louay hichri-louay deleted the paginationnumber branch September 19, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants