GuavaCZ/filament-knowledge-base

Request: make injection of Documentation button configurable

gavinhewitt opened this issue · 8 comments

What happened?

Not a bug, GH doesn't let me create feature requests (returns a 404).

I have 2 panels in which only one should have docs. Personally I think that the button should only appear on panels that have the plugin enabled. Also it would be nice to be able to indicate that the docs should be opened in a new window.

Awesome package though!

How to reproduce the bug

x

Package Version

latest

PHP Version

8.3.2

Laravel Version

10

Which operating systems does with happen with?

macOS

Notes

No response

Hi Gavin! Actually, the button should have already been rendered only where the plugin is enabled. Seems like I forgot to move the render hook to the correct place. Thanks for noticing that! :)

And for the second suggestions, I'll add a configuration for it too.

It's released in version 1.1.5 :)

@lukas-frey Maybe I'm dumb but I don't see where I can set shouldOpenDocumentationInNewTab (your docs need updating too btw :-)). I was expecting to set it like below but that results in an error:

KnowledgeBasePlugin::make()
     ->modalPreviews()
     ->slideOverPreviews()
     ->modalTitleBreadcrumbs()
     ->shouldOpenDocumentationInNewTab()

Never mind, should be ->openDocumentationInNewTab() :-)

Hm, does it make sense to have the documentation button on the documentation panel itself?

Hm, does it make sense to have the documentation button on the documentation panel itself?

That went through my head too. I felt it was a nice indicator that you're in the knowledge base. Do you feel it's confusing when it's in the knowledge base panel?

... (your docs need updating too btw :-)) ...

Update as in they aren't straight forward or what do you mean exactly? There is a section about the url opening in new tab.

Hm, does it make sense to have the documentation button on the documentation panel itself?

That went through my head too. I felt it was a nice indicator that you're in the knowledge base. Do you feel it's confusing when it's in the knowledge base panel?

Personally I think it's odd to have it there since you're already there. I think some kind of indicator would fit better in the header.

Update as in they aren't straight forward or what do you mean exactly? There is a section about the url opening in new tab.

Ah, missed that then. Sorry for the confusion!