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

Improve pagination #151

Merged
merged 25 commits into from
Jan 10, 2024
Merged

Improve pagination #151

merged 25 commits into from
Jan 10, 2024

Conversation

vjik
Copy link
Member

@vjik vjik commented Jan 9, 2024

Q A
Is bugfix?
New feature?
Breaks BC? ✔️

Copy link

what-the-diff bot commented Jan 9, 2024

PR Summary

  • Improved Flexibility in Pagination Handling:
    The 'pagination' property in BaseListView.php has been updated to accommodate both a nullable BasePagination object or a string.

  • Introduced New Pagination Object:
    To support the diversity of the pagination property, new methods and properties have been added to the BasePagination class. These adjustments are meant to control the way URLs and page-related queries are handled, thus offering more flexibility.

  • Refined URL Configurations:
    To help streamline URL generation and management, the urlConfig class has been renamed to ActionColumnUrlConfig. This established a more precise context for URL configuration within action columns.

  • Incorporation of New Supporting Classes:
    'PageContext', 'UrlParameterPlace' and 'SimplePaginationUrlCreator' classes have been introduced to support the new BasePagination options.

  • Improvement in Testing:
    The test classes have now been adjusted to reflect and assess the changes in the URL creation and rendering processes.

  • Removal of Redundant Methods and Files:
    Several methods that no longer serve a purpose have been removed. This also includes the render method taken out from the PaginationTest trait.

  • Addition of New File in Test Support:
    A new file SimplePaginationUrlCreator.php has been added under the tests/Support directory, supplementing the testing process.

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 71 lines in your changes are missing coverage. Please review.

Comparison is base (4cd7b77) 90.17% compared to head (f363092) 86.65%.

Files Patch % Lines
src/BaseListView.php 40.90% 39 Missing ⚠️
src/YiiRouter/PaginationUrlCreator.php 0.00% 18 Missing ⚠️
src/YiiRouter/UrlParameterProvider.php 0.00% 9 Missing ⚠️
src/BasePagination.php 87.09% 4 Missing ⚠️
src/YiiRouter/ActionColumnUrlCreator.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #151      +/-   ##
============================================
- Coverage     90.17%   86.65%   -3.53%     
- Complexity      469      501      +32     
============================================
  Files            33       36       +3     
  Lines          1649     1731      +82     
============================================
+ Hits           1487     1500      +13     
- Misses          162      231      +69     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/BaseListView.php Outdated Show resolved Hide resolved
src/BaseListView.php Outdated Show resolved Hide resolved
src/BasePagination.php Outdated Show resolved Hide resolved
src/BasePagination.php Outdated Show resolved Hide resolved
@vjik vjik marked this pull request as ready for review January 10, 2024 12:28
@vjik vjik merged commit 0242180 into master Jan 10, 2024
16 of 19 checks passed
@vjik vjik deleted the improve-pagination branch January 10, 2024 12:43
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.

3 participants