Add support for auto color to MutliselectColumn using chart colors#12724
Merged
lukasmasuch merged 8 commits intodevelopfrom Oct 15, 2025
Merged
Add support for auto color to MutliselectColumn using chart colors#12724lukasmasuch merged 8 commits intodevelopfrom
auto color to MutliselectColumn using chart colors#12724lukasmasuch merged 8 commits intodevelopfrom
Conversation
Contributor
🎉 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) |
Contributor
✅ PR preview is ready!
|
Contributor
There was a problem hiding this comment.
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 |
frontend/lib/src/components/widgets/DataFrame/columns/MultiselectColumn.test.ts
Outdated
Show resolved
Hide resolved
frontend/lib/src/components/widgets/DataFrame/columns/MultiselectColumn.test.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Adds
autocolor option toMultiselectColumnto automatically color options based on the configured categorical chart colors.Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.