rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.76k stars 330 forks source link

V3 - Filter DTOs #1503

Closed lrljoe closed 11 months ago

lrljoe commented 11 months ago

This PR is a pre-requisite for several upcoming improvements to filter behaviour.

The key changes within this PR are: 1) Use of a DTO to setup the relevant properties to be used within the filter blades 2) Removing use of properties within the render() method of Filters

These changes will smooth the approach for future Filter improvements by allowing for: a) Standardised Behaviour of Filter Render methods b) Removal of defined properties from blades relating to Filter rendering c) Exposing a DTO so that it is simpler for third parties to extend existing filters

All Submissions:

New Feature Submissions:

  1. [x] Does your submission pass tests and did you add any new tests needed for your feature?
  2. [x] Did you update all templates (if applicable)?
  3. [x] Did you add the relevant documentation (if applicable)?
  4. [x] Did you test locally to make sure your feature works as intended?

Changes to Core Features:

codecov[bot] commented 11 months ago

Codecov Report

Merging #1503 (c580922) into develop (0025311) will increase coverage by 0.45%. The diff coverage is 93.33%.

@@              Coverage Diff              @@
##             develop    #1503      +/-   ##
=============================================
+ Coverage      88.08%   88.53%   +0.45%     
- Complexity      1251     1254       +3     
=============================================
  Files             94       95       +1     
  Lines           3013     2975      -38     
=============================================
- Hits            2654     2634      -20     
+ Misses           359      341      -18     
Files Coverage Δ
src/DataTableComponent.php 96.77% <100.00%> (+0.10%) :arrow_up:
src/DataTransferObjects/FilterGenericData.php 100.00% <100.00%> (ø)
src/Traits/Configuration/FilterConfiguration.php 94.11% <100.00%> (+0.50%) :arrow_up:
src/Traits/Helpers/FilterHelpers.php 77.44% <100.00%> (+1.06%) :arrow_up:
src/Traits/WithFilters.php 88.88% <ø> (ø)
src/Views/Filter.php 100.00% <ø> (ø)
src/Views/Filters/DateFilter.php 76.47% <100.00%> (-7.53%) :arrow_down:
src/Views/Filters/DateTimeFilter.php 76.47% <100.00%> (-7.53%) :arrow_down:
src/Views/Filters/MultiSelectDropdownFilter.php 100.00% <100.00%> (ø)
src/Views/Filters/MultiSelectFilter.php 92.10% <100.00%> (-1.38%) :arrow_down:
... and 8 more