gadenbuie / rsthemes

🔮 Full RStudio IDE and Syntax Themes
https://www.garrickadenbuie.com/project/rsthemes/
Other
602 stars 45 forks source link

Issue after updating RStudio and R #86

Closed werkstattcodes closed 2 years ago

werkstattcodes commented 2 years ago

Many thanks for this very helpful package.

I just updated to R 4.2. (patched version) and the latest RStudio (2022.02.2 Build 485). Subsequently, I also installed RTools 4.2. link and reinstalled your package.

However, there is now an issue when e.g. using the theme Night Owl. Elements in RStudio are not properly darkened. Any idea what could resolve the issue? Many thanks!

image

> devtools::session_info()
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.0 Patched (2022-05-04 r82317 ucrt)
 os       Windows 10 x64 (build 19044)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_Austria.utf8
 ctype    English_Austria.utf8
 tz       Europe/Berlin
 date     2022-05-07
 rstudio  2022.02.2+485 Prairie Trillium (desktop)
 pandoc   NA

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date (UTC) lib source
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.2.0)
 brio          1.1.3   2021-11-30 [1] CRAN (R 4.2.0)
 cachem        1.0.6   2021-08-19 [1] CRAN (R 4.2.0)
 callr         3.7.0   2021-04-20 [1] CRAN (R 4.2.0)
 cli           3.3.0   2022-04-25 [1] CRAN (R 4.2.0)
 crayon        1.5.1   2022-03-26 [1] CRAN (R 4.2.0)
 DBI           1.1.2   2021-12-20 [1] CRAN (R 4.2.0)
 desc          1.4.1   2022-03-06 [1] CRAN (R 4.2.0)
 devtools      2.4.3   2021-11-30 [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)
 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)
 fs            1.5.2   2021-12-08 [1] CRAN (R 4.2.0)
 generics      0.1.2   2022-01-31 [1] CRAN (R 4.2.0)
 glue          1.6.2   2022-02-24 [1] CRAN (R 4.2.0)
 here          1.0.1   2020-12-13 [1] CRAN (R 4.2.0)
 hms           1.1.1   2021-09-26 [1] CRAN (R 4.2.0)
 janitor       2.1.0   2021-01-05 [1] CRAN (R 4.2.0)
 lifecycle     1.0.1   2021-09-24 [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)
 memoise       2.0.1   2021-11-26 [1] CRAN (R 4.2.0)
 pillar        1.7.0   2022-02-01 [1] CRAN (R 4.2.0)
 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.2.4   2021-11-30 [1] CRAN (R 4.2.0)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.2.0)
 processx      3.5.3   2022-03-25 [1] CRAN (R 4.2.0)
 ps            1.7.0   2022-04-23 [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)
 readr         2.1.2   2022-01-30 [1] CRAN (R 4.2.0)
 remotes       2.4.2   2021-11-30 [1] CRAN (R 4.2.0)
 rlang         1.0.2   2022-03-04 [1] CRAN (R 4.2.0)
 rprojroot     2.0.3   2022-04-02 [1] CRAN (R 4.2.0)
 sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.2.0)
 snakecase     0.11.0  2019-05-25 [1] CRAN (R 4.2.0)
 stringi       1.7.6   2021-11-29 [1] CRAN (R 4.2.0)
 stringr       1.4.0   2019-02-10 [1] CRAN (R 4.2.0)
 testthat      3.1.4   2022-04-26 [1] CRAN (R 4.2.0)
 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)
 tzdb          0.3.0   2022-03-28 [1] CRAN (R 4.2.0)
 usethis       2.1.5   2021-12-09 [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)

 [1] C:/Users/Roland/AppData/Local/R/win-library/4.2
 [2] C:/Program Files/R/R-4.2.0patched/library

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> rstudioapi::versionInfo()
$citation

To cite RStudio in publications use:

  RStudio Team (2022). RStudio: Integrated Development Environment for R. RStudio, PBC, Boston, MA URL
  http://www.rstudio.com/.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {RStudio: Integrated Development Environment for R},
    author = {{RStudio Team}},
    organization = {RStudio, PBC},
    address = {Boston, MA},
    year = {2022},
    url = {http://www.rstudio.com/},
  }

$mode
[1] "desktop"

$version
[1] ‘2022.2.2.485’

$long_version
[1] "2022.02.2+485"

$release_name
[1] "Prairie Trillium"
werkstattcodes commented 2 years ago

One addition: the theme(s) seemed to work fine after updating R/RStudio. Only after I wanted to change a theme, the problem started to occurr. Right after updating R/RStudio, it was still displayed correctly.

gadenbuie commented 2 years ago

Can you confirm that you also ran rsthemes::install_themes() after installing the latest version of rsthemes?

werkstattcodes commented 2 years ago

Many thanks for your swift reaction. Yes, just installed the package again (this time from Github), and subsequently I installed the themes. The issue remains.

gadenbuie commented 2 years ago

Okay, that's unfortunate. Have you also restarted RStudio after reinstalling the themes?

werkstattcodes commented 2 years ago

Yes. Multiple times. Also R and the computer.

werkstattcodes commented 2 years ago

Ok, I am starting to wonder whether this is an issue of RStudio, and not related to rsthemes. E.g. if I use another dark theme, not from rstheme, the file pane looks somewhat odd. As far as I can remember, the file names were previously not blue.

image

gadenbuie commented 2 years ago

I'm not sure... I can't reproduce this issue on Mac with that version of RStudio. One more drastic thing to try would be to uninstall the themes from rsthemes before re-installing them. You can do this on a theme-by-theme basis

rstudioapi::removeTheme("Night Owl {rsthemes}")
rsthemes::install_themes()

Or you can do it all at once with

rsthemes::remove_themes()
rsthemes::install_themes()

Another diagnostic would be to make sure that RStudio's using the latest copy of the theme. Sometimes it caches the theme files and uses an older version for a while. Restarting RStudio and your computer should have fixed that, but it's worth trying. Here's a screen grab about how to do that...

https://user-images.githubusercontent.com/5420529/167451987-142a2132-b7d4-4244-974b-d4f9466f6d12.mp4

werkstattcodes commented 2 years ago

Many thanks for the very detailed and helpful answer. I can confirm that I am on rsthemes 0.3.1.

As some further info: Here a screenshot of the wrongly colored tab-bar and the css entry when using the a11-y-dark theme.

image

image

I am not sufficiently familiar with these things, but I strongly suspect by now that it has something to do with RStudio and not rsthemes. There were a few seemingly similar entries on the RStudio Community page recently (here my entry), but so far no solution came up.

Feel free to close the issue. If you keep it open, I'll post the solution once it transpired. Many thanks again!

kevinushey commented 2 years ago

I'm trying to collect more information in https://github.com/rstudio/rstudio/issues/11176 -- @werkstattcodes, if you can share some more detail, it would be helpful (as I thus far cannot reproduce locally).

werkstattcodes commented 2 years ago

Here's what I get when using the a11y-dark theme from rsthemes

.rs.api.getThemeInfo()


$editor
[1] "a11y-dark {rsthemes}"

$global [1] "Modern"

$dark [1] FALSE

$foreground [1] "rgb(254, 254, 254)"

$background [1] "rgb(43, 43, 43)"


Here's what I get when using the **Express theme** (dark, which comes with RStudio).

$editor [1] "Express"

$global [1] "Modern"

$dark [1] FALSE

$foreground [1] "rgb(221, 221, 221)"

$background [1] "rgb(35, 35, 35)"

gadenbuie commented 2 years ago

Thanks for the extra details @werkstattcodes. I think it'd be most helpful if you could answer @kevinushey's question in this comment over in the rstudio issue. (It'd be best to answer there.) Thanks!

gadenbuie commented 2 years ago

I think this has been resolved upstream but please let me know if not.