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

[BUG] Sidebar Button Position Not Relative #3

Open
mykolaskrynnyk opened this issue Sep 30, 2024 · 0 comments
Open

[BUG] Sidebar Button Position Not Relative #3

mykolaskrynnyk opened this issue Sep 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mykolaskrynnyk
Copy link
Contributor

Describe the bug

When enabling a sidebar, the button to open/close it is not properly positioned relative to the screen size. The position shifts up and down depending on screen resolution. For some resolutions, it is not visible altogether.

To Reproduce

import st_undp
import streamlit as st

st_undp.apply_style()

with st.sidebar:
    with st.form("qux"):
        for i in range(3):
            st.text_input(f"foo {i}")
        st.form_submit_button("bar", type="primary")

st.json(st.session_state)

Change display resolution to see the position shifts.

Expected behavior

The position should be relative to the height (of the viewport) so that the button's position is stable.

Screenshots

Small
Medium
Large

Desktop (please complete the following information):

All devices.

Smartphone (please complete the following information):

All devices.

Additional context

None.

@mykolaskrynnyk mykolaskrynnyk added the bug Something isn't working label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants