Closed moodymudskipper closed 3 years ago
As Deemah suggests, having the column headers colored differently would be awesome.
Implemented in 14872bf8323911d62b5f30a0a607f5952040a5ca
A bit hacky, but not all that awful and the result is neat.
Reopening after @jonocarroll 's PR.
highlighting columns is better than highlighting headers.
I have an additional crazy idea, maybe we can tweak something so when the object is a tibble, but not a reactibble, reactive columns print in bright red "out of sync" and a warning proposes to use as_reactibble on the object.
e536300ff9131fa9bc01f423f53e00cf5deb4455 builds on @jonocarroll 's PR (thanks!) to print columns in color, aside from format they print just like the originals.
We had to jump through hoops because our "reactive_col" class can contain different types and {pillar} isn't really made with this case in mind. It works well in the end and I believe it's robust.
Interestingly we don't even need a printing method now since a reactibble is a tibble, it's all forwarded to pillar automatically.
At the moment there's none, I just hacked how tibble prints the column headers and added a new class to the column, but that's really not great.
Because of it numeric columns are aligned differently and the values aren't rounded the same.
We need clean code using pillar and tibble to properly show the headers, I think the headers can stay the same.
the table header should say "reactibble", not "tibble".