posit-dev / posit-dev/positron
Support `rstudioapi::getThemeInfo()`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
rstudioapi::getThemeInfo() was not included in the initial list of shimmed rstudioapi functions in https://github.com/posit-dev/positron/issues/1312.
It'd be nice to support this function, in particular because it's used by thematic and would enable automatic theming of plots to reflect the current Positron theme.
Here's the info currently available in RStudio
rstudioapi::getThemeInfo()
#> $editor
#> [1] "Textmate (default)"
#>
#> $global
#> [1] "Modern"
#>
#> $dark
#> [1] FALSE
#>
#> $foreground
#> [1] "rgb(0, 0, 0)"
#>
#> $background
#> [1] "rgb(255, 255, 255)"
In particular, the key bits that I'd like to see in Positron:
foregroundbackgrounddark(would be nice)editor(would be nice)
I don't think we'd need the global item, or that could be "Positron".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the initial list of shimmed rstudioapi functions referenced in issue #1312 and inspect the rstudioapi::getThemeInfo() entry point. Compare the supported result with the RStudio example, including foreground, background, dark, and editor; done means Positron supports the requested theme information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100