Skip to content

Update vega_lite_chart width parameter default handling for type consistency#12595

Merged
sfc-gh-lwilby merged 1 commit intodevelopfrom
feature/vega-lite-default-width-consistency
Sep 23, 2025
Merged

Update vega_lite_chart width parameter default handling for type consistency#12595
sfc-gh-lwilby merged 1 commit intodevelopfrom
feature/vega-lite-default-width-consistency

Conversation

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby commented Sep 22, 2025

Describe your changes

Updates st.vega_lite_chart width parameter default handling to improve type consistency between function overloads and implementation.

Changes Made:

  • Updated parameter signature: Changed width: Width = "stretch" to width: Width | None = None in both overloads
  • Enhanced type consistency: Ensures overload signatures match implementation behavior
  • Added comprehensive testing: New test verifies default width parameter behavior across different scenarios

Key Implementation Details:

GitHub Issue Link (if applicable)

Testing Plan

  • Unit Tests (Python) - Default width parameter behavior verification
  • Manual testing completed for width parameter scenarios

Additional Notes:

This change improves type consistency in the vega_lite_chart function signatures while maintaining full backward compatibility. The modification allows for more flexible internal default handling without changing any user-facing behavior.


Contribution License Agreement

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

- Change width parameter from Width = 'stretch' to Width | None = None
- Allows internal logic to determine appropriate default based on chart type
- Add test to verify default width parameter behavior and consistency
- Ensures type consistency between overloads and implementation
@sfc-gh-lwilby sfc-gh-lwilby added security-assessment-completed impact:internal PR changes only affect internal code change:refactor PR contains code refactoring without behavior change labels Sep 22, 2025
@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Sep 22, 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 Sep 22, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-12595/streamlit-1.49.1-py3-none-any.whl
🕹️ Preview app pr-12595.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-lwilby sfc-gh-lwilby changed the title Modernize vega_lite_chart width parameter default handling for type consistency Update vega_lite_chart width parameter default handling for type consistency Sep 22, 2025
@sfc-gh-lwilby sfc-gh-lwilby added impact:users PR changes affect end users and removed impact:internal PR changes only affect internal code labels Sep 22, 2025
@sfc-gh-lwilby sfc-gh-lwilby merged commit 8b21c14 into develop Sep 23, 2025
46 checks passed
@sfc-gh-lwilby sfc-gh-lwilby deleted the feature/vega-lite-default-width-consistency branch September 23, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:refactor PR contains code refactoring without behavior change impact:users PR changes affect end users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants