-
Notifications
You must be signed in to change notification settings - Fork 100
feat: Dynamic theming #1358
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
Merged
Merged
feat: Dynamic theming #1358
Changes from 123 commits
Commits
Show all changes
134 commits
Select commit
Hold shift + click to select a range
943b48d
bump to latest shiny/bslib
gadenbuie 36dc596
feat: Merge shiny dependencies into a single bootstrap.min.css
gadenbuie f33a59e
Consolidate all CSS in bootstrap.min.css
gadenbuie 27c6912
feat: Add Sass source files for bslib preset themes
gadenbuie 17eeee7
write theme presets into `shiny/ui/_theme_presets.py`
gadenbuie 7ee9358
include tuple of preset names for error checking
gadenbuie 4a67c0b
feat: Dynamic theming with ui.ShinyTheme
gadenbuie 47d751d
tests: update example (as demo)
gadenbuie 09d4d60
Include bslib components in base shiny-bootstrap
gadenbuie 2febd00
rename: `ui.Theme`
gadenbuie ec330f2
update demo
gadenbuie b6227d3
rename: shiny:::__SassLayer -> shiny:::__Sass
gadenbuie 2a92dfb
separate sass prep and compilation tasks
gadenbuie 6c92ef4
add comment headings
gadenbuie 553cc12
small edits, various
gadenbuie 195e244
don't bundle precompiled bootstwatch themes
gadenbuie 8a74ae8
script reports which themes were bundled
gadenbuie 93a8763
Add soft-dependency on libsass
gadenbuie 5a5d1a1
chore: make check-fix
gadenbuie 6719bf1
chore: shiny.express.ui.Theme
gadenbuie e4bd7ad
chore: also add libsass to dev packages
gadenbuie e2995b9
fix: gitignore folders at the top level
gadenbuie 93f8284
Merged origin/main into feat/dynamic-theming
gadenbuie 1c486c4
chore: add comments and some docs
gadenbuie 92d9fcb
refactor: move all steps to functions
gadenbuie e7c6189
refactor: Organize scripts/htmlDependencies into functions
gadenbuie fecbdf6
refactor: move sass compressed options into individual functions
gadenbuie 2bab669
refactor: Merge dependency prep into single file
gadenbuie 090060a
refactor: align messages, small step order adjustments
gadenbuie ae67027
feat: base Bootstrap for component CSS, Shiny preset for bundled Boot…
gadenbuie f0821ff
Merge 'origin/main' into branch 'feat/dynamic-theming'
gadenbuie b840e15
chore: update source of generated file
gadenbuie 1588238
chore: style scripts to normalize
gadenbuie 9bfe679
chore: document more functions in setup script
gadenbuie 839e633
refactor: move setup functions from _deps to _setup
gadenbuie 350811e
docs(Theme): Document class and add two new methods:
gadenbuie f031e5f
tests(Theme): Add tests and fix a few things
gadenbuie 07f6542
feat: Bundle page dependencies together without CSS
gadenbuie 01f3054
chore: update shiny.js
gadenbuie ad9817c
chore: include full version info in script output
gadenbuie 4adbe4a
chore: leave comment about theme extras
gadenbuie 380f69b
chore: rename bootstrap version constant
gadenbuie d00ac20
chore: rename variable to avoid confusion with type
gadenbuie fd5beca
feat: add `include_paths` to `Theme` init
gadenbuie fa93a08
fix: new tempdir if we need to recompile css
gadenbuie e4ca799
refactor: Add `_can_use_precompiled()` method instead of overloading …
gadenbuie 3774d1c
chore: `ui.Theme` is an instance of `Tagifiable`
gadenbuie 0158012
docs: minor edit
gadenbuie 8bcc695
feat: All `add_*()` methods support kwargs and python -> sass transfo…
gadenbuie 2e8e009
example: Update api-examples/theme
gadenbuie 6565d3d
docs: update example, add local css example
gadenbuie 8559c54
Merged origin/main into feat/dynamic-theming
gadenbuie 7d2b099
tests: Adjust tests of Sass kwarg value handling
gadenbuie bb492ff
feat: Add `compile_args` to `Theme.to_css()`
gadenbuie 66f91bf
temp: Use dev htmltools
gadenbuie 53a8bd0
chore: remove unused import
gadenbuie 77e8d85
chore: don't use mutable data structure as default argument
gadenbuie feafa64
chore: cast to str in place
gadenbuie 92de33c
chore: ignore flake8 warning in one file
gadenbuie 34f6d87
chore: update github ref for py-htmltools
gadenbuie 7201607
chore: use backwards-compatible NotRequired, TypedDict
gadenbuie e78d953
chore: Use `Union[]` for types
gadenbuie 2b5719a
fix(types): Another backcompat type fix
gadenbuie 1dc7749
docs: Add css pre-compiling example, add theme to quartodoc index
gadenbuie 2cec3df
chore: update bslib sass files function name
gadenbuie 9c4b63c
chore: latest bslib and shiny
gadenbuie 4adbe26
feat(.add_defaults): Include `!default` flag
gadenbuie 12a6d8c
refactor: _reset_css() method
gadenbuie 3525ade
refactor: `ui.Theme` is not tagifiable, but `theme` can handle it
gadenbuie 784a90e
tests: fix tests after `!default` flag addition
gadenbuie 50f9a45
feat: Throw if trying to tagify a Theme object
gadenbuie 1d154c3
Merge 'origin/main' into feat/dynamic-theming
gadenbuie adfe7a6
refactor: `write_spinners_py()`
gadenbuie ba2105b
tests: Test that htmltools dependency resolution works as expected
gadenbuie a7b79b8
chore: Leave a note about shiny_page_theme_deps() being for legacy co…
gadenbuie 8b1428a
chore: be happy, pyright
gadenbuie 8cf75d4
feat: Make `ui.Theme` a first class type of the `theme` argument.
gadenbuie 6657ac8
chore: Use bslib, shiny from main
gadenbuie 3abdc76
chore: remove requirements.txt from api-examples/theme
gadenbuie 04f05f9
chore: Add comment about maker layer location
gadenbuie b067ae0
chore: comment about ionrangeslider
gadenbuie 7cbd2d7
refactor: Just extract the contents of `@import "...";`
gadenbuie a8e271b
use released htmltools
gadenbuie 8591ce3
chore: Remove `**kwargs` from `.add_functions()`
gadenbuie 587c760
Apply suggestions from code review
gadenbuie 3e0d79a
chore: remove `dedent_array()`
gadenbuie 8e2d6fa
tests: `.add_functions()` doesn't allow kwargs
gadenbuie 7010e98
chore: don't copy `self._css`
gadenbuie 75479d7
chore: make `_combine_args_kwargs()` a static method
gadenbuie edb6287
Merge 'origin/main' into branch feat/dynamic-theming
gadenbuie 415b9f3
docs: Document `compile_args` in `.to_css()` method
gadenbuie 7ec2275
chore: Use `tempfile.TemporaryDirectory()`
gadenbuie d115d03
refactor: Simplify logic of `_html_dependency` method
gadenbuie 37be3b5
chore: clean up theme tempdir if `theme` is garbage collected
gadenbuie ab056bb
docs(Theme): Add example
gadenbuie 83647e2
fix(add_example): Don't embed files in `.venv` or `venv` directories
gadenbuie 5530b79
docs: update example to avoid red squiggles
gadenbuie f4039e2
lint fixes
gadenbuie 17343a4
chore: remove unused import
gadenbuie 6a71999
chore: directly link to `sass.compile()`
gadenbuie 89186de
docs: Add item to changelog
gadenbuie 2e8890f
chore: add comment about BS version
gadenbuie 21fa5e9
chore: Add a check for font import before updating
gadenbuie 747fb82
chore: Add `make upgrade-html-deps` target
gadenbuie df0578b
chore: Add tuple of bootstwatch theme names
gadenbuie 548782d
chore: restore bs3compat layer
gadenbuie b31011f
Merged origin/main into feat/dynamic-theming
gadenbuie 5a6a2ca
fix: remove trailing empty line
gadenbuie dbd989c
chore: Move some internals into methods
gadenbuie eaf3081
fix: check that the Theme object has `_css_temp_srcdr` before accessi…
gadenbuie eaedbff
fix: f-string to plain string
gadenbuie 4db16e8
Merged origin/main into feat/dynamic-theming
gadenbuie c72c0fd
refactor: Unify into a single HTML dependency method
gadenbuie be51b0f
test: More testing of css suppression
gadenbuie 4616db0
chore: Bump version to 0.10.2.9003
gadenbuie 81f642c
fix: Make sure `shiny.min.css` isn't included in rendered app HTML
gadenbuie 36a95fd
feat: Mark shiny theme stylesheets with `data-shiny-theme`
gadenbuie 7bff2d7
fix: ensure theme dependency has valid name
gadenbuie 6b9ed59
fix: Use optional type annotation for older pythons
gadenbuie 402399f
fix: Don't delete tempdir on garbage collection
gadenbuie 396105c
tests: don't set default value of `theme` in parameterized test
gadenbuie 3f7986a
Merged origin/main into feat/dynamic-theming
gadenbuie f294093
chore: back to `tempfile.mkdtemp()`
gadenbuie 147364b
Merged origin/main into feat/dynamic-theming
gadenbuie 5c90133
Revert "chore: back to `tempfile.mkdtemp()`"
gadenbuie 801e52a
fix: Keep a reference to the tempdir to avoid early garbage collection
gadenbuie 290a8ec
Revert "feat: Mark shiny theme stylesheets with `data-shiny-theme`"
gadenbuie e6819f6
feat: include `data-shiny-theme` attribute in theme stylesheet link tags
gadenbuie 95cc53e
refactor: Improve/simplify `.to_css(compile_args=)`
gadenbuie 6a6d508
fix: include `shiny.css` when Bootstrap is not available
gadenbuie a0eaf80
chore: Include express in tagify syntax error message
gadenbuie dbdb8bd
fix: include shiny.css in page-from-file apps
gadenbuie d444061
docs: Add Express option to changelog item
gadenbuie 41f4e21
chore: Add comment about why we check for Bootstrap
gadenbuie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.