GuavaCZ/filament-knowledge-base

[Bug]: Breadcrumbs don't have correct links

Closed this issue · 8 comments

What happened?

Sorry to bug you again but breadcrumbs for (nested) pages don't seem to work. The last crumb has a link but the ones preceding it don't ('#').

How to reproduce the bug

Just check the crumbs on a nested page :-)

Package Version

latest

PHP Version

8.3.2

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

The one's proceeding is just the group and parent. A group can't have a link (it's just a group in the navigation).

I still have to add some way to get the parent from the child and generate a link. For the group either I'll leave it empty or just link to the item in the group, not sure.

The one's proceeding is just the group and parent. A group can't have a link (it's just a group in the navigation).
I still have to add some way to get the parent from the child and generate a link. For the group either I'll leave it empty or just link to the item in the group, not sure.

I see what you mean. Maybe best to just leave the group out of the breadcrumbs since users will expect it to be taking them somewhere. But for instance the first crumb ('documentation') should have a link to the docs dashboard.

Maybe make page breadcrumbs optional as well?

Hi Gavin, yeah I understand. Making them optional is not a problem.

I don't like the idea of leaving out the group out of the breadcrumbs though, it would feel like the breadcrumb is broken as well to me.

On another thought tho since you mentioned the Dashboard of the Knowledge Base. That's something that wasn't supposed to be there too, but due to the nature of Filament, if I remove the dashboard, the base URL of the panel will stop working.

Maybe we can at least make some use of the dashboard and add some widgets there or something. Ideas are welcome :-)

Maybe we can at least make some use of the dashboard and add some widgets there or something. Ideas are welcome :-)

The dashboard is a great way to show an overview of the topics. I was already thinking of adding a custom widget that shows cards of the available topics.

I don't like the idea of leaving out the group out of the breadcrumbs though, it would feel like the breadcrumb is broken as well to me.

Stripe leaves it out (and they have great docs) ;-)

Stripe actually doesn't leave them out, they redirect to the first page in the group (mostly something like Overview). :-)

Stripe actually doesn't leave them out, they redirect to the first page in the group (mostly something like Overview). :-)

Actually no. If you look at for instance https://docs.stripe.com/get-started/account/activate, the navigation group is 'YOUR ACCOUNT' (in the sidebar nav). That doesn't show up in the breadcrumbs :-)

I think you're talking about 'Get Started'? If so, that is not the group, compared to Filament. Or I don't understand? :)

Ah, true, I was referring to that. :)

So for now I did the following:

  • The first part redirects to the Knowledge Base Panel URL.
  • The second part (group) redirects to the first item in the group.
  • If there is a parent item, the breadcrumb will redirect to the parent documentation.
  • The last item is the currently viewed documentation page, doesn't do any redirect.

The breadcrumbs can now also be disabled entirely.