Skip to content

Fix: scope JS asset registration to panel context only#61

Merged
awcodes merged 1 commit into
3.xfrom
fix/scope-asset-to-panel-context
May 21, 2026
Merged

Fix: scope JS asset registration to panel context only#61
awcodes merged 1 commit into
3.xfrom
fix/scope-asset-to-panel-context

Conversation

@awcodes
Copy link
Copy Markdown
Owner

@awcodes awcodes commented May 21, 2026

Summary

  • Moves FilamentAsset::register() from StickyHeaderServiceProvider::packageRegistered() into StickyHeaderPlugin::boot()
  • The asset is now only registered when Filament boots the plugin within a panel, so it won't appear on non-panel pages that use @filamentScripts
  • Cleans up the now-unused Js and FilamentAsset imports from the service provider

Test plan

  • Confirm the sticky header JS loads correctly on panel pages
  • Confirm the sticky header JS does not load on non-panel pages that use @filamentScripts

🤖 Generated with Claude Code

Moves FilamentAsset::register() from the service provider into the plugin's boot() method so the asset is only loaded when a panel is active, not on every page using @filamentScripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@awcodes awcodes merged commit 176ae24 into 3.x May 21, 2026
5 checks passed
@awcodes awcodes deleted the fix/scope-asset-to-panel-context branch May 21, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant