Open shrektan opened 4 years ago
Notes...
From a distance...
Since this was merged before the dt_*
method conversion,
groupname
lines): https://github.com/rstudio/gt/blob/284bbe57597c9547b298a1472ae1b4f7fd5e5558/R/dt_stub_df.R#L33is.na(stub_df$groupname)
since it'll be a list column? vapply(stub_df$groupname, is.na, logical(1))
?Small test cases: (assuming html
printing)
## Does contain an `AsIs` class in the column
data.frame(
group = I("<strong>x</strong> > 30"),
value = seq(1, 5)
) %>%
gt(groupname_col = "group")
## Fully defined list column of html content
tibble::tibble(
group = list(htmltools::HTML("<strong>x</strong> > 30")),
value = seq(1, 5)
) %>%
gt(groupname_col = "group")
###
# Does not set up column properly... `group` is a `Factor` heading into `gt`.
# This should produce unexpected results!
###
data.frame(
group = htmltools::HTML("<strong>x</strong> > 30"),
value = seq(1, 5)
) %>%
gt(groupname_col = "group")
After PR #252, the row group label will be escaped. However, the user (like me) may need some styled or complicated row group label. I was able to do this by using the raw HTML text as the group column value. Now, it displays raw HTML text and the "escaping behavior" seems unavoidable.
I think being able to use raw HTML text as the row group label is a nice-to-have feature. So I'm here to ask for a feature request.
Thanks.