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

Add setFilterSlidedownWrapperAttributes and setFilterSlidedownRowAttributes #2120

Merged

Conversation

lrljoe
Copy link
Collaborator

@lrljoe lrljoe commented Dec 8, 2024

Adds two new methods to the Component:

  • setFilterSlidedownWrapperAttributes
  • setFilterSlidedownRowAttributes

Also:

  • Separates per-filter and per-table methods into separate doc sections

setFilterSlidedownWrapperAttributes

Allows for the customisation of the appearance of the Filter Slidedown Wrapper.

You may also replace default colors by setting "default-colors" to false, or default styling by setting "default-styling" to false, and specifying replacement classes in the "class" property.

You can also replace the default transition behaviours (Tailwind) by specifying replacement attributes in the array, for example to extend the duration of the transition effect from the default duration-100 to duration-1000:

public function configure(): void
{
    $this->setFilterSlidedownWrapperAttributes([
        'x-transition:enter' => 'transition ease-out duration-1000',
        'class' => 'text-black',
        'default-colors' => true,
        'default-styling' => true, 
    ]);
}

setFilterSlidedownRowAttributes

Allows for the customisation of the appearance of the Filter Slidedown Row. Note that this uses a callback, which receives the "rowIndex" of the Slidedown Row

You may replace default colors by setting "default-colors" to false, or default styling by setting "default-styling" to false, and specifying replacement classes in the "class" property.

public function configure(): void
{
    $this->setFilterSlidedownRowAttributes(fn($rowIndex) => $rowIndex % 2 === 0 ? 
        [
            'class' => 'bg-red-500',
            'default-colors' => true,
            'default-styling' => true, 
        ] :  [
            'class' => 'bg-blue-500',
            'default-colors' => true,
            'default-styling' => true, 
        ] 
    );
}

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 Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.36%. Comparing base (a931da9) to head (a1ee4e9).
Report is 1 commits behind head on development.

Additional details and impacted files
@@                Coverage Diff                @@
##             development    #2120      +/-   ##
=================================================
+ Coverage          90.33%   90.36%   +0.02%     
- Complexity          1940     1945       +5     
=================================================
  Files                189      189              
  Lines               4376     4388      +12     
=================================================
+ Hits                3953     3965      +12     
  Misses               423      423              

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

@lrljoe lrljoe merged commit 9ef4587 into rappasoft:development Dec 8, 2024
11 checks passed
lrljoe added a commit that referenced this pull request Dec 10, 2024
## [v3.5.8] - 2024-12-10
### New Features
- Set bulk action row button attributes by @lrljoe in #2117
- Add setFilterSlidedownWrapperAttributes and setFilterSlidedownRowAttributes by @lrljoe in #2120

### Bug Fixes
- Respect setDisplayPaginationDetailsDisabled for unpaginated tables by @lrljoe in #2119

### Localisation
- Added neccessary files for Farsi translation by @AmirMehrabi in #2100

### Testing
- Workflow Adjustments by @lrljoe in #2108
- Add extra Search Lazy Tests by @lrljoe in #2107
- Restore Missing Lazy Search Tests by @lrljoe in #2106
- Ignore WithEvents Coverage by @lrljoe in #2105
- Add missing tests for WithCustomisations by @lrljoe in #2104
- Add missing LivewireComponentFilterTest and BooleanFilterTest by @lrljoe in #2121
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