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

FEATURE: Introduce DBreadcrumbs components #27049

Merged
merged 2 commits into from
May 20, 2024

Conversation

martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented May 16, 2024

This commit introduces the following components:

  • DBreadcrumbsContainer - The wrapper template-only component,
    which renders all DBreadcrumbsItem components on the page.
  • DBreadcrumbsItem - The component that registers a LinkTo
    for the breadcrumb trail. The breadcrumb > trail > will
    show based on the order these items are rendered on the page.
  • BreadcrumbsService - Manages the DBreadcrumbsContainer elements
    on the page via DBreadcrumbsContainerModifier.
  • DBreadcrumbsContainerModifier - Handles registering DBreadcrumbsContainer
    elements with the BreadcrumbsService and deregistering them.

For now, we will only use these breadcrumbs in the admin section
of Discourse, and this initial commit only uses them in admin/plugins.

This is heavily based off of
https://github.com/Bagaar/ember-breadcrumbs,
but will be further modified for our needs.

image

@martin-brennan martin-brennan force-pushed the feature/breadcrumbs-component branch 2 times, most recently from 88e218a to 664f032 Compare May 17, 2024 04:51
@martin-brennan martin-brennan marked this pull request as ready for review May 17, 2024 04:52
This commit introduces the following components:

* DBreadcrumbsContainer - The wrapper template-only component,
  which renders all DBreadcrumbsItem components on the page.
* DBreadcrumbsItem - The component that registers a LinkTo
  for the breadcrumb trail. The breadcrumb > trail > will
  show based on the order these items are rendered on the page.
* BreadcrumbsService - Manages the DBreadcrumbsContainer elements
  on the page via DBreadcrumbsContainerModifier.
* DBreadcrumbsContainerModifier - Handles registering DBreadcrumbsContainer
  elements with the BreadcrumbsService and deregistering them.

For now, we will only use these breadcrumbs in the admin section
of Discourse, and this initial commit only uses them in admin/plugins.

This is heavily based off of
https://github.com/Bagaar/ember-breadcrumbs,
but will be further modified for our needs.
Copy link
Contributor

@Drenmi Drenmi left a comment

Choose a reason for hiding this comment

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

LGTM! Just a few questions for my own education. 😬

@martin-brennan martin-brennan merged commit 1239178 into main May 20, 2024
15 of 16 checks passed
@martin-brennan martin-brennan deleted the feature/breadcrumbs-component branch May 20, 2024 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants