Skip to content

[feat] Add rendering logic for st.space elements in frontend.#12735

Merged
sfc-gh-lwilby merged 1 commit intodevelopfrom
10-09-st-space-frontend-rendering
Oct 11, 2025
Merged

[feat] Add rendering logic for st.space elements in frontend.#12735
sfc-gh-lwilby merged 1 commit intodevelopfrom
10-09-st-space-frontend-rendering

Conversation

@sfc-gh-lwilby
Copy link
Copy Markdown
Collaborator

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

Describe your changes

Rendering for st.space type elements in the frontend.

GitHub Issue Link (if applicable)

Testing Plan

E2E tests will cover this in last PR.


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-12735/streamlit-1.50.0-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-12735.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-lwilby sfc-gh-lwilby changed the title st-space-frontend-rendering [feat] Add rendering logic for st.space elements in frontend. 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 force-pushed the 10-09-st-space-frontend-rendering branch from 2c6f33a to e9b913d Compare October 9, 2025 13:02
@sfc-gh-lwilby sfc-gh-lwilby marked this pull request as ready for review October 9, 2025 13:56
@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 adds frontend rendering support for st.space elements by implementing the necessary React component and styling. The change enables the frontend to properly display space elements that are created using Streamlit's st.space API.

  • Adds a new styled component StyledSpace for rendering space elements
  • Implements the "space" case in the element renderer switch statement
  • Includes proper CSS class and test ID attributes for styling and testing

Copy link
Copy Markdown
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍 but it might be good to move it to styled-components.ts

Comment on lines +177 to +182
const StyledSpace = styled.div({
// Styling is handled in StyledElementContainerLayoutWrapper.
// Space component should fill the container.
width: "100%",
height: "100%",
})
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

since this is a styled component it might be better to move it to styled-components.ts

@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 force-pushed the 10-09-st-space-frontend-rendering branch from e9b913d to 6fd43aa Compare 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.0000%

  • Current PR: 84.7600% (48004 lines, 7313 missed)
  • Latest develop: 84.7600% (47995 lines, 7313 missed)

✅ Coverage change is within normal range.

📊 View detailed coverage comparison

@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-frontend-rendering branch from 6fd43aa to 9b066d1 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
@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-frontend-rendering branch 2 times, most recently from 0999747 to f1606bc Compare October 11, 2025 06:34
@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
Base automatically changed from 10-09-st-space-style-customization-meet-space-requirements to develop October 11, 2025 06:59
@sfc-gh-lwilby sfc-gh-lwilby force-pushed the 10-09-st-space-frontend-rendering branch from f1606bc to 3622f59 Compare October 11, 2025 08:15
@sfc-gh-lwilby sfc-gh-lwilby enabled auto-merge (squash) October 11, 2025 08:15
@sfc-gh-lwilby sfc-gh-lwilby merged commit 5e7d63a into develop Oct 11, 2025
38 checks passed
@sfc-gh-lwilby sfc-gh-lwilby deleted the 10-09-st-space-frontend-rendering branch October 11, 2025 08:39
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