Skip to content

Add support for auto color to MutliselectColumn using chart colors#12724

Merged
lukasmasuch merged 8 commits intodevelopfrom
add-auto-color-to-multiselect-col
Oct 15, 2025
Merged

Add support for auto color to MutliselectColumn using chart colors#12724
lukasmasuch merged 8 commits intodevelopfrom
add-auto-color-to-multiselect-col

Conversation

@lukasmasuch
Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch commented Oct 8, 2025

Describe your changes

Adds auto color option to MultiselectColumn to automatically color options based on the configured categorical chart colors.

image

Testing Plan

  • Added unit test & e2e test.

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 8, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 8, 2025

✅ PR preview is ready!

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

@lukasmasuch lukasmasuch added security-assessment-completed change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users labels Oct 8, 2025
@lukasmasuch lukasmasuch marked this pull request as ready for review October 8, 2025 18:32
@lukasmasuch lukasmasuch requested a review from Copilot October 8, 2025 18:32
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 adds support for the "auto" color option to the MultiselectColumn configuration, which automatically assigns colors to multiselect options using the configured categorical chart colors from the theme.

  • Adds "auto" as a valid color value in type annotations and function signatures
  • Implements automatic color assignment logic in the frontend using categorical chart colors with transparency
  • Updates documentation and adds comprehensive test coverage

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/streamlit/elements/lib/column_types.py Updates type annotations and docstring to support "auto" color option
frontend/lib/src/components/widgets/DataFrame/columns/MultiselectColumn.ts Implements auto color logic using categorical chart colors with transparency
frontend/lib/src/components/widgets/DataFrame/columns/MultiselectColumn.test.ts Adds unit tests for auto color functionality and wrap-around behavior
e2e_playwright/st_dataframe_config.py Adds end-to-end test case demonstrating auto color feature

Copy link
Copy Markdown
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasmasuch lukasmasuch merged commit b14db06 into develop Oct 15, 2025
39 checks passed
@lukasmasuch lukasmasuch deleted the add-auto-color-to-multiselect-col branch October 15, 2025 06:19
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:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants