- What is daikazu/filament-size-visualizer-field used for?
- It adds an interactive visual preview to size inputs in Filament forms so editors can see dimensions, font sizes, or spacing as they type instead of guessing from a number. You drop the field into a resource or form to replace a plain numeric input with a WYSIWYG-style size control. The preview is rendered with a fabric.js canvas that has static and animated layers.
- How do I install daikazu/filament-size-visualizer-field?
- Install it with Composer using the package name daikazu/filament-size-visualizer-field, then use the field in your Filament form schema. v2 requires PHP 8.3 or newer, Laravel 13, Filament v5, and the Tailwind v4 toolchain. Because the stack is pinned, confirm your application already meets those versions before adding the package.
- Does this package support Laravel 11 or Filament v3?
- No, v2 is a hard platform pin to PHP 8.3+, Laravel 13, Filament v5, and Tailwind v4, so it cannot be adopted on Laravel 11 or 12 with Filament v3. If you are not yet on that stack, v2 is not a candidate today. Check whether a maintained v1.x branch exists and what support window it offers before assuming older Laravel consumers are covered.
- Do I need Tailwind v4 to use this Filament size visualizer field?
- Yes for v2, which moves to the Tailwind v4 CSS-first toolchain and removes tailwind.config.js and postcss.config.js at the package level. The key question is whether the package ships precompiled CSS or expects your host application to compile its views, because a host still on Tailwind v3 cannot compile those assets without a parallel build. Confirm that before rollout, since this is the obstacle most likely to block adoption quietly.
- How do I add the size visualizer field to a Filament resource form?
- Use the field class provided by the package inside your Filament form schema in place of the existing numeric size input, similar to any other Filament form component. The package is intended for admin and back-office forms, not the customer request path. Check the README for the exact namespace and configuration options for your Filament v5 version.
- Why does my canvas render differently after upgrading to v2?
- v2 uses fabric.js v6/v7, where origin semantics changed so anchoring now starts from the bottom-left of the grid. Any saved geometry, snapshot, or test fixture produced under v1 can render differently after the upgrade. Rebuild golden-image or visual snapshot fixtures before merging and treat the visual diff as expected migration work.
- What happened to dynamicObjectSize() and getDynamicObjectSize() in v2?
- Both methods were removed from the public API in v2. The release notes say they were never wired up, but grepping your codebase and any downstream plugins for those names is cheap insurance against a fatal error. If you depended on them, plan a replacement before upgrading.
- Does the field work when Filament Livewire updates the form?
- The package is built for Filament forms, which are Livewire-driven, and v2 specifically addresses canvas vanishing on Livewire updates along with async coin races and listener leaks. It exposes resize-size-visualizer and dispose-size-visualizer events that you can use to coordinate redraw and cleanup. Treat those events as part of your integration contract and verify them in browser-level tests.
- Is the canvas preview accessible to keyboard and screen reader users?
- An animated canvas is a known accessibility gap, and the provided notes do not state a supported browser matrix or formal keyboard and screen-reader support. Before relying on it in a broad admin audience, test focus order, keyboard reachability, and whether any fallback text or input remains available. If accessibility is a hard requirement, treat this as an open question for the maintainer.
- How should I test a Filament size visualizer field?
- The test story is not fully described, so choose tests that match the failure modes: unit tests for field configuration and browser-level tests for the canvas. The v2 fix list includes async coin races, canvas vanishing on Livewire updates, and listener leaks, which are exactly the bugs that regress silently without browser tests. Pest browser tests plus golden-image or visual snapshot coverage are a reasonable baseline.