Open star formatter tweaking parameters
The star formatter is already working well, and I can still define my own/custom formatter if I want to tweak anything, in that regard, I do not really need anything right now. That being said, it would be very convenient to open a bit the built-in star formatter to allow tweaking it easily without fully redefining our own (copy/pasting existing one).
I'd basically like to change the colors (fill & stroke, for active/inactive).
I see 2 (non exclusive) possibilities for this, which would be backward compatible and following formatter parameters pattern already available.
- add classes to allow CSS theming, basically
- having a class on cell (
class="stars") to indicate it's a star formatter being used to present data might be nice - and mandatory
class="star active"orclass="star inactive"depending on the state
- having a class on cell (
- open formatter parameter to tweak these colors (with default values)
With 1., it's not invasive at all, not too much opinionated and answer the main need. With 2., it makes configuration more "local" close to the tabulator configuration.
I can open a pull request for this, but before investing time on that, I'd prefer asking for advice and if anyone follow me on this or not.
For deeper tweaking, I guess it would be more suitable to fully redefine the formatter. I do not expect these parameters to fully control every bits of the stars.
Source: tabulator-tables/tabulator