Skip to content

Document missing elements in theme()#6829

Open
arcresu wants to merge 8 commits intotidyverse:mainfrom
arcresu:doc-theme
Open

Document missing elements in theme()#6829
arcresu wants to merge 8 commits intotidyverse:mainfrom
arcresu:doc-theme

Conversation

@arcresu
Copy link
Copy Markdown
Contributor

@arcresu arcresu commented Apr 1, 2026

This closes #6827 by adding documentation for the missing theme elements (mostly palettes), along with a new unit test to prevent regression.

Happy to change the wording of course. There were many choices to group the palette params and I'm not sure of the best place to point to explain the values accepted.

@arcresu
Copy link
Copy Markdown
Contributor Author

arcresu commented Apr 1, 2026

Ah, the test failure is coming from a different place and is now exposed by the new params for theme():

 ══ Failed tests ════════════════════════════════════════════════════════════════
 ── Failure ('test-theme-sub.R:48:3'): theme elements are covered in `theme_sub_*()` functions ──
 Snapshot of code has changed:
 old[12:16] vs new[12:24]
     [17] "axis.minor.ticks.r"            "axis.ticks.length.theta"      
     [19] "axis.ticks.length.r"           "axis.minor.ticks.length.theta"
     [21] "axis.minor.ticks.length.r"     "axis.line.theta"              
 -   [23] "axis.line.r"                   "complete"                     
 -   [25] "validate"                     
 +   [23] "axis.line.r"                   "palette.colour.discrete"      
 +   [25] "palette.colour.continuous"     "palette.fill.discrete"        
 +   [27] "palette.fill.continuous"       "palette.alpha.discrete"       
 +   [29] "palette.alpha.continuous"      "palette.linewidth.discrete"   
 +   [31] "palette.linewidth.continuous"  "palette.size.discrete"        
 +   [33] "palette.size.continuous"       "palette.shape.discrete"       
 +   [35] "palette.shape.continuous"      "palette.linetype.discrete"    
 +   [37] "palette.linetype.continuous"   "strip.placement.x"            
 +   [39] "strip.placement.y"             "complete"                     
 +   [41] "validate"     

So I guess the question is do we also need theme_sub_palette()? I'll add for now.

@arcresu
Copy link
Copy Markdown
Contributor Author

arcresu commented Apr 1, 2026

The remaining CI failure appears to be unrelated to the changes.

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.

Docs for theme() missing some elements

1 participant