filament-knowledge-base icon indicating copy to clipboard operation
filament-knowledge-base copied to clipboard

Supporting group title, icon and order

Open skeemer opened this issue 9 months ago • 5 comments

This will probably need several iterations to get right, but here's what I've got working.

docs
└── en
    ├── changelog.md
    ├── _group.md
    ├── tld
    │   ├── _group.md
    │   └── something.md
    ├── tld.md
    └── users
        ├── administration
        │   └── hello.md
        ├── administration.md
        └── _group.md

image image

Features

  • _group.md supports title:, icon: and order:
  • No _group.md will show, regardless if used
  • Tree depth dependent on what Filament supports
  • Groups and items can be intermixed
    • Items next to each other will still be grouped together, the same way that FilamentPHP does it now, to reduce spacing

Depth options

Note: FilamentPHP only allows icons at one level

1] Document with icon

2] Document with icon and sub-documents using parent:

  • If sub-documents have icons, they will be ignored

3] Group with icon and sub-documents

  • Next depth will be ignored

4] Group without icon and documents with icons

  • Sub-documents with parent:, icons will be ignored

skeemer avatar Feb 21 '25 23:02 skeemer

Hi, please give me a heads up when the PR is ready to be reviewed and merged. I see you still do some changes to it. I converted it to a draft PR for the meantime.

If it already is ready, just mark it as ready to review again.

lukas-frey avatar Mar 16 '25 08:03 lukas-frey

It's ready for review/feedback/discussion. I was just adding some bug fixes I ran into when using it in one of my projects.

skeemer avatar Mar 17 '25 02:03 skeemer

Hello Leo, thanks again for the PR and sorry for taking so long! Didn't have time any sooner.

So I tested it out locally and everything seems to be working as expected, well done! Are you able to document the usage of the _group.md in the readme file?

lukas-frey avatar Mar 21 '25 07:03 lukas-frey

I haven't forgotten this PR. Just haven't had time yet to work on the docs and finish the icon change.

skeemer avatar Apr 08 '25 17:04 skeemer

I haven't forgotten this PR. Just haven't had time yet to work on the docs and finish the icon change.

No worries! I'll mark it as draft for now. When you are ready, you can mark it for review again. :)

lukas-frey avatar Apr 24 '25 06:04 lukas-frey

version 2 is making this unnecessary

skeemer avatar Aug 17 '25 05:08 skeemer