Closed sfc-gh-pchiu closed 3 days ago
Name | Link |
---|---|
📦 Wheel file | https://core-previews.s3-us-west-2.amazonaws.com/pr-10772/streamlit-1.43.2-py3-none-any.whl |
🕹️ Preview app | pr-10772.streamlit.app (☁️ Deploy here if not accessible) |
:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)
:white_check_mark: license/snyk check is complete. No issues have been found. (View Details)
Describe your changes
Support
[theme.sidebar]
in streamlit config.For example, now we can add theme options for sidebar in
config.toml
Theming Enhancements:
CustomThemeCategories
enum to categorize theme options, with "sidebar" as a new category. (lib/streamlit/config.py
)_create_theme_options
to create theme-related configuration options that can be applied to multiple categories, such as "theme" and "theme.sidebar". (lib/streamlit/config.py
)primaryColor
,backgroundColor
,textColor
, and more. (lib/streamlit/config.py
) [1] [2] [3] [4]Configuration Handling:
_update_config_with_toml
function to process nested configuration sections, allowing for custom theme sub-categories. (lib/streamlit/config.py
)_populate_theme_msg
function to handle custom theme categories, ensuring that the sidebar theme is properly populated. (lib/streamlit/runtime/app_session.py
) [1] [2] [3] [4]Testing:
_create_theme_options
function and verified that theme options are correctly created and deleted for multiple categories. (lib/tests/streamlit/config_test.py
) [1] [2]sidebar_custom_theme_test.py
file. (e2e_playwright/theming/sidebar_custom_theme_test.py
)Github Issue
https://github.com/streamlit/streamlit/issues/8844
Testing Plan
Manual Tests
A. Set in
config.toml
B.
streamlit config show
Ran show command yield the correct and visible sidebar configs
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.