Skip to content

[feat] Styling customizations for st.space#12734

Merged
sfc-gh-lwilby merged 1 commit intodevelopfrom
10-09-st-space-style-customization-meet-space-requirements
Oct 11, 2025
Merged

[feat] Styling customizations for st.space#12734
sfc-gh-lwilby merged 1 commit intodevelopfrom
10-09-st-space-style-customization-meet-space-requirements

Conversation

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator

@sfc-gh-lwilby sfc-gh-lwilby commented Oct 9, 2025

Describe your changes

st.space has some unique requirements. The element should have only width or height depending on the direction of the parent container (vertical = height, horizontal = width).

GitHub Issue Link (if applicable)

Testing Plan

E2E tests cover this in later PRs.


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 9, 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)

Copy link
Copy Markdown
Collaborator Author

sfc-gh-lwilby commented Oct 9, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 9, 2025

✅ PR preview is ready!

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

@sfc-gh-lwilby sfc-gh-lwilby changed the title st-space-style-customization-meet-space-requirements [feat] Styling customizations for st.space Oct 9, 2025
@sfc-gh-lwilby sfc-gh-lwilby added security-assessment-completed impact:internal PR changes only affect internal code change:feature PR contains new feature or enhancement implementation labels Oct 9, 2025
@sfc-gh-lwilby sfc-gh-lwilby marked this pull request as ready for review October 9, 2025 13:02
@lukasmasuch lukasmasuch requested a review from Copilot October 9, 2025 18:19
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 implements styling customizations specifically for st.space elements to ensure they only affect spacing in the intended direction based on their parent container's layout orientation.

  • Adds minimal cross-axis dimensions (minWidth: 0, minHeight: 0) for space elements
  • Implements direction-aware styling logic that sets width for horizontal layouts and height for vertical layouts
  • Prevents unintended cross-axis spacing by clearing the non-primary dimension

Reviewed Changes

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

File Description
frontend/lib/src/components/core/Block/styled-components.ts Adds minimal cross-axis dimensions for space elements to prevent unwanted spacing
frontend/lib/src/components/core/Block/StyledElementContainerLayoutWrapper.tsx Implements direction-aware styling that applies only the relevant dimension based on layout orientation

@sfc-gh-lwilby sfc-gh-lwilby changed the base branch from 10-09-st-space-update-uselayoutstyles-support-rem to graphite-base/12734 October 10, 2025 16:07
@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-style-customization-meet-space-requirements branch from da2b27f to b012240 Compare October 10, 2025 17:11
@sfc-gh-lwilby sfc-gh-lwilby changed the base branch from graphite-base/12734 to 10-09-st-space-update-uselayoutstyles-support-rem October 10, 2025 17:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 10, 2025

📉 Frontend coverage change detected

The frontend unit test (vitest) coverage has decreased by 0.0400%

  • Current PR: 84.7600% (47995 lines, 7313 missed)
  • Latest develop: 84.8000% (47967 lines, 7290 missed)

💡 Consider adding more unit tests to maintain or improve coverage.

📊 View detailed coverage comparison

@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-update-uselayoutstyles-support-rem branch from 928bdf6 to ee4f058 Compare October 10, 2025 17:51
@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-style-customization-meet-space-requirements branch from b012240 to 9853884 Compare October 10, 2025 17:51
Base automatically changed from 10-09-st-space-update-uselayoutstyles-support-rem to develop October 10, 2025 18:20
@sfc-gh-lwilby sfc-gh-lwilby enabled auto-merge (squash) October 10, 2025 19:18
@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-style-customization-meet-space-requirements branch from 9853884 to 3d732cd Compare October 11, 2025 06:34
@sfc-gh-lwilby sfc-gh-lwilby merged commit 3102668 into develop Oct 11, 2025
38 checks passed
@sfc-gh-lwilby sfc-gh-lwilby deleted the 10-09-st-space-style-customization-meet-space-requirements branch October 11, 2025 06:59
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:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants