Skip to content

Allow use of NULL to remove any previously set source notes, footnotes, and spanner column labels#875

Closed
rich-iannone wants to merge 10 commits intomasterfrom
nullify-notes
Closed

Allow use of NULL to remove any previously set source notes, footnotes, and spanner column labels#875
rich-iannone wants to merge 10 commits intomasterfrom
nullify-notes

Conversation

@rich-iannone
Copy link
Copy Markdown
Member

This will allow NULL to be valid input in tab_source_note() and tab_footnote(). In these, NULL isn't already used to signify a missing option, and, this change will bring the behavior closer to that of tab_header().

Fixes: #790

@rich-iannone rich-iannone changed the title Allow use of NULL to remove any previously set source notes and footnotes Allow use of NULL to remove any previously set source notes, footnotes, and spanner column labels Feb 3, 2022
@rich-iannone rich-iannone marked this pull request as ready for review February 3, 2022 21:50
@rich-iannone rich-iannone requested a review from jcheng5 February 3, 2022 21:50
@jcheng5
Copy link
Copy Markdown
Member

jcheng5 commented Feb 4, 2022

After discussing with @rich-iannone--I don't like this approach with functions where repeated calls result in additive effects (i.e. calling tab_footnote multiple times on a cell results in multiple footnotes, not just the most recent footnote). It's surprising to me that if you pass in a NULL, suddenly it affects all the previous calls as well. I'd prefer a tab_clear_footnote or something--or maybe tab_footnote(replace = TRUE)?

@rich-iannone
Copy link
Copy Markdown
Member Author

Closing this in favor of the better approach afforded by #1073.

@rich-iannone rich-iannone deleted the nullify-notes branch October 11, 2022 17:46
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.

Add option to override tab_source_note()

2 participants