Skip to content

fix: remove class from props in reset button component#106

Merged
Yannicvanveen merged 2 commits into
mainfrom
feat/remove-facetwp-reset-btn-class-prop
Apr 30, 2026
Merged

fix: remove class from props in reset button component#106
Yannicvanveen merged 2 commits into
mainfrom
feat/remove-facetwp-reset-btn-class-prop

Conversation

@Yannicvanveen
Copy link
Copy Markdown
Contributor

Als class in @props staat wordt deze uit de ComponentAttributeBag gefilterd en is het niet mogelijk om van buitenaf een class mee te geven.

Verder is class() losgemaakt van merge(), dat maakt het makkelijker om conditionele classes toe te voegen net als met @class.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the FacetWP reset button Blade component so external class attributes are no longer stripped from the ComponentAttributeBag, making it possible to pass classes in from the component caller.

Changes:

  • Removed class from @props to prevent Blade from extracting/filtering the class attribute out of $attributes.
  • Switched from $attributes->merge(['class' => ...]) to $attributes->class(...)->merge() to support conditional class composition more easily.

Comment thread web/app/themes/sage/resources/views/components/facetwp/reset-button.blade.php Outdated
@Yannicvanveen Yannicvanveen merged commit bdb4bd2 into main Apr 30, 2026
2 checks passed
@Yannicvanveen Yannicvanveen deleted the feat/remove-facetwp-reset-btn-class-prop branch April 30, 2026 10:08
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.

4 participants