Skip to content

feat: allow breadcrumbs to be filtered - #48

Merged
rivanuff merged 2 commits into
mainfrom
feat/breadcrumb-filter
Jul 22, 2026
Merged

feat: allow breadcrumbs to be filtered#48
rivanuff merged 2 commits into
mainfrom
feat/breadcrumb-filter

Conversation

@rivanuff

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a WordPress-style filter hook to allow consumers to modify the breadcrumb items collection before the component renders, enabling item removal/reordering/customization without overriding the component.

Changes:

  • Introduces a yard::brave-components/breadcrumb/items filter to transform breadcrumb items before rendering.
  • Wraps the filtered result in an Illuminate\Support\Collection for consistent downstream consumption.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Components/Breadcrumb.php Outdated
mvdhoek1
mvdhoek1 previously approved these changes Jul 15, 2026
*
* @param Collection $items Crumbs shaped as ['id' => ?int, 'label' => string, 'url' => ?string].
*/
$this->items = Collection::make(apply_filters('yard::brave-components/breadcrumb/items', $items));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wellicht nog mooi om dit toe te voegen aan readme?

- null-safe check on the items collection (Copilot)
- document the breadcrumb items filter in the readme (@mvdhoek1)
@rivanuff
rivanuff requested a review from mvdhoek1 July 16, 2026 11:43
@rivanuff
rivanuff merged commit 22bb615 into main Jul 22, 2026
4 of 6 checks passed
@rivanuff
rivanuff deleted the feat/breadcrumb-filter branch July 22, 2026 08:23
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