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

V3 - QueryString migration into Traits #1465

Merged
merged 16 commits into from
Oct 27, 2023

Conversation

lrljoe
Copy link
Sponsor Collaborator

@lrljoe lrljoe commented Oct 27, 2023

This PR takes advantage of the newly released Livewire 3 support for queryStrings being placed into Traits.

This therefore migrates the relevant queryString items into the related trait.

Further, it migrates the related core QueryString code into it's own Trait, to reduce the noise in some of the core traits.

It also addresses the bug where it was not possible to disable the QueryString, and prepares for the future config option of enabling/disabling query string items individually.

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?

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #1465 (670a2eb) into v3-develop (dc2961a) will decrease coverage by 0.09%.
The diff coverage is 88.33%.

❗ Current head 670a2eb differs from pull request most recent head b4799c0. Consider uploading reports for the commit b4799c0 to get more accurate results

@@               Coverage Diff                @@
##             v3-develop    #1465      +/-   ##
================================================
- Coverage         88.11%   88.03%   -0.09%     
- Complexity         1222     1239      +17     
================================================
  Files                85       88       +3     
  Lines              2971     3001      +30     
================================================
+ Hits               2618     2642      +24     
- Misses              353      359       +6     
Files Coverage Δ
src/DataTableComponent.php 96.66% <ø> (ø)
src/Traits/ComponentUtilities.php 90.00% <ø> (ø)
...rc/Traits/Configuration/ComponentConfiguration.php 100.00% <ø> (ø)
.../Traits/Configuration/QueryStringConfiguration.php 100.00% <100.00%> (ø)
src/Traits/Helpers/ComponentHelpers.php 99.05% <ø> (-0.07%) ⬇️
src/Traits/WithColumnSelect.php 71.11% <83.33%> (+1.88%) ⬆️
src/Traits/WithFilters.php 88.88% <83.33%> (-2.78%) ⬇️
src/Traits/WithQueryString.php 83.33% <83.33%> (ø)
src/Traits/WithSearch.php 94.11% <83.33%> (-5.89%) ⬇️
src/Traits/WithSorting.php 84.78% <83.33%> (-0.22%) ⬇️
... and 1 more

@lrljoe lrljoe merged commit 3601838 into rappasoft:v3-develop Oct 27, 2023
lrljoe added a commit that referenced this pull request Oct 27, 2023
* v3 - Fix - Correct setFilter behaviour (#1451)

* Fix for setFilter

* Update return types

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Fixes for missing brackets (#1455)

* v3 Toolbar - Splitting of Views/Blades (#1454)

* Initial Commit - Full Split of Toolbar

* Remove Confirms Code

* Fix superfluous endif

* Combining Blades - Stage 1

* More Merging

* Bulk Actions - Icon Adjustment

* Further clean up of toolbar - filter button

* Stripping Toolbar Theme Distinctions

* Adjust childElementOpen to respect hierachy

* To remove files

* Merge Column-Select into Single Blade

* Clean Up Blades

* Fix missing BootStrap Classes from Toolbar Blade (#1466)

* Adding x-cloak where it is missing for x-show (#1463)

* V3 - QueryString migration into Traits (#1465)

* Initial migration of queryString to Traits

* Lock $queryStringStatus

* Add WithQueryString Trait

* Add default queryStringStatus

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Update Changelog (#1467)

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>
lrljoe added a commit that referenced this pull request Oct 29, 2023
* v3 - Fix - Correct setFilter behaviour (#1451)

* Fix for setFilter

* Update return types

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Fixes for missing brackets (#1455)

* v3 Toolbar - Splitting of Views/Blades (#1454)

* Initial Commit - Full Split of Toolbar

* Remove Confirms Code

* Fix superfluous endif

* Combining Blades - Stage 1

* More Merging

* Bulk Actions - Icon Adjustment

* Further clean up of toolbar - filter button

* Stripping Toolbar Theme Distinctions

* Adjust childElementOpen to respect hierachy

* To remove files

* Merge Column-Select into Single Blade

* Clean Up Blades

* Fix missing BootStrap Classes from Toolbar Blade (#1466)

* Adding x-cloak where it is missing for x-show (#1463)

* V3 - QueryString migration into Traits (#1465)

* Initial migration of queryString to Traits

* Lock $queryStringStatus

* Return empty arrays for Traits

* Add WithQueryString Trait

* Add Config/Helper Traits to WithQueryString

* Add default queryStringStatus

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Update Changelog (#1467)

* v3 DateRange - Icon Styling, FilterHelper Method (#1490)

* DateRange - Icon Styling, FilterHelper Method

* Add can_get_datestring test

* Add non-array test for DateRangeFilter

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* V3 DateRangeFilter - Remove Icon, Add Placeholder (#1492)

* Remove DateRangeFilter Icon

* DateRangeFilter - Remove Icon & Add Placeholder

* Use FilterHelper method to generate wire:key, add placeholder with docs (#1493)

* For all Filters (Except MultiSelect currently), use the FilterHelper method to generate the wire:key rather than doing it in the blade. This centralises for future updates
MultiSelectFilter will follow in due course, as it requires some tidying & updates.

* Add placeholder config option to: DateRangeFilter, DateFilter, DateTimeFilter, NumberFilter and update docs to reflect the availability of the option

* Clean up classes on Filters

* Minor tweaks to toolbar/column select styling (#1494)

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>
lrljoe added a commit that referenced this pull request Oct 29, 2023
* v3 - Fix - Correct setFilter behaviour (#1451)

* Fix for setFilter

* Update return types

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Fixes for missing brackets (#1455)

* v3 Toolbar - Splitting of Views/Blades (#1454)

* Initial Commit - Full Split of Toolbar

* Remove Confirms Code

* Fix superfluous endif

* Combining Blades - Stage 1

* More Merging

* Bulk Actions - Icon Adjustment

* Further clean up of toolbar - filter button

* Stripping Toolbar Theme Distinctions

* Adjust childElementOpen to respect hierachy

* To remove files

* Merge Column-Select into Single Blade

* Clean Up Blades

* Fix missing BootStrap Classes from Toolbar Blade (#1466)

* Adding x-cloak where it is missing for x-show (#1463)

* V3 - QueryString migration into Traits (#1465)

* Initial migration of queryString to Traits

* Lock $queryStringStatus

* Return empty arrays for Traits

* Add WithQueryString Trait

* Add Config/Helper Traits to WithQueryString

* Add default queryStringStatus

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Update Changelog (#1467)

* v3 DateRange - Icon Styling, FilterHelper Method (#1490)

* DateRange - Icon Styling, FilterHelper Method

* Add can_get_datestring test

* Add non-array test for DateRangeFilter

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* V3 DateRangeFilter - Remove Icon, Add Placeholder (#1492)

* Remove DateRangeFilter Icon

* DateRangeFilter - Remove Icon & Add Placeholder

* Use FilterHelper method to generate wire:key, add placeholder with docs (#1493)

* For all Filters (Except MultiSelect currently), use the FilterHelper method to generate the wire:key rather than doing it in the blade. This centralises for future updates
MultiSelectFilter will follow in due course, as it requires some tidying & updates.

* Add placeholder config option to: DateRangeFilter, DateFilter, DateTimeFilter, NumberFilter and update docs to reflect the availability of the option

* Clean up classes on Filters

* Minor tweaks to toolbar/column select styling (#1494)

* v3-RestoreBulkActionConfirm (#1500)

* Bulk Action Confirm

* Adjust changelog

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>
lrljoe added a commit that referenced this pull request Oct 31, 2023
V3.1.0 Release

* v3 - Fix - Correct setFilter behaviour (#1451)

* Fix for setFilter

* Update return types

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Fixes for missing brackets (#1455)

* v3 Toolbar - Splitting of Views/Blades (#1454)

* Initial Commit - Full Split of Toolbar

* Remove Confirms Code

* Fix superfluous endif

* Combining Blades - Stage 1

* More Merging

* Bulk Actions - Icon Adjustment

* Further clean up of toolbar - filter button

* Stripping Toolbar Theme Distinctions

* Adjust childElementOpen to respect hierachy

* To remove files

* Merge Column-Select into Single Blade

* Clean Up Blades

* Fix missing BootStrap Classes from Toolbar Blade (#1466)

* Adding x-cloak where it is missing for x-show (#1463)

* V3 - QueryString migration into Traits (#1465)

* Initial migration of queryString to Traits

* Lock $queryStringStatus

* Return empty arrays for Traits

* Add WithQueryString Trait

* Add Config/Helper Traits to WithQueryString

* Add default queryStringStatus

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* Update Changelog (#1467)

* v3 DateRange - Icon Styling, FilterHelper Method (#1490)

* DateRange - Icon Styling, FilterHelper Method

* Add can_get_datestring test

* Add non-array test for DateRangeFilter

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>

* V3 DateRangeFilter - Remove Icon, Add Placeholder (#1492)

* Remove DateRangeFilter Icon

* DateRangeFilter - Remove Icon & Add Placeholder

* Use FilterHelper method to generate wire:key, add placeholder with docs (#1493)

* For all Filters (Except MultiSelect currently), use the FilterHelper method to generate the wire:key rather than doing it in the blade. This centralises for future updates
MultiSelectFilter will follow in due course, as it requires some tidying & updates.

* Add placeholder config option to: DateRangeFilter, DateFilter, DateTimeFilter, NumberFilter and update docs to reflect the availability of the option

* Clean up classes on Filters

* Minor tweaks to toolbar/column select styling (#1494)

* v3-RestoreBulkActionConfirm (#1500)

* Bulk Action Confirm

* Adjust changelog

* v3.1.0 Release (#1505)

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>
@lrljoe lrljoe deleted the v3-MoveQueryStringToTraits branch October 31, 2023 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant