-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat!: Use shiny.ui.Theme
#39
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No longer requires that shinyswatch suppress any Shiny dependencies
… to page functions
gadenbuie
commented
Jun 24, 2024
6 tasks
cpsievert
reviewed
Jun 26, 2024
standard --fix shinyswatch/picker/theme_picker.js
schloerke
approved these changes
Jun 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are three core changes in this PR:
We now use
shiny.ui.Theme
as the provider of the Shiny theme, using feat: Dynamic theming py-shiny#1358. This means that the Bootswatch themes are now complete Shiny themes, including built-in Shiny components in thebootswatch.min.css
file.BREAKING CHANGE: As part of this change, shinyswatch no longer suppresses any Shiny component Sass, as that is handled by Shiny directly. shinyswatch now provides only the CSS styles, not a complete Bootswatch dependency. As a result, shinyswatch themes should be provided directly to the
theme
argument ofshiny.ui.page_*()
functions rather than being added anywhere in the UI.shiny.ui.Theme()
objects have a.tagify()
method that raises an error, telling users to instead pass the theme object totheme=
. We could consider a similar change for shinyswatch, but we'd need to think through the mechanism.BREAKING CHANGE: The
default
parameter ofshinyswatch.theme_picker_ui()
is now deprecated and ignored if provided. Due to the changes in 2 above, the initial theme should be set viashiny.ui.page_*(theme=)
.BREAKING CHANGE: I've removed
shinyswatch.get_theme_deps()
. It's no longer useful given the current structure.Example
I've updated the examples, but the most "complete" is now
examples/page-sidebar/app.py
. This app includes a custom initial theme that is added into the theme picker choices. Notice thatbootstrap
andshiny
are also included in the theme picker choices.Kapture.2024-06-25.at.15.07.08.mp4
TODO
shiny.ui.Theme
.make docs
isn't working?