tune
tune copied to clipboard
give .notes an extra class
so that we can have a typesum method that prints something like <0w3e> or similar
Wait on https://github.com/r-lib/pillar/issues/173
We could not use vctrs::list_of and make our own list class that holds tbl_notes, but I'd rather use vctrs
Why not keep.notes a list column and just add a class to the tibble that we get back from the output?
EDIT I guess my title implied giving the whole column a class. I'd rather the elements of the list have a class.
I tried that, and I think we need to do that, but the way it currently works with pillar is:
pillar:::pillar_shaft.listis called to generate the whole pillar column- It calls
pillar:::obj_sum.listto format the column elements - Unfortunately that function is just
map_chr(x, obj_sum.default)(map over the elements of the list, which would be our notes tibbles, and call the default obj_sum)
And pillar:::obj_sum.default does not give us enough control. It really should be pillar::obj_sum (the generic) in my opinion but that didn't happen. An issue requesting that that happen (r-lib/pillar#137) was closed in favor of using the vctrs_list_of method, but that isn't enough either