Harvey
Harvey
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Yeah cheers. I just didn't want to give up those animations😂
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Ok have figured it out with:
.fi-no {
@apply !items-center !flex-col-reverse !justify-end;
}

.fi-no .translate-x-12 {
@apply -translate-y-12 translate-x-0;
}
.fi-no {
@apply !items-center !flex-col-reverse !justify-end;
}

.fi-no .translate-x-12 {
@apply -translate-y-12 translate-x-0;
}
which makes it slide in from the top (and is in the middle) like default
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Is this what you are seeing?
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
But it still slides in from the right? The animation I mean
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Yes, but it does not have the correct transition - it's still coming in from the right
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Appreciate your time on this. I have decided to go with checking the request()->header('referer') and seeing if it has my /admin in there. If it does then we can assume we're on the frontend. That was it'll also retain the correct transition-in. In my service provider:
if (request()->hasHeader('referer') && ! str_starts_with(request()->header('referer'), url('/admin'))) {
Notifications::alignment(Alignment::Center);
Notifications::verticalAlignment(VerticalAlignment::Start);
}
if (request()->hasHeader('referer') && ! str_starts_with(request()->header('referer'), url('/admin'))) {
Notifications::alignment(Alignment::Center);
Notifications::verticalAlignment(VerticalAlignment::Start);
}
Seems to work for my case.
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
https://github.com/harvey-4thd/filament-notification-position here's a repo with the issue reproduced. Fullpage livewire component, with that custom middleware. You can click the button to test the notification.
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Just tried your code verbatim too.
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
Tried that. Sadly it does not apply them when I send a notification. Still pops up from the top-right.
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
I'm using them outside of a panel too though
21 replies
FFilament
Created by Harvey on 1/3/2025 in #❓┊help
Different toast alignments for frontend
yep
21 replies
FFilament
Created by Harvey on 10/23/2024 in #❓┊help
How to import Alpine in custom script
Cheers, all working.
10 replies
FFilament
Created by Harvey on 10/23/2024 in #❓┊help
How to import Alpine in custom script
Well the error is gone... so I think this was it thanks😄 Will accept it once I test it
10 replies
FFilament
Created by Harvey on 10/23/2024 in #❓┊help
How to import Alpine in custom script
Alpine.data('popup', () => ({
open: false,
}));
Alpine.data('popup', () => ({
open: false,
}));
Register a reusable Alpine data obj
10 replies
FFilament
Created by Harvey on 10/23/2024 in #❓┊help
How to import Alpine in custom script
Already using that command. Unfortunately, just copies it to the public folder.
10 replies
FFilament
Created by Harvey on 10/22/2024 in #❓┊help
Collapsible Content - Keep Column Headers
Thanks. Suspected this might be the case.
5 replies
FFilament
Created by Harvey on 8/13/2024 in #❓┊help
Spatie/translatable cannot mutate prop $activeLocale in relation manager
Update: Can bodge it by adding
public function __construct()
{
$this->activeLocale = config('app.locale');
}
public function __construct()
{
$this->activeLocale = config('app.locale');
}
to the relation manager
2 replies
FFilament
Created by Harvey on 4/29/2024 in #❓┊help
Reuse macro callbacks for multiple classes
Found you can just macro a more general class ViewComponent that's inherited by Field, Column, Entry etc. Not perfect but it'll work.
4 replies
FFilament
Created by Harvey on 4/19/2024 in #❓┊help
Custom table columns per table tab
Awesome, thanks guys for the answers. I'll go with the custom code one for now, but that plugin definitely looks functionality packed.😄
6 replies
FFilament
Created by Harvey on 1/31/2024 in #❓┊help
TextEntry placeholder not working for related models
$table->text('description')->nullable();
$table->text('description')->nullable();
6 replies