Skip to content

Breadcrumbs aren't tied to custom menus #5392

@andypooletrioteca

Description

@andypooletrioteca
  • Laravel Version: 10.3.1
  • Nova Version: 4.22.2
  • PHP Version: 8.2.3

Description:

Current implementation of Nova's breadcrumbs don't consider Custom Menus. Resources or Dashboards is always shown as the first option, while it is not a word any of the users in my application can see in any part of the menu. Also, lenses accessed directly from the custom menu appear nested in their own resource.

Detailed steps to reproduce the issue on a fresh Nova installation:

for a custom menu like this:

MenuSection::make('Team', [
    MenuItem::resource(User::class)->canSee(fn ($r) => $r->user()->can('See user list')),
    MenuItem::lens(Managers::class, User::class)->canSee(fn ($r) => $r->user()->can('See manager list')),
])

I would expect the breadcrumbs to be:
Team > Users
Team > Managers

But the resulting breadcrumbs are:
Resources > Users
Resources > Users > Managers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions