rsthemes
rsthemes copied to clipboard
Dark mode in "Review Changes" window
Hello! Fantastic package, I have been looking for a way to easily switch between light and dark mode themes in RStudio for ages.
I noticed that the dark themes I tried (a11y-dark, base16 3024, base16 Default Dark, Fairyfloss) cause problems in the Review Changes window (accessed through the Commit button in the Git pane):
- The files, commit message, and diff panes are bright.
- The Changes/History toggle is light and the text is barely legible.
- The character count for the commit message (just under the Push button at the top right) is also displayed in a bright font colour on a light grey background and is almost impossible to read.
The problem doesn't occur with built-in dark themes (e.g. Tomorrow Night), and light themes from rsthemes also don't seem to cause problems. I am using R 4.2.1 with RStudio Spotted Wakreobin on macOS Big Sur.
> devtools::session_info()
─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.2.1 (2022-06-23)
os macOS Big Sur 11.6.5
system aarch64, darwin20
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz [...]
date 2022-07-24
rstudio 2022.07.0+548 Spotted Wakerobin (desktop)
pandoc 2.18 @ /Applications/RStudio.app/Contents/MacOS/quarto/bin/tools/ (via rmarkdown)
─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.0)
audio 0.1-10 2021-11-25 [1] CRAN (R 4.2.0)
beepr 1.3 2018-06-04 [1] CRAN (R 4.2.0)
cachem 1.0.6 2021-08-19 [1] CRAN (R 4.2.0)
callr 3.7.1 2022-07-13 [1] CRAN (R 4.2.1)
caret 6.0-92 2022-04-19 [1] CRAN (R 4.2.0)
class 7.3-20 2022-01-16 [2] CRAN (R 4.2.1)
cli 3.3.0 2022-04-25 [1] CRAN (R 4.2.0)
codetools 0.2-18 2020-11-04 [2] CRAN (R 4.2.1)
colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.0)
crayon 1.5.1 2022-03-26 [1] CRAN (R 4.2.0)
data.table 1.14.2 2021-09-27 [1] CRAN (R 4.2.0)
DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.0)
devtools 2.4.4 2022-07-20 [1] CRAN (R 4.2.0)
digest 0.6.29 2021-12-01 [1] CRAN (R 4.2.0)
dplyr 1.0.9 2022-04-28 [1] CRAN (R 4.2.0)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.2.0)
evaluate 0.15 2022-02-18 [1] CRAN (R 4.2.0)
fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.0)
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.0)
foreach 1.5.2 2022-02-02 [1] CRAN (R 4.2.0)
fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.0)
future 1.26.1 2022-05-27 [1] CRAN (R 4.2.0)
future.apply 1.9.0 2022-04-25 [1] CRAN (R 4.2.0)
gdata 2.18.0.1 2022-05-10 [1] CRAN (R 4.2.0)
generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.0)
ggplot2 3.3.6 2022-05-03 [1] CRAN (R 4.2.0)
globals 0.15.1 2022-06-24 [1] CRAN (R 4.2.0)
glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
gmodels 2.18.1.1 2022-05-17 [1] CRAN (R 4.2.0)
gower 1.0.0 2022-02-03 [1] CRAN (R 4.2.0)
gtable 0.3.0 2019-03-25 [1] CRAN (R 4.2.0)
gtools 3.9.3 2022-07-11 [1] CRAN (R 4.2.1)
hardhat 1.2.0 2022-06-30 [1] CRAN (R 4.2.0)
htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.2.1)
htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.2.0)
httpuv 1.6.5 2022-01-05 [1] CRAN (R 4.2.0)
ipred 0.9-13 2022-06-02 [1] CRAN (R 4.2.0)
iterators 1.0.14 2022-02-05 [1] CRAN (R 4.2.0)
knitr 1.39 2022-04-26 [1] CRAN (R 4.2.0)
later 1.3.0 2021-08-18 [1] CRAN (R 4.2.0)
lattice 0.20-45 2021-09-22 [2] CRAN (R 4.2.1)
lava 1.6.10 2021-09-02 [1] CRAN (R 4.2.0)
lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.2.0)
listenv 0.8.0 2019-12-05 [1] CRAN (R 4.2.0)
lubridate 1.8.0 2021-10-07 [1] CRAN (R 4.2.0)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
MASS 7.3-57 2022-04-22 [2] CRAN (R 4.2.1)
Matrix 1.4-1 2022-03-23 [2] CRAN (R 4.2.1)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.0)
mime 0.12 2021-09-28 [1] CRAN (R 4.2.0)
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.2.0)
ModelMetrics 1.2.2.2 2020-03-17 [1] CRAN (R 4.2.0)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.0)
nlme 3.1-157 2022-03-25 [2] CRAN (R 4.2.1)
nnet 7.3-17 2022-01-16 [2] CRAN (R 4.2.1)
parallelly 1.32.0 2022-06-07 [1] CRAN (R 4.2.0)
pillar 1.8.0 2022-07-18 [1] CRAN (R 4.2.1)
pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.2.0)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.0)
pkgload 1.3.0 2022-06-27 [1] CRAN (R 4.2.0)
plyr 1.8.7 2022-03-24 [1] CRAN (R 4.2.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.2.0)
pROC 1.18.0 2021-09-03 [1] CRAN (R 4.2.0)
processx 3.7.0 2022-07-07 [1] CRAN (R 4.2.1)
prodlim 2019.11.13 2019-11-17 [1] CRAN (R 4.2.0)
profvis 0.3.7 2020-11-02 [1] CRAN (R 4.2.0)
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.2.0)
ps 1.7.1 2022-06-18 [1] CRAN (R 4.2.0)
purrr 0.3.4 2020-04-17 [1] CRAN (R 4.2.0)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0)
Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.2.1)
recipes 1.0.1 2022-07-07 [1] CRAN (R 4.2.1)
remotes 2.4.2 2021-11-30 [1] CRAN (R 4.2.0)
reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.2.0)
rlang 1.0.4 2022-07-12 [1] CRAN (R 4.2.1)
rmarkdown 2.14 2022-04-25 [1] CRAN (R 4.2.0)
rpart 4.1.16 2022-01-24 [2] CRAN (R 4.2.1)
rsthemes 0.3.1 2022-07-23 [1] Github (gadenbuie/rsthemes@7516dd6)
rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.2.0)
scales 1.2.0 2022-04-13 [1] CRAN (R 4.2.0)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0)
shiny 1.7.2 2022-07-19 [1] CRAN (R 4.2.0)
stopwords 2.3 2021-10-28 [1] CRAN (R 4.2.0)
stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.1)
stringr 1.4.0 2019-02-10 [1] CRAN (R 4.2.0)
survival 3.3-1 2022-03-03 [2] CRAN (R 4.2.1)
tibble 3.1.7 2022-05-03 [1] CRAN (R 4.2.0)
tidyselect 1.1.2 2022-02-21 [1] CRAN (R 4.2.0)
timeDate 3043.102 2018-02-21 [1] CRAN (R 4.2.0)
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.2.0)
usethis 2.1.6 2022-05-25 [1] CRAN (R 4.2.0)
utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.0)
vctrs 0.4.1 2022-04-13 [1] CRAN (R 4.2.0)
withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0)
xfun 0.31 2022-05-10 [1] CRAN (R 4.2.0)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.2.0)
yaml 2.3.5 2022-02-21 [1] CRAN (R 4.2.0)
[1] /Users/[...]/Library/R/arm64/4.2/library
[2] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> rstudioapi::versionInfo()
$citation
[...]
$mode
[1] "desktop"
$version
[1] ‘2022.7.0.548’
$long_version
[1] "2022.07.0+548"
$release_name
[1] "Spotted Wakerobin"
There are a few problems faced here:
- There are CSS rules that are too generic and are bleeding into the version control window.
- On the other hand, those buttons inside the window are amazingly difficult to style.
- Also, there isn't a stable way (i.e. class or id) to identify the version control window other than via the
aria-label
and that's not the greatest idea, so it's hard to isolate that window. - RStudio doesn't use a dark mode theme for additional windows and it took a rather large effort to theme the global options windows.
It's not an easy problem to fix. Especially because of the first two problems, most fixes turn into a game of whack-a-mole having to track down new problems with every attempted fix.
So... it could be a little while...