Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom themes not loaded on macOS with v1.3.555+ #5674

Closed
gadenbuie opened this issue Oct 31, 2019 · 6 comments · Fixed by #5686
Closed

Custom themes not loaded on macOS with v1.3.555+ #5674

gadenbuie opened this issue Oct 31, 2019 · 6 comments · Fixed by #5686
Assignees
Milestone

Comments

@gadenbuie
Copy link
Member

System details

RStudio Edition : Desktop
RStudio Version : v1.3.555
OS Version      : macOS Catalina 10.15 x86_64-apple-darwin15.6.0 (64-bit)
                  macOS Mojave 10.14.6 x86_64-apple-darwin15.6.0 (64-bit)
R Version       : 3.6.1

Note: I also tested on a rocker/verse image where this issue did not reproduce. I was able to rule out this being an issue specific to Catalina by reproducing on Mojave as well.

Thanks to detailed testing by @pat-s, I'm fairly certain the change occurred in 053e681 (v.1.3.555).

Steps to reproduce the problem

Install a custom theme, e.g. from rsthemes or Night Owl. The theme displays in the appearance menu but is not loaded correctly.

image

Describe the problem in detail

Through Chrome dev tools it seems that the rstheme CSS file isn't being loaded.

image

Describe the behavior you expected

But the theme is correctly applied if the source is pasted into the empty rstheme file in the dev tools.

image

@gtritchie
Copy link
Member

Thanks for the report, I'll take a look.

@gtritchie
Copy link
Member

gtritchie commented Oct 31, 2019

Repro'd with 1.3.566 (macOS, and with dev build (macOS server) on latest master. Saw this in console when I selected an rstheme in the options dialog (immediately, before I dismissed the dialog):

31 Oct 2019 17:19:09 [rsession-gary] ERROR system error 2 (No such file or directory) [path: /Users/gary/.R/rstudio/themes/, path: rsthemes_fairyfloss.rstheme] at rstudio::core::Error rstudio::core::FilePath::completeChildPath(const std::string &, rstudio::core::FilePath &) const /Users/admin/workspace/IDE/macos-v1.3/src/cpp/shared_core/FilePath.cpp:565

@jmcphers
Copy link
Member

jmcphers commented Oct 31, 2019

.R/rstudio is the old path; it should be looking in .config/rstudio/themes.

I think this broke with either:

2b6631a or 5a41792

@gtritchie
Copy link
Member

.R/rstudio is the old path; it should be looking in .config/rstudio/themes.

Looks like we (intend) to try both?

// Check first in the local custom theme path; if the theme isn't found there, try the legacy
// theme path (where RStudio 1.2 wrote custom themes)
requestedTheme = getLocalCustomThemePath().completeChildPath(themeFileName);
if (!requestedTheme.exists())
requestedTheme = getLegacyLocalCustomThemePath().completeChildPath(themeFileName);

@jmcphers
Copy link
Member

Yes, that way the themes installed in 1.2 should still load in 1.3.

@gtritchie
Copy link
Member

@MariaSemple said she'll take this bug. Also, confirmed the scenario works if I moved the installed themes to the new location in .config/rstudio/themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants