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

Filters - New Functionality - Custom filter labels #1110

Closed
wants to merge 12 commits into from

Conversation

lrljoe
Copy link
Collaborator

@lrljoe lrljoe commented Mar 20, 2023

This PR is for moving the Filter Labels into the Filter Blades, and allowing for the customising of filter labels on a per-filter instance.

This makes several tweaks:

  1. Removes Filter Labels from the toolbar.blade
  2. Adds a new view component for Filter-Label
  3. Adds a setCustomFilterLabel() method for Filters (allows you to set a specific blade file for a specific filter instance's label).
  4. Adds the label to the filter blade directly.

This allows for greater customisation of the labels, and easier styling of the labels for those who wish to customise.

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?

lrljoe and others added 10 commits March 18, 2023 02:05
* Amended to removing formatting adjustments

Adding ID to Label

Update toolbar.blade.php

Adding new line at EOF

* Update toolbar.blade.php

Adding ID to Wrapper

* Amended to removing formatting adjustments

Adding ID to Label

Adding ID to Wrapper

Adding new line at EOF

Update toolbar.blade.php

Adding ID to Wrapper

* Update toolbar.blade.php

Adds IDs to Filter Labels
Adds IDs to Filter Wrappers
Restores removed EOF newline

* Restoring New Line at EOF
* Adding childElementOpen attr for all toolbar items.

* Adjusting Toolbar to remove errant formatting

* Fix styling

---------

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

* Add variable to Filter.php
* Restrict AppliedFilters to only return non-empty

At the moment, a filter will be considered "applied" if it has any value, including the default value.  This causes the Pills to appear with a blank value.

* Moving to withValues to make more sense
* Adding Custom Slug option (#21)

Adding new methods & test

Adding documentation

* Filter label (#22)

* Amended to removing formatting adjustments

Adding ID to Label

Update toolbar.blade.php

Adding new line at EOF

* Update toolbar.blade.php

Adding ID to Wrapper

* Amended to removing formatting adjustments

Adding ID to Label

Adding ID to Wrapper

Adding new line at EOF

Update toolbar.blade.php

Adding ID to Wrapper

* Update toolbar.blade.php

Adds IDs to Filter Labels
Adds IDs to Filter Wrappers
Restores removed EOF newline

* Restoring New Line at EOF

* Adding Filter Custom Pills blade option (#23)

* Adding Filter Custom Pills blade option

* Removing formatting changes

* Get applied filters   only non empty (#24)

* Restrict AppliedFilters to only return non-empty

At the moment, a filter will be considered "applied" if it has any value, including the default value.  This causes the Pills to appear with a blank value.

* Moving to withValues to make more sense

* Child open attribute (#25)

* Adding childElementOpen attr for all toolbar items.

* Adjusting Toolbar to remove errant formatting

* Fix styling

---------

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

* Adding getAdditionalSelectRaws (#26)

Using selectRaw rather than directly using DB

Referencing DB directly rather than a use

Fix styling

Fixing test

Restoring workflows

Removing automated on-push

Setting up configuration elements, documentation

Adding parameterised capability

* Update composer.json

* Update run-tests.yml

* Fix doc types (#27)

* Update toolbar.blade.php

* Update Filter.php

* Update FilterHelpers.php

* Fix styling

* Update FilterConfiguration.php

* Fix styling

* Initial DocType Fixes

* Fix styling

* PHPDoc FIxes

* Toolbar Blade Fixes for Pagination

* Fix styling

* Removing non-nullable return

* Fixing DocType issues

* Reverting minor tweaks due to PHPUnit failures

* Removing PHPStan

* Additional PHPDoc Fixes

* Fixes for PHPDocTypes

* Fix styling

---------

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

* Update composer.json

* Custom pill views (#29)

* Adding Filter Custom Pills blade option

* Removing formatting changes

* Initial Commit

* Fix styling

* Fix for errant line end

* Fix styling

* Minor Tweaks

* Remove ParaTest for this branch

* Restore Run-tests for this branch

* Remove CustomFilterPil

* Reverting Numerous Changes to Doctypes - Branches

* Fix Mistaken Branch merge

* More remediation to remove branch merges

* Fix styling

* More removals of branch merge

* Adding SlideDownRow and SlideDownColspan Tests

* Fix styling

* Restoring original workflow

* Restoring CS FIxer

---------

Co-authored-by: lrljoe <lrljoe@users.noreply.github.com>
@lrljoe lrljoe changed the title Custom filter labels Filters - Custom filter labels Mar 20, 2023
@lrljoe lrljoe changed the title Filters - Custom filter labels Filters - New Functionality - Custom filter labels Mar 20, 2023
@lrljoe
Copy link
Collaborator Author

lrljoe commented Mar 20, 2023

See #1111

@rappasoft rappasoft mentioned this pull request Apr 8, 2023
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