The code folding feature is quite useful, but I think its appearance could be improved. The button says "Show", which is a reasonable default given that what is folded may not be code. However, this ambiguity means that if all the code in folded in a document, it is not clear what "Show" actually does.
Others have wanted this functionality as well:
https://forum.posit.co/t/text-in-the-button-to-show-hide-code/187673
And some formats have circumvented this issue:
https://rstudio.github.io/distill/
They do this with a YAML header option:
---
output:
distill::distill_article:
code_folding: "Show/Hide Code"
---
Ideally, I think this would be a chunk option, since a single document could have different types of things, code or otherwise, folded. Also, the way distill formats the button as text with a rotating arrow looks cleaner and more modern to me.
If there is interest in this feature, I would be happy to work on it and submit a PR to address it.
The code folding feature is quite useful, but I think its appearance could be improved. The button says "Show", which is a reasonable default given that what is folded may not be code. However, this ambiguity means that if all the code in folded in a document, it is not clear what "Show" actually does.
Others have wanted this functionality as well:
https://forum.posit.co/t/text-in-the-button-to-show-hide-code/187673
And some formats have circumvented this issue:
https://rstudio.github.io/distill/
They do this with a YAML header option:
Ideally, I think this would be a chunk option, since a single document could have different types of things, code or otherwise, folded. Also, the way
distillformats the button as text with a rotating arrow looks cleaner and more modern to me.If there is interest in this feature, I would be happy to work on it and submit a PR to address it.