Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect tab_stubhead() in opt_interactive()+ fix rendering for missing row names #1758

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Jul 8, 2024

Follow-up to #1702, #1705. Fixes some rough edges for new feature introduced in #1711 and #1725

Intent is respecting tab_stubhead() in opt_interactive(), by adding name to groupname colDef() or rownames where appropriate.

I noticed that sub_missing() (and probably all sub_*() is ignored in opt_interactive(), but that will require more work another time!

For clarity, I also factored out the translations since the intermediate variables are not useful for the final output.

Before this PR,
image

exibble |> gt::gt(rowname_col = "num", groupname_col = "group") |> tab_stubhead("row name to show") |> opt_interactive()

With this PR, stubhead label shows and NAs are correctly marked as NA instead of ...6

olivroy added 2 commits July 8, 2024 08:59
…names + add comments about future `sub_missing()` support in `opt_interactive()`
@olivroy olivroy requested a review from rich-iannone July 8, 2024 14:15
@olivroy olivroy changed the title Improve stubhead in opt_interactive() Respect tab_stubhead() in opt_interactive()+ fix rendering for missing row names Jul 8, 2024
@olivroy olivroy mentioned this pull request Jul 8, 2024
21 tasks
@olivroy olivroy changed the base branch from master to v0.11.0-rc July 8, 2024 14:18
@olivroy olivroy added this to the v0.11.0 milestone Jul 8, 2024
R/render_as_i_html.R Outdated Show resolved Hide resolved
R/render_as_i_html.R Outdated Show resolved Hide resolved
Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@rich-iannone rich-iannone merged commit b0b43aa into rstudio:v0.11.0-rc Jul 8, 2024
1 check passed
@olivroy olivroy deleted the msg-errors branch July 8, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants