visualbuilder/filament-screenshot-review
Install the package in a Filament v5 project:
composer require --dev visualbuilder/filament-screenshot-review
php artisan migrate
Mount the plugin in your Filament panel provider (e.g., DesignSystemPanelProvider):
->plugins([
\Visualbuilder\FilamentScreenshotReview\Filament\FilamentScreenshotReviewPlugin::make(),
])
Register pages (one-time sync):
php artisan screenshot-review:sync-pages --panel=design-system
Trigger captures (e.g., via CI/CD or manually):
php artisan screenshot:dispatch --panel=design-system --tag=latest
Sync captures to the review dashboard:
php artisan screenshot-review:sync-captures --panel=design-system --tag=latest
TicketSink.Page Management:
sync-pages to populate the sitemap from filament-panel-screenshot-catalogue.Capture Dispatch:
screenshot:dispatch into your deployment pipeline (e.g., post-build).latest, v1.0) for traceability.Review Loop:
Ticket Sinks:
Implement TicketSink for your issue tracker (e.g., Jira, GitHub Issues). Example:
class JiraTicketSink implements TicketSink {
public function file(string $title, string $description, array $metadata): string {
// API call to Jira...
return $ticketUrl;
}
}
Automation:
Chain commands in a script (e.g., sync-pages → dispatch → sync-captures).
Example (Bash):
php artisan screenshot-review:sync-pages --panel=design-system
php artisan screenshot:dispatch --panel=design-system --tag=latest
php artisan screenshot-review:sync-captures --panel=design-system --tag=latest
Custom Metadata:
Extend capture cards by publishing views or modifying the plugin’s CaptureCard component.
Tag Mismatch:
--tag in dispatch and sync-captures match. Mismatches cause orphaned captures.Permission Issues:
screenshot_review.*).Empty Captures:
sync-captures yields no results, check:
tag exists in the catalogue’s storage.panel name matches the catalogue’s configuration.TicketSink Failures:
NullSink logs errors but doesn’t block. Override to handle failures gracefully (e.g., retry logic).Artisan Commands:
Use --verbose for detailed output:
php artisan screenshot-review:sync-captures --panel=design-system --tag=latest -v
Database:
Inspect screenshot_review_captures and screenshot_review_pages tables for sync issues.
Custom Status Indicators:
Override the StatusCard widget to add custom metrics (e.g., "Critical Bugs").
Capture Filters:
Extend the Captures grid with custom filters (e.g., by created_at or status).
Notification Triggers:
Listen to CaptureApproved/CaptureRequested events to send Slack/email alerts:
Event::listen(\Visualbuilder\FilamentScreenshotReview\Events\CaptureRequested::class, function ($event) {
// Send notification...
});
Storage Backend:
Modify the CaptureRepository to support alternative storage (e.g., S3) for images.
Panel Defaults:
The plugin assumes a design-system panel by convention. Explicitly specify --panel in commands to avoid ambiguity.
Concurrent Runs:
Avoid running dispatch or sync-captures concurrently for the same panel/tag to prevent race conditions.
How can I help you explore Laravel packages today?