adnn
Explore posts from serversUse same infolist as page and modal when needed?
I am using it inside the AppServiceProvider, to extend the Ralph Media plugin
Basically trying to add a button on each image in the media page, that will quickly open a view modal of it's parent Review, so you can see where each image is used.
7 replies
Baptiste job monitor multi tenancy?
I added protected static bool $isScopedToTenant = false;
to the Resource in the vendor folder directly just to see, and it fixed it, so it seems like just my resource extends is wrong, any ideas about that? I'm not OOP knowledgable
7 replies
Better performance?
How does this work with HTML?Yeah it'd have to be JS
Hm. It would change the current behaviour though. People expect it to "just work" so we probably can't ship that with v3.->font('Inter') if font in fonts/ try $url= asset('font') else use default cdn doesn't change any behaviour, and it's prefferable to use the local font if you have it
73 replies
Better performance?
I don't know enough about Laravel to understand why a new package is needed, can't you just ship files of one default font and import it url('fonts/whatever') or just use system fonts?
And then if you use a custom one, you choose a CDN or install it locally yourself and that's it. Bunny has a PoP here in Ljubljana, and it still doesn't work, I've never had issues with Google fonts but I know it comes with a privacy sacrifice.
Another solution could be just manually timing out the request instead of waiting, no font should be taking more than a second to load and even that's very high
73 replies
Better performance?
Haha exactly my point. Every single navigation in Filament would call Bunny font CDN, which was not resolving properly and it was practically unusable because it was waiting for it to timeout before doing anything. Sometimes taking even 10 seconds for a view to load. It was also happening seemingly random, half of my team complained, the other half had no problems, so a pain to debug.
I started debugging queries and setups, until it happened to me, as soon as I switched to GoogleFonts, our performance skyrocketed. I'm not joking when I say it's 10x faster. So yes, Filament is fast, but for some reason a font is able to brick it completely.
I'd probably just have the Inter shipped as a static font and fallback to it
73 replies
Better performance?
There's nothing really for me to reproduce, as the issue is with the external CDN and Filament's handling of ->font and not some code I wrote. I already wrote what I found out in as much detail as I can.
@awcodes Sure but unless you have a specific reason to do it, you will not take a second look at the ->font which uses Bunny by default and is prominent in the documenation. This was such a pain to debug as it was happening in rare cases, costing us a lot of time for something so trivial. In any case, I think a font CDN of all things should not have such a vital role to the point that it is able to degrade the performance of the entire app, at the very least it should just go back to the default Inter font.
73 replies
Better performance?
@awcodes @toeknee
Hey, I'm tagging you directly because I resolved this and believe the cause might be some sort of bug.
Initially my AdminPanel was set up with
->font('Poppins')
Which was trying to reach https://fonts.bunny.net/css?family=poppins:400,500,600,700&display=swap
For me this endpoint resolves in Firefox, but does not in Chrome or Brave (no blockers of any kind). Filament was waiting for the pending request until it timed out, and only then loaded the pages.
When I switched to
->font('Poppins', provider: GoogleFontProvider::class)
my performance improved drastically, literally 10x loading speed of tables. In any case, whether the issue is with Bunny, chrome or whatever, I think Filament should not be so hard dependant on an external CDN to the point that it bricks the entire app, especially not for a font of all things. It should fallback on Google fonts if the request is pending for too long.
I saw a similar issue from this guy on GitHub, https://github.com/filamentphp/filament/issues/7987 which was rather rudely closed by @Dan Harrin without any consideration.
73 replies