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

Replace queryProperty to field in DataColumn #182

Merged
merged 4 commits into from
Apr 4, 2024
Merged

Replace queryProperty to field in DataColumn #182

merged 4 commits into from
Apr 4, 2024

Conversation

vjik
Copy link
Member

@vjik vjik commented Apr 3, 2024

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

Waiting yiisoft/data#176 and yiisoft/arrays#149

Copy link

what-the-diff bot commented Apr 3, 2024

PR Summary

  • Update of Import Statements in Various Files
    A number of import statements have been added to BaseListView.php, HeaderContext.php, and DataColumn.php files. These statements allow the use of classes and types from different locations to be used in these files.

  • Addition of Readonly Array to 'HeaderContext.php'
    A private array $overrideOrderFields has been added to HeaderContext.php. This cannot be modified once initialized.

  • Changes in HeaderContext.php Methods
    Changes have been made to prepareSortable and getLinkSortValue methods in HeaderContext.php to receive new parameter inputs which enhances the methods' functionality.

  • Addition and Modifications in 'DataColumnRenderer.php'
    The DataColumnRenderer.php file now implements the OverrideOrderFieldsColumnInterface interface. Additionally, changes were made to multiple methods (renderHeader, prepareSortable, renderFilter, makeFilter, getOverrideOrderFields) to receive new parameter inputs which increases the usability of these methods.

  • Creation of New Interface and Class
    OverrideOrderFieldsColumnInterface.php and QueryProperty.php have been created. The former is a set of rules for classes that use it and the latter holds functions related to query property.

  • Changes in GridView.php
    In the GridView.php file, import statements were added, a new method prepareOrder was created, and changes were made to existing methods (renderItems, prepareBodyAttributes) to handle 'override order fields' related changes.

These modifications refine our code in terms of better functionality, improved usability, and enhanced organization.

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 41.86047% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 64.66%. Comparing base (70933b9) to head (5f31337).

Files Patch % Lines
src/Column/Base/HeaderContext.php 22.22% 7 Missing ⚠️
src/GridView.php 41.66% 7 Missing ⚠️
src/Column/DataColumnRenderer.php 64.70% 6 Missing ⚠️
src/BaseListView.php 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #182      +/-   ##
============================================
- Coverage     64.92%   64.66%   -0.27%     
- Complexity      547      558      +11     
============================================
  Files            46       46              
  Lines          1836     1862      +26     
============================================
+ Hits           1192     1204      +12     
- Misses          644      658      +14     

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

@vjik vjik changed the title Add option queryField to DataColumn Replace queryProperty to field in DataColumn Apr 3, 2024
@vjik vjik marked this pull request as ready for review April 4, 2024 11:22
@vjik vjik merged commit 1fb609b into master Apr 4, 2024
16 of 18 checks passed
@vjik vjik deleted the query-field branch April 4, 2024 11:24
rossaddison added a commit to rossaddison/invoice that referenced this pull request Apr 4, 2024
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