Skip to content

Commit

Permalink
feat: Dynamic theming (#1358)
Browse files Browse the repository at this point in the history
Co-authored-by: Carson Sievert <cpsievert1@gmail.com>
Co-authored-by: Carson Sievert <carson@posit.co>
  • Loading branch information
3 people committed Jun 27, 2024
1 parent 299f821 commit 358b17c
Show file tree
Hide file tree
Showing 347 changed files with 28,049 additions and 508 deletions.
26 changes: 13 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

# Distribution / packaging
.Python
env/
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
dist/
/env/
/build/
/develop-eggs/
/downloads/
/eggs/
/.eggs/
/lib/
/lib64/
/parts/
/sdist/
/var/
/wheels/
/dist/
*.egg-info/
.installed.cfg
*.egg
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Relative imports, like `from . import utils`, now can be used in Shiny Express apps. (#1464)

* `ui.Theme` allows you to create custom themes for your Shiny app by recompiling [Bootstrap](https://getbootstrap.com/) and Shiny's Sass files with your own customizations. Themes created with `ui.Theme` can be passed directly to the `theme` argument of `express.ui.page_opts()` (Shiny Express) or `ui.page_*()` functions (Shiny Core) to apply the theme to the entire app. This feature requires the [libsass package](https://sass.github.io/libsass-python/) which can be installed with `pip install libsass`. (#1358)

### Bug fixes

* Fixed #1440: When a Shiny Express app with a `www/` subdirectory was deployed to shinyapps.io or a Connect server, it would not start correctly. (#1442)
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,10 @@ install-deps: FORCE ## install dependencies
# ## If caching is ever used, we could run:
# install-deps: FORCE ## install latest dependencies
# pip install --editable ".[dev,test]" --upgrade --upgrade-strategy eager

upgrade-html-deps: FORCE ## Upgrade Shiny's HTMLDependencies
@if ! Rscript -e "q()"; then \
echo "Error: Upgrading HTML dependencies requires R, but R is not installed or not in your PATH. Please install R and try again."; \
exit 1; \
fi
@scripts/htmlDependencies.R
1 change: 1 addition & 0 deletions docs/_quartodoc-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ quartodoc:
- title: Custom UI
desc: Lower-level UI functions for creating custom HTML/CSS/JS
contents:
- ui.Theme
- ui.HTML # uses justattributes.rst template
- ui.TagList # uses class.rst template
- name: ui.tags # uses tags.rst template
Expand Down
1 change: 1 addition & 0 deletions docs/_quartodoc-express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ quartodoc:
- title: UI as HTML
desc: Tools for creating HTML/CSS/JS
contents:
- express.ui.Theme
- express.ui.markdown
- express.ui.include_css
- express.ui.include_js
Expand Down
Loading

0 comments on commit 358b17c

Please sign in to comment.