- How do I install this package in my Laravel Filament project?
- Run `composer require devletes/filament-timeline-view` and execute `php artisan filament:assets` to publish the CSS. No service provider registration is needed—the package auto-loads.
- Does this work with Filament 4 or older versions?
- No, this package requires **Filament Tables ^5.0** and **PHP ^8.2**. Projects using older versions will need to upgrade or fork the package for compatibility.
- Can I customize the timeline’s appearance beyond CSS variables?
- Yes. The `TimelineEntry` column is a layout component, so you can replace it with `Stack::make()` or other Filament columns. For deeper styling, override CSS classes like `.fi-ta-timeline` in your panel’s assets.
- What data structure does the timeline expect?
- The package assumes date-grouped data (e.g., `published_at` column) and uses Filament’s query builder for sorting. If your model lacks a date field, use `TimelineEntry::make()->dateColumn('custom_date')` or custom closures.
- Will this break my existing Filament table pagination?
- No, but the timeline replaces default pagination with a ‘Load more’ button. If you need both, handle pagination manually in your query or use Filament’s `->paginated()` alongside the timeline macros.
- Can I use this outside a Filament panel (e.g., in a widget)?
- Yes! The package works in Filament widgets, resource list pages, or any context where `filament/tables` is available. No full Filament panel is required.
- Are there performance concerns with large datasets?
- The ‘Load more’ button loads data in chunks, reducing initial load time. For optimization, ensure your query uses efficient indexing on the date column and consider lazy-loading heavy relationships.
- How do I add custom actions to timeline cards?
- Use Filament’s `recordActions()` method to define dropdown actions (e.g., edit, delete). These appear in the kebab menu on each card, separate from the ‘View’ link (if `recordUrl` is set).
- Does this package support reverse chronological order?
- No, the timeline defaults to descending order (`published_at DESC`). For reverse order, override the query in your table or use a custom `TimelineEntry` layout with reversed sorting logic.
- Is there a test suite or documentation for edge cases?
- The package includes basic tests but lacks extensive edge-case documentation. For production use, test empty groups, malformed data, and collapsible day behavior. Report issues to the GitHub repo for updates.