filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.39k stars 2.97k forks source link

Improve sync connection support for `ExportAction` #14854

Open ralphjsmit opened 1 day ago

ralphjsmit commented 1 day ago

It can be very helpful to run an export on the sync queue if it does not take too long and then immediately display a notification to download it, instead of needing to wait on a job being picked up by a queue and then monitoring the notifications bell icon. In my tests running an export in sync was even quicker than waiting for an (empty) queue to pick it, process all the individual batch parts and then send back to the user. Particularly for less tech-savvy users this is not intuitive.

The ExportAction can already run on the sync connection, but this PR improves support for that by removing the first export started notification and changing the export completed notification to a persistent in-page notification.

Scherm­afbeelding 2024-11-20 om 21 11 51

Thanks!

ralphjsmit commented 1 day ago

Thanks! Yeah I also like the exports feature, so glad to add some improvements based on real-life cases.

The biggest thing yet I would really wish for on exports is the ability to format (Excel) cells to their native type (like integer, money), text formatting and set column widths. But that unfortunately seems very difficult/unsupported on the OpenSpout package...

Update: it seems to be possible to style on row-level already, but not yet on the individual/cell column level. Though I dived a bit more and OpenSpout does seem to support passing individual Style objects to individual Cells, so perhaps if we can re-work our logic a little that could work out... 🤔

Update: leaving this here for later reference: https://github.com/openspout/openspout/blob/4.x/src/Writer/XLSX/Manager/Style/StyleRegistry.php

zepfietje commented 1 day ago

Interesting! Keep us posted when you've experimented with that. 😄