Navigation is off... (incorrect margins and paddings)
Hey - I've got a problem with my navigation. Right now it looks like in the screenshot, but I would like to have it nicely aligned with each other. Problem is that I don't know what is wrong there, since it's like this from the start. All I'm doing is build the navigation manually via
NavigationGroup::make()
and NavigationItem::make()
.
Edit: Just to clarify - I think Filament should do what I want on it's own, but I don't know where to look for the part where it goes wrong.33 Replies
Can you show your code?
I think Filament should do what I want on it's own, but I don't know where to look for the part where it goes wrong.Why do you even build it yourself? Aren't these just all resources and pages?
It looks like you have put WERKZEUGE into it Bestandsprobleme
Maybe that fixes your Bestandsprobleme 🥁
This is my code:
"WERKZEUGE" should be sub-menu within "ARTIKELMANAGEMENT" @toeknee_iom
And why I build it myself -> Some of the tools are multistep-pages.
"WERKZEUGE" should be sub-menu within "ARTIKELMANAGEMENT"I guess that's the intended behaviour. And nobody ever considered how a third level navigations looks like if you still have items on the second level.
Okay - What's your "get go" on this then? 😅
Plus - even the first-level looks off. See this:
The "Dashboard" has paddings and such. Everyone else - nope.
Hm. Yeah, you are right. No idea. Your code looks right. Are you using a custom theme? Can you disable it to check whether it works without it?
I think I do, but I don't know how to disable it without breaking vite build... 😅
Just remove the registration from your AppServiceProvider
ah - that removed it. but no effect on the paddings tho.
stuff is just yellow now... 🙂
Did you overwrite any view files?
just the brand.blade.php. it contains only this
<img src="{{ asset('/images/logo/logo_mit_text.png') }}" alt="Logo" class="h-10">
Hm. Weird.
What if you remove that 3rd level?
Werkzeuge gone?
But nothing else changed?
Can you do a
php artisan filament:upgrade
?No change.
I'm out of ideas, sorry.
I mean what else is supposed to happen if the navigation label is too long for the width anyway? Keep the label short because if it’s too long it will probably go to the next line
Where do you see a too long label? All have plenty of space to the right
The issue is that "Dashboard" has some padding and the first group "Artikelverwaltung" doesn't have it.
Yep. It's like this since the beginning actually... I just didn't mind until now... 😅
Is your Filament version up to date?
just ran composer update right now. no changes.
Oh sorry I thought “Werkzeuge Versandmanagement” was one label
Interestingly - when I move an item out of a group it works fine, but only for said item...
So the group seems to break it...
I've tested some more and I am able to replicate that behaviour in a pristine laravel-installation.
Can you provide a github repo with this so we can test?
I am actually testing some more myself and prepare a bug-report.
https://github.com/filamentphp/filament/issues/6939 -> Github-Repo inside the issue
GitHub
Custom built NavigationGroup messes up paddings and margins in side...
Package filament/filament Package Version v2.17.50 Laravel Version v10.14.1 + v9.52.10 Livewire Version No response PHP Version PHP 8.1.17 Problem description Using the following code inside the Ap...