Refactor SVG handling for loading indicator#19435
Open
Shaharyar-WebDev wants to merge 1 commit intofilamentphp:4.xfrom
Open
Refactor SVG handling for loading indicator#19435Shaharyar-WebDev wants to merge 1 commit intofilamentphp:4.xfrom
Shaharyar-WebDev wants to merge 1 commit intofilamentphp:4.xfrom
Conversation
Refactor loading indicator SVG handling to use a custom SVG if configured otherwise use default SVG. Signed-off-by: Shaharyar Ahmed <shery.codes@gmail.com>
danharrin
requested changes
Mar 6, 2026
Member
danharrin
left a comment
There was a problem hiding this comment.
I don't think that a config file is suitable for this sort of change to be honest. How about we ask the user to bind an Htmlable object to the container via a specific interface from Filament, that receives the attributes object in the constructor?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor loading indicator SVG handling to use a custom SVG if configured, otherwise use default SVG.
Description
Refactored
generate_loading_indicator_html()to support a custom SVGloading indicator via the
filament.loading_indicator_svgconfig key.Previously, the SVG was hardcoded inline. Now the function:
config('filament.loading_indicator_svg')for a custom SVG string__attributes__placeholder with the resolvedComponentAttributeBagattributes (classes, wire:loading, etc.) andreturns that instead
This keeps full backwards compatibility — existing apps with no config
value set will see zero change in behaviour or appearance.
Visual changes
If a user sets
loading_indicator_svgintheir
filament.phpconfig, their chosen SVG will render in place ofthe default spinner.
See Visuals
Functional changes
composer cscommand.