posit-dev / posit-dev/positron

Support `rstudioapi::getThemeInfo()`

Open
#2,986 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area: core enhancement lang: r
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:

  1. foreground
  2. background
  3. dark (would be nice)
  4. editor (would be nice)

I don't think we'd need the global item, or that could be "Positron".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.