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

fix(themer-demo): Fix is_legacy_version #918

Merged
merged 5 commits into from
Nov 22, 2023
Merged

Conversation

gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Nov 22, 2023

Fixes #916 by correctly setting the is_legacy_version variable when the theme is version 3 or 4.

In short, theme_version(bs_global_get()) can return NULL, in which case we can fall back to version_default().

Actually, after fixing the above issue I realized that the themer demo didn't work correctly in this case anyway. Instead of falling back to the default version, we now fall back to the default theme, much earlier in the app.

theme <- bs_global_get() %||% bs_theme()

@gadenbuie gadenbuie self-assigned this Nov 22, 2023
@gadenbuie gadenbuie requested a review from cpsievert November 22, 2023 19:24
@gadenbuie gadenbuie merged commit 56e8bea into main Nov 22, 2023
@gadenbuie gadenbuie deleted the fix/themer-is-legacy-version branch November 22, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inst/examples/themer-demo errors when run outside of bs_theme_prwview()
2 participants