Skip to content

Remove deprecated proto fields and unused theme creator code#13842

Merged
lukasmasuch merged 7 commits into
developfrom
lukasmasuch/remove-deprecated-proto
Feb 9, 2026
Merged

Remove deprecated proto fields and unused theme creator code#13842
lukasmasuch merged 7 commits into
developfrom
lukasmasuch/remove-deprecated-proto

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch commented Feb 5, 2026

Describe your changes

Clean up deprecated and unused code from the theme system:

  1. Remove deprecated proto fields from CustomThemeConfig:

    • font (replaced by body_font)
    • widget_background_color (no longer applied)
    • widget_border_color (replaced by border_color + show_widget_border)
    • radii (replaced by base_radius)
    • font_sizes (replaced by base_font_size)
    • skeleton_background_color (no longer applied)
    • FontFace.weight (replaced by weight_range)
  2. Remove unused theme creator code:

    • Delete themeUtils.ts and themeUtils.test.ts (dead code since Settings menu updates #12648)
    • Remove orphaned THEME_CREATOR enum value from DialogType

Reserved field numbers are added to maintain proto compatibility.

Testing Plan

  • No new tests needed; this removes dead/deprecated code
  • Updated existing tests to remove references to deprecated fields
  • Frontend and backend changes are compatible with existing functionality

Contribution License Agreement

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

Copilot AI review requested due to automatic review settings February 5, 2026 23:49
@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io Bot commented Feb 5, 2026

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

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 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 Feb 5, 2026

✅ PR preview is ready!

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

@lukasmasuch lukasmasuch changed the title Remove unused themeUtils and THEME_CREATOR dialog type Remove deprecated proto fields and unused theme creator code Feb 5, 2026
@lukasmasuch lukasmasuch added impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change security-assessment-completed change:breaking PR contains breaking change that affects backwards compatibility labels Feb 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes dead code that was left behind after the theme creator dialog UI was removed in PR #12648. The cleanup includes the utility functions for theme configuration and TOML generation that are no longer needed.

Changes:

  • Removed themeUtils.ts containing theme builder configuration and TOML generation utilities
  • Removed themeUtils.test.ts containing tests for the deleted utilities
  • Removed THEME_CREATOR enum value from DialogType enum

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

File Description
frontend/app/src/components/StreamlitDialog/themeUtils.ts Deleted theme utility functions including themeBuilder configuration and toMinimalToml TOML generator
frontend/app/src/components/StreamlitDialog/themeUtils.test.ts Deleted corresponding unit tests for the removed theme utilities
frontend/app/src/components/StreamlitDialog/constants.ts Removed orphaned THEME_CREATOR enum value that was no longer used after dialog removal

@lukasmasuch lukasmasuch added the update-snapshots Trigger snapshot autofix workflow label Feb 6, 2026
@github-actions github-actions Bot removed the update-snapshots Trigger snapshot autofix workflow label Feb 6, 2026
lukasmasuch pushed a commit that referenced this pull request Feb 6, 2026
## Describe your changes

Automated snapshot updates for #13842 created via the snapshot autofix
CI workflow.

This workflow was triggered by adding the `update-snapshots` label to a
PR after Playwright E2E tests failed with snapshot mismatches.

**Updated snapshots:** 3 file(s)

⚠️ **Please review the snapshot changes carefully** - they could mask
visual bugs if accepted blindly.

This PR targets a feature branch and can be merged without review
approval.

Co-authored-by: Streamlit Bot <core+streamlitbot-github@streamlit.io>
lukasmasuch and others added 5 commits February 9, 2026 14:12
The theme creator dialog UI was removed in PR #12648 but themeUtils.ts and
its associated exports (themeBuilder, toMinimalToml) were left as dead code.
Remove these unused files and the orphaned THEME_CREATOR enum value.
Remove deprecated and unused proto fields: font, widget_background_color,
widget_border_color, radii, font_sizes, skeleton_background_color, and
FontFace.weight. Add reserved field numbers to maintain proto compatibility.
Update frontend theme utils and tests to remove references to these fields.
Remove references to deleted proto messages (Radii, FontSizes) and
fields (font, widget_background_color, widget_border_color, etc.)
from the compatibility test suite.
Automated snapshot updates for #13842 created via the snapshot autofix
CI workflow.

This workflow was triggered by adding the `update-snapshots` label to a
PR after Playwright E2E tests failed with snapshot mismatches.

**Updated snapshots:** 3 file(s)

⚠️ **Please review the snapshot changes carefully** - they could mask
visual bugs if accepted blindly.

This PR targets a feature branch and can be merged without review
approval.

Co-authored-by: Streamlit Bot <core+streamlitbot-github@streamlit.io>
@lukasmasuch lukasmasuch force-pushed the lukasmasuch/remove-deprecated-proto branch from 35dbd4f to 8531cf0 Compare February 9, 2026 13:13
@lukasmasuch lukasmasuch enabled auto-merge (squash) February 9, 2026 20:19
Update chromium and firefox snapshots after theme-related changes.
@lukasmasuch lukasmasuch merged commit 8722152 into develop Feb 9, 2026
43 checks passed
@lukasmasuch lukasmasuch deleted the lukasmasuch/remove-deprecated-proto branch February 9, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:breaking PR contains breaking change that affects backwards compatibility change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console warnings for deprecated theme color fields for (widgetBackgroundColor, widgetBorderColor, skeletonBackgroundColor)

3 participants