Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for scroll container via the height parameter #7697

Merged
merged 20 commits into from Nov 30, 2023

Conversation

LukasMasuch
Copy link
Collaborator

@LukasMasuch LukasMasuch commented Nov 9, 2023

Describe your changes

This PR adds support for scroll container by setting the height parameter of st.container, e.g.:

with st.container(height=200):
    st.chat_message("user").write("Hello world")

GitHub Issue Link (if applicable)

Closes #2169
Closes #2447

Testing Plan

  • Added e2e tests and unit tests.

Contribution License Agreement

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

@LukasMasuch LukasMasuch marked this pull request as ready for review November 28, 2023 00:51
@LukasMasuch LukasMasuch changed the title Add scroll container Add support for scroll container via the height parameter Nov 28, 2023
Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

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

proto change LGTM

@LukasMasuch LukasMasuch merged commit 1dd5cca into develop Nov 30, 2023
44 checks passed
@LukasMasuch LukasMasuch deleted the feature/scroll-container branch January 23, 2024 00:22
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
…t#7697)

* Add border parameter to container and form

* Add border parameter

* Add snapshots

* Add note to form docstring

* Add height props

* Add frontend implementation for scroll container

* Allow empty for containers with height

* Activate scroll to bottom for chat messages

* Update e2e test

* Add unit test

* Fix proto

* Fix test

* Update e2e tests

* Fix comment

* Add missing snapshots

* Add unit test for Block

* Change to a more performance optimized implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Independently scroll columns Add a height argument to st.container and st.expander
3 participants