rappasoft / laravel-livewire-tables

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

Move attributes for columns and filters #1611

Closed lrljoe closed 6 months ago

lrljoe commented 6 months ago

MAJOR CHANGE

This change migrates methods, properties, and attributes into centralised traits, to reduce code duplication within the project.

For example, this presents a new "HasAttributes" trait, which is used by both Columns and Filters alike.

The purpose of this is purely to reduce code duplication.

IN TEST

At present this is a PoC, and may be removed instead of merged.

All Submissions:

New Feature Submissions:

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

Changes to Core Features:

codecov[bot] commented 6 months ago

Codecov Report

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

Comparison is base (4dd0716) 88.51% compared to head (dd84b13) 87.97%. Report is 2 commits behind head on develop.

:exclamation: Current head dd84b13 differs from pull request most recent head d42f2b1. Consider uploading reports for the commit d42f2b1 to get more accurate results

Files Patch % Lines
config/livewire-tables.php 0.00% 12 Missing :warning:
src/Views/Traits/Core/HasView.php 53.84% 6 Missing :warning:
src/Views/Traits/Core/HasFooter.php 93.33% 2 Missing :warning:
src/Views/Traits/Core/HasSecondaryHeader.php 93.33% 2 Missing :warning:
src/Views/Traits/Columns/IsSortable.php 97.29% 1 Missing :warning:
src/Views/Traits/Core/HasAttributes.php 93.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1611 +/- ## ============================================= - Coverage 88.51% 87.97% -0.55% + Complexity 1344 1307 -37 ============================================= Files 106 118 +12 Lines 3162 3085 -77 ============================================= - Hits 2799 2714 -85 - Misses 363 371 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.