Skip to content

[feat] Add util function to support Theming in CCv2#12750

Merged
sfc-gh-bnisco merged 1 commit intodevelopfrom
bnisco/ccv2-stack-26
Oct 24, 2025
Merged

[feat] Add util function to support Theming in CCv2#12750
sfc-gh-bnisco merged 1 commit intodevelopfrom
bnisco/ccv2-stack-26

Conversation

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco commented Oct 10, 2025

Describe your changes

Added theme utility functions for CCv2 to support setting CSS custom properties from the current Streamlit theme:

  1. objectToCssCustomProperties: Converts a StreamlitTheme object to CSS custom properties with configurable prefix
  2. extractComponentsV2Theme: Extracts properties from the Emotion theme to create a StreamlitTheme object

GitHub Issue Link (if applicable)

Testing Plan

  • Unit Tests: Added comprehensive tests for objectToCssCustomProperties covering various data types (strings, numbers, booleans, arrays) and custom prefix support
  • The implementation is fully covered by the included unit tests

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Oct 10, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 10, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12750/streamlit-1.50.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12750.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Oct 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-bnisco sfc-gh-bnisco force-pushed the bnisco/ccv2-stack-25 branch 2 times, most recently from a649d5d to fe99c28 Compare October 24, 2025 16:53
Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Oct 24, 2025

Merge activity

  • Oct 24, 8:22 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 24, 8:49 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 24, 9:12 PM UTC: @sfc-gh-bnisco merged this pull request with Graphite.

@sfc-gh-bnisco sfc-gh-bnisco changed the base branch from bnisco/ccv2-stack-25 to graphite-base/12750 October 24, 2025 20:23
@sfc-gh-bnisco sfc-gh-bnisco changed the base branch from graphite-base/12750 to develop October 24, 2025 20:47
@sfc-gh-bnisco sfc-gh-bnisco merged commit ee42c38 into develop Oct 24, 2025
37 checks passed
@sfc-gh-bnisco sfc-gh-bnisco deleted the bnisco/ccv2-stack-26 branch October 24, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:feature PR contains new feature or enhancement implementation impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants