Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Ui Switcher Laravel Package

andreia/filament-ui-switcher

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Modular & Plugin-Based: The package is a Filament plugin, aligning well with Laravel’s modular architecture. It leverages Filament’s existing UI components (e.g., topbar icons, modals) without requiring deep architectural changes.
  • UI-Centric: Focuses on user experience customization (theming, layout) rather than core business logic, making it a low-risk addition for teams prioritizing UX polish.
  • Fluent Configuration Surface (v1.1.2): The release adds fluent methods to disable and configure individual sections programmatically. This shifts configuration from published-config-file editing toward config-as-code in the panel provider, which is a meaningfully better fit for teams managing multiple panels/environments and for code-reviewed configuration changes.
  • Self-Hosted Fonts (v1.1.2): Local font support removes the implicit dependency on external font CDNs. This improves fit for air-gapped, on-prem, and GDPR-sensitive deployments where third-party asset calls are disallowed.
  • Filament Ecosystem Lock-in: Tightly coupled with Filament 4/5, meaning adoption requires Filament as a dependency. If the project already uses Filament, this is a zero-cost extension.

Integration Feasibility

  • Low Friction: Installation is via Composer (andreia/filament-ui-switcher), with minimal configuration (publish assets, register plugin in app/Providers/FilamentPluginServiceProvider.php).
  • Reduced Config Surface (v1.1.2): Fluent methods allow enabling/disabling sections (e.g., mode toggle, font controls) inline during plugin registration — publishing the config file is now optional for common cases. This shortens setup and lowers the chance of config drift between environments.
  • Livewire Dependency: Relies on Livewire for modal/interactivity, which is already a Filament requirement. No additional JS frameworks (e.g., Vue/React) needed.
  • Database vs. Session Storage: Offers flexibility to store preferences in session (default) or database (user-specific persistence). Database storage requires a user_preferences table migration.
  • Asset Footprint Note: Local font support may increase published asset size (bundled font files) unless the release uses subset/woff2-only files. Confirm asset size during install and whether fonts can be excluded if the project already self-hosts its typeface.

Technical Risk

  • Filament Version Compatibility: Risk of breaking changes if the project upgrades/downgrades Filament major versions (e.g., 4.x → 5.x). Test thoroughly post-upgrade.
  • CSS/JS Conflicts: Custom Filament themes or global CSS may override the switcher’s styles. Requires CSS specificity checks during integration.
  • Font Loading Conflicts (new): Local font support can collide with existing @font-face declarations or Tailwind fontFamily config, producing duplicate font loads or FOUT. Audit which font source wins before rollout.
  • API Surface Growth: Fluent section methods are a new public API. If the team adopts them heavily, the upgrade path becomes coupled to that API’s stability — pin the version and check method signatures on minor upgrades.
  • Performance Impact: Minimal, but modal storage (especially database) could add microseconds of latency per request if overused. Monitor query logs.
  • Localization: Still no built-in RTL or multi-language UI label support; local font support partially addresses typography for global teams but not translation or RTL layout.

Key Questions

  1. Does the project already use Filament 4/5? If not, this package is non-starter.
  2. Does the project already self-host fonts? If yes, disable the packaged font path to avoid duplicate downloads.
  3. Which sections should be exposed per panel? Use the new fluent disable methods to scope the switcher (e.g., fonts on admin, colors on tenant panels).
  4. Are user preferences critical to persist? If yes, database storage adds complexity (migration, backup).
  5. How are global UI themes currently managed? Overlapping CSS (e.g., Tailwind config) may require coordination.
  6. Is Livewire already optimized? Poorly configured Livewire could amplify modal latency.
  7. What’s the upgrade path for Filament? Ensure the package supports future Filament versions.

Integration Approach

Stack Fit

  • Laravel 11/12 + Filament 4/5: Native fit. No stack changes required.
  • Livewire 3/4: Already a Filament dependency; no additional setup.
  • Tailwind CSS: The package uses Tailwind for styling. If the project uses a custom Tailwind config, ensure no conflicts (e.g., duplicate font-family classes).
  • Font Pipeline (v1.1.2): Local font delivery means the package ships font assets. Decide whether to serve them from the app origin (simplest, works offline) or exclude them and map to your existing brand font via config.
  • Database: Only needed for user-specific storage (via user_preferences table). Uses Laravel’s Eloquent.

Migration Path

  1. Pre-Integration:
    • Verify Filament version compatibility (composer show filament/filament).
    • Check for existing UI customizations (e.g., global CSS, Tailwind overrides, self-hosted fonts).
  2. Installation:
    composer require andreia/filament-ui-switcher
    php artisan vendor:publish --tag="filament-ui-switcher-assets"
    
    • Register the plugin in app/Providers/FilamentPluginServiceProvider.php:
      public function register(): void
      {
          FilamentPlugin::register(\Andreia\FilamentUISwitcher\FilamentUISwitcherPlugin::make());
      }
      
  3. Configuration:
    • Preferred (v1.1.2): Configure via fluent methods at registration — disable sections you don’t want to expose and set defaults without a config file.
    • Optional: Publish config (filament-ui-switcher.php) only for settings not covered fluently.
    • If using database storage, run:
      php artisan migrate
      
      (The package provides a migration for user_preferences.)
  4. Post-Integration:
    • Test modal functionality in all Filament panels/pages.
    • Verify section toggling behaves as expected per panel (fluent config applied to the right panel).
    • Validate font rendering across browsers; confirm no duplicate @font-face loads.
    • Validate storage behavior (e.g., session vs. database persistence).
    • Audit for CSS/JS conflicts (e.g., !important overrides).

Compatibility

  • Filament Plugins: Safe to use alongside other Filament plugins (e.g., notifications, widgets). Modals are scoped to the topbar.
  • Custom Filament Panels: Works with custom panels, but panel-specific CSS may override switcher styles. Fluent per-panel configuration makes divergent panel behavior easier to manage.
  • Multi-Tenant: Database storage supports tenant-specific preferences if using tenant_id in the user_preferences table.
  • Minimum Version: v1.1.2 is a minor, additive release — no deprecations noted. Existing v1.1.x integrations should upgrade without code changes.

Sequencing

  1. Phase 1: Install and configure in staging with session storage; use fluent methods to expose only the sections in scope.
  2. Phase 2: Test with a subset of users; gather feedback on UX and on the local font rendering.
  3. Phase 3: Enable database storage if persistence is critical.
  4. Phase 4: Deploy to production with monitoring for:
    • Modal load times.
    • Font asset requests / page weight delta.
    • Database query performance (if enabled).
    • User adoption (e.g., analytics on toggle usage).

Operational Impact

Maintenance

  • Vendor Updates: Monitor for Filament 5.x compatibility if upgrading. The package is actively maintained (latest: v1.1.2, 2026-04-26) and shipping iterative features — treat as actively developed but pre-2.0, so pin minor versions.
  • Configuration Drift: Fluent config lives in the panel provider and is version-controlled and reviewable, reducing the risk of environment-specific config files diverging.
  • Customization Overrides: If the project extends Filament’s default UI, the switcher may need forking for long-term maintenance.
  • Dependency Bloat: Adds ~100KB of assets (CSS/JS) plus any bundled font files after v1.1.2. Re-measure published asset size in CI to catch growth.

Support

  • Troubleshooting:
    • Modal Not Showing: Check FilamentPluginServiceProvider registration.
    • Section Missing/Disabled: Confirm fluent configuration is applied to the correct panel instance.
    • Font Not Loading: Check published asset path, MIME types, and any CDN/CSP rules blocking font-src.
    • CSS Overrides: Inspect browser dev tools for conflicting styles.
    • Database Issues: Verify user_preferences table and migration.
  • Documentation: README covers install and, as of v1.1.2, the fluent API. Advanced scenarios (multi-tenant, custom font mapping) may still need internal runbooks.
  • Community: Low stars (23) suggest limited community support. Prioritize Filament’s official channels first.

Scaling

  • Performance:
    • Session Storage: Zero impact; preferences stored in-memory.
    • Database Storage: Additive load on user_preferences table. Index user_id to optimize queries.
    • Modal Rendering: Livewire hydration adds ~50–100ms per page load (benchmarked in Filament apps).
    • Local Fonts: Self-hosted fonts typically improve first-paint consistency vs. third-party CDNs (no extra DNS/TLS handshake), at the cost of app-origin bandwidth. Ensure long-lived cache headers on font assets.
  • Concurrency: No known bottlenecks. Modals are user-specific.
  • Global Deployments: Local fonts now avoid region-specific CDN blocking, which simplifies rollouts in restricted networks; still test time-zone/session consistency.

Failure Modes

Failure Scenario Impact Mitigation
Filament version incompatibility Switcher breaks or renders poorly Pin package version; test upgrades early.
Fluent API change on upgrade Disabled sections reappear Pin minor version; smoke-test panel config post-upgrade.
Font asset blocked by CSP Missing/fallback typeface Update font-src in CSP; verify asset path.
Duplicate @font-face loads Extra page weight, FOUT Disable packaged fonts or align with brand font config.
Database storage corruption Lost user preferences Backup user_preferences table.
CSS conflict with custom themes Modal styles override project UI Use !important sparingly; inspect conflicts.
Livewire misconfiguration Modal fails to load Verify Livewire version and config.
Session storage exhaustion Rare; but could cause memory issues Monitor session table size.

Ramp-Up

  • Developer Onboarding:
    • Time to Proficiency: 1–2 hours for basic setup (lower than before, since fluent config removes the config-file step); 4+ hours for advanced customization (database storage, font mapping).
    • Key Skills Needed: Familiarity with Filament plugins, Livewire, and Laravel migrations; basic understanding of @font-face/CSP for the font feature.
  • User Training:
    • End-User Adoption: Minimal training needed; modal is intuitive (⚙️ icon in topbar). Section scoping means fewer options to explain.
    • Power Users: May need guidance on resetting preferences or understanding storage options.
  • Rollback Plan:
    • Partial Rollback: Disable plugin via FilamentPlugin::disable() in boot(), or re-enable a section removed by fluent config.
    • Full Rollback: Uninstall via Composer; revert migrations if using database storage; remove published font assets from the public directory.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc