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

Tidying Filters - Migrating Carbon usage into Trait, Adding Lifecycle Hooks #1798

Merged
merged 19 commits into from
Jul 27, 2024

Conversation

lrljoe
Copy link
Collaborator

@lrljoe lrljoe commented Jul 27, 2024

Two changes:

Filters

Utilise a Core Trait for processing Dates (used in DateFilter, DateTimeFilter, DateRangeFilter)

Add the following lifecycle hooks:

searchUpdated

This is called whenever the search is updated, and is passed the value that has been searched for

filterApplying

This is called whenever a Filter is applying

filterReset

This is called whenever a Filter is reset

filterSet

This is called whenever a Filter is set

filterUpdated

This is called whenever a Filter is updated/used

filterRemoved

This is called whenever a Filter is removed from the table

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

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:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 98.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.34%. Comparing base (40485a0) to head (df45b1b).
Report is 5 commits behind head on development.

Files Patch % Lines
src/Views/Traits/Filters/HandlesDates.php 95.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             development    #1798      +/-   ##
=================================================
+ Coverage          87.14%   87.34%   +0.20%     
- Complexity          1495     1518      +23     
=================================================
  Files                139      141       +2     
  Lines               3484     3548      +64     
=================================================
+ Hits                3036     3099      +63     
- Misses               448      449       +1     

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

@lrljoe lrljoe merged commit 5aaaded into rappasoft:development Jul 27, 2024
9 checks passed
lrljoe added a commit that referenced this pull request Jul 27, 2024
* Add SetFilterDefaultValue to DateRange Filter (#1796)

---------

Co-authored-by: lrljoe <[email protected]>

* Add Localised Pills for DateRangeFilter

---------

Co-authored-by: lrljoe <[email protected]>

* Tidying Filters - Migrating Carbon usage into Trait, Adding Lifecycle Hooks (#1798)

* Tweaks to handle dates centrally

* Add localisation for DateFilter, DateTimeFilter, migrate DateRangeFilter to use Core Trait

* Add Filter Lifecycle Hooks

* Add Search Lifecycle Hook

* Update DateFilter, DateTimeFilter validate returns

* Update DateRangeFilterTest

* Add Pills Locale Tests to DateTests

* Remove superfluous method

---------

Co-authored-by: lrljoe <[email protected]>

* Update ChangeLog

* Update docs for setPillsLocale (#1800)

---------

Co-authored-by: lrljoe <[email protected]>
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.

1 participant