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 setFilterPopoverAttributes #2101

Merged

Conversation

lrljoe
Copy link
Collaborator

@lrljoe lrljoe commented Nov 30, 2024

This PR adds one new feature, creates one additional blade, and tidies up existing blade

Blade Clean-Up - Filter Pop-Over

Created an additional component blade for the "clear filters" button used in the popover menu, to minimise code duplication

Adds a new "setFilterPopoverAttributes" feature

Allows for the customisation of the appearance of the Filter Popover Menu.

Note the addition of a "default-width" boolean, allowing you to customise the width more smoothly without impacting other applied classes.

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.

public function configure(): void
{
    $this->setFilterPopoverAttributes(
        [
        'class' => 'w-96',
        'default-width' => false,
        'default-colors' => true,
        'default-styling' => true, 
        'x-transition:enter' => 'transition ease-out duration-100',
        ]
    );
}

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 lrljoe merged commit 5d3a682 into rappasoft:development Dec 1, 2024
7 checks passed
@lrljoe lrljoe mentioned this pull request Dec 1, 2024
9 tasks
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