Skip to content

feat: add breadcrumb component#25

Open
YvetteNikolov wants to merge 5 commits intomainfrom
feat/breadcrumb
Open

feat: add breadcrumb component#25
YvetteNikolov wants to merge 5 commits intomainfrom
feat/breadcrumb

Conversation

@YvetteNikolov
Copy link
Contributor

@YvetteNikolov YvetteNikolov commented Feb 14, 2026

Eigen breadcrumb component toegevoegd. Omdat SEOPress voor een trage dev omgeving zorgt, hebben we de plugin altijd uitstaan. Gevolg: geen breadcrumbs zichtbaar. Dat is nu opgelost. En meteen weer een afhankelijkheid minder van SEOPress.

Hij gebruikt onderwater Log1x/crumb. De pagina die je toevoegt onder de parent-page supports wordt meegenomen.

Gebruik:

<x-brave-breadcrumb listClass="" itemClass="" linkClass="" currentItemClass="" />

Maar je kunt ook je eigen collection meegeven voor als je het nodig hebt op bijv. een custom route:

<x-brave-breadcrumb :items="collect([
    ['id' => null, 'url' => home_url(), 'label' => 'Home'],
    ['id' => null, 'url' => home_url('woo-verzoeken'), 'label' => 'Woo verzoeken'],
])" />

Eigenlijk doet de Log1x/crumb package niet bijster veel. We kunnen overwegen om die logica hier onder te brengen, zodat we nóg een dependency minder hebben.

I.c.m. deze PR geïmplementeerd in Brave: yardinternet/brave#47 (changes)

@github-actions
Copy link

Composer package changes
Prod Packages Operation Base Target
log1x/crumb New - v1.1.5

@github-actions
Copy link

github-actions bot commented Feb 14, 2026

Coverage report for commit: 6b50ef3
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 100.0%
  10% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  20% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  30% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  40% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  50% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  60% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  70% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  80% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
  90% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
 100% │ ░░░░░░░░░░░░░░░░░░░░░░░ │  0.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: - | Methods: -
FilesLinesMethodsBranches
src/Components
   Accordion.php--100.00%
   BackButton.php--100.00%
   Breadcrumb.php--100.00%
   Dialog.php--100.00%
   FeedbackForm.php--100.00%
   ImgFocalPoint.php--100.00%
   PatternContent.php--100.00%
   SocialIcon.php--100.00%
src/Components/Breadcrumb
   Crumb.php--100.00%
src
   ComponentsServiceProvider.php--100.00%
src/Hooks
   PatternContent.php--100.00%

🤖 comment via lucassabreu/comment-coverage-clover

Copy link

@mvdhoek1 mvdhoek1 left a comment

Choose a reason for hiding this comment

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

Waar zit de switch tussen dev omgevingen en het gebruik van dit component versus productie omgevingen waarbij SeoPress wel de broodkruimels verzorgt? Of gaat het vinkje voor broodkruimels sowieso uit?

return [];
}

$parentPageSlug = get_all_post_type_supports(get_post_type($postId))['parent-page'][0]['slug'] ?? null;

Choose a reason for hiding this comment

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

Iets leesbaarder:

$postType = get_post_type($postId);
$supports = get_all_post_type_supports($postType);

$parentPageSlug = $supports['parent-page'][0]['slug'] ?? null;

@YvetteNikolov
Copy link
Contributor Author

het

De broodkruimels worden nu altijd getoond, er is geen switch. Vóór deze change gebruikten we die van SEOPress, die willen we weg hebben (omdat we die altijd uitzetten op dev)

@mvdhoek1
Copy link

het

De broodkruimels worden nu altijd getoond, er is geen switch. Vóór deze change gebruikten we die van SEOPress, die willen we weg hebben (omdat we die altijd uitzetten op dev)

Oh SeoPress blijft gewoon draaien maar dan zonder broodkruimels?

@YvetteNikolov
Copy link
Contributor Author

het

De broodkruimels worden nu altijd getoond, er is geen switch. Vóór deze change gebruikten we die van SEOPress, die willen we weg hebben (omdat we die altijd uitzetten op dev)

Oh SeoPress blijft gewoon draaien maar dan zonder broodkruimels?

Precies!


### Breadcrumb

U ses the [Log1x/crumb](https://github.com/Log1x/crumb) package to generate a breadcrumb based on the current page. Also adds posts added through the `parent-page` supports feature. Usage:
Copy link
Member

Choose a reason for hiding this comment

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

Dit klopt nu niet meer

if (
true === $blog &&
get_option('show_on_front') === 'page' &&
! empty($blogId = get_option('page_for_posts')) &&
Copy link
Member

Choose a reason for hiding this comment

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

Dit is toch geen blogId maar een postId?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

5 participants