Skip to content

Extension point: custom breadcrumb #335

Description

@hpehl

Parent: #320

Summary

Allow resources to customize breadcrumb segment rendering or add breadcrumb actions. Currently, ResourceBreadcrumb renders segments as key=value with a copy-to-clipboard action on the last segment, with no way to customize the display.

Motivation

  • Custom segment rendering — show friendly names instead of raw key=value (e.g., "Datasources > ExampleDS" instead of subsystem=datasources > data-source=ExampleDS)
  • Extra breadcrumb actions — besides copy-to-clipboard, add resource-specific quick actions on the last breadcrumb segment (e.g., "Open in new tab", "Copy DMR address", "View in model browser")

Capabilities

  • Custom segment label — provide a function that maps AddressTemplate.Segment to a display string
  • Extra actions — add action buttons/menu items to the breadcrumb's last segment

Registration

A registry keyed by Environment + AddressTemplate. When ResourceBreadcrumb renders segments for a matching template, the registry provides the rendering customizations.

Open Questions

  • Is the value of custom breadcrumb rendering high enough to justify the complexity? The current key=value format is consistent and unambiguous.
  • Should friendly names be centralized (a mapping from segment keys to display names) rather than per-resource?
  • How should this interact with the onSegmentClick callback already provided by ResourceBreadcrumb?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions