Skip to content

[AdvancedLayouts] Modernize height parameter for st.pydeck_chart#12613

Merged
sfc-gh-lwilby merged 9 commits intodevelopfrom
feature/pydeck-height
Sep 26, 2025
Merged

[AdvancedLayouts] Modernize height parameter for st.pydeck_chart#12613
sfc-gh-lwilby merged 9 commits intodevelopfrom
feature/pydeck-height

Conversation

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator

Describe your changes

Modernizes st.pydeck_chart height parameter to use the new Height type system ("stretch" or pixel values) for consistency with other chart elements.

Changes Made:

  • Updated parameter signature: Changed height: int | None = None to height: HeightWithoutContent = 500
  • Preserved backward compatibility: Existing integer height values still work
  • Enhanced frontend implementation: Removed explicit height props, now uses CSS-based height (height: 100%, minHeight: 6.25rem)
  • Deprecated proto field: Marked proto height field as deprecated in favor of heightConfig in layout configuration

GitHub Issue Link (if applicable)

Testing Plan

  • Unit Tests (Python) - Updated height parameter functionality and backward compatibility
  • Unit Tests (Python) - Height parameter validation with proper error handling
  • E2E Tests - Visual height behavior across different values (height="stretch", height=500)
  • Manual testing completed for all height scenarios

Screenshots/Demos:
(E2E test snapshots show visual differences for height="stretch" and height=500)

Additional Notes:

This follows the established pattern from other chart elements. Part of the broader AdvancedLayouts initiative to provide consistent height APIs across all chart elements.


Contribution License Agreement

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

- Updated parameter signature from height: int | None = None to height: HeightWithoutContent = 500
- Removed height prop from frontend DeckGL and StaticMap components (now uses CSS-based height)
- Updated styled component to use height: 100% with minHeight: 6.25rem
- Added comprehensive E2E tests for height parameter behavior (height=500, height="stretch")
- Added unit tests for height validation and default value
- Preserves backward compatibility for existing integer height values
@sfc-gh-lwilby sfc-gh-lwilby added security-assessment-completed change:feature PR contains new feature or enhancement implementation impact:users PR changes affect end users labels Sep 23, 2025
@snyk-io
Copy link
Copy Markdown
Contributor

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

✅ PR preview is ready!

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

@sfc-gh-lwilby sfc-gh-lwilby changed the title [WIP][AdvancedLayouts] Modernize height parameter for st.pydeck_chart [AdvancedLayouts] Modernize height parameter for st.pydeck_chart Sep 24, 2025
@sfc-gh-lwilby sfc-gh-lwilby marked this pull request as ready for review September 24, 2025 20:01
@sfc-gh-lwilby sfc-gh-lwilby requested a review from a team as a code owner September 24, 2025 20:01
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@sfc-gh-lwilby sfc-gh-lwilby merged commit c1ac38e into develop Sep 26, 2025
38 of 39 checks passed
@sfc-gh-lwilby sfc-gh-lwilby deleted the feature/pydeck-height branch September 26, 2025 18:09
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.

2 participants