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

datetimes that are close together on silder used for ranges are illegible. #3385

Closed
cjw296 opened this issue Jun 8, 2021 · 6 comments · Fixed by #7221
Closed

datetimes that are close together on silder used for ranges are illegible. #3385

cjw296 opened this issue Jun 8, 2021 · 6 comments · Fixed by #7221
Assignees
Labels
area:styling feature:st.slider priority:P2 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working

Comments

@cjw296
Copy link

cjw296 commented Jun 8, 2021

Steps to reproduce

Here's an example:

from datetime import date
import streamlit as st

dates = st.slider('date range',
                  min_value=date(2019, 8, 1), max_value=date(2021, 6, 4),
                  value=(date(2021, 5, 21), date(2021, 6, 4)))

Expected behavior:

Legible dates and handles on the slider.

Actual behavior:

image

Is this a regression?

no

Debug info

  • Streamlit version: Streamlit, version 0.81.1
  • Python version: Python 3.9.4
  • Using Conda? yes
  • OS version: Windows 10
  • Browser version: Latest Chrome

Additional information

It probably makes sense to right-align the lower end of the range and left-align the upper end of the range.

@cjw296 cjw296 added type:bug Something isn't working status:needs-triage Has not been triaged by the Streamlit team labels Jun 8, 2021
@kmcgrady
Copy link
Collaborator

kmcgrady commented Jul 7, 2021

Thanks for the feedback here @cjw296 ! I will put this in our backlog!

@kmcgrady kmcgrady added area:styling status:confirmed Bug has been confirmed by the Streamlit team and removed status:needs-triage Has not been triaged by the Streamlit team labels Jul 7, 2021
@lawilby
Copy link
Contributor

lawilby commented Sep 9, 2021

Had conversation with PM about this issue and we should try stacking the dates when they are overlapping as a solution. Recording conversation here in case someone else picks up this issue.

@WestedCrean
Copy link

Hey, happy to work on this as I already did it for a project - should they be stacked both above the slider or one above, one below as on screen?

obraz

@vdonato
Copy link
Collaborator

vdonato commented Mar 20, 2023

Hm, CCing @jrieke to get an opinion on this. I think I'd prefer one above/one below as shown in the screenshot, but a member of the product team should probably make the call.

@jrieke
Copy link
Collaborator

jrieke commented Apr 4, 2023

Oops, sorry for the delay! Just saw this now. I think my preference would actually be to do it like this:

CleanShot 2023-04-05 at 01 08 33

I.e. just have the left date offset a bit to the left, so it doesn't overlap the right date. With stacking vertically, I think we'll run into trouble quickly. If we stack both dates above the slider, they are so high they they'll overlap the widget label on the left side. If we stack one above/one below, then it looks very cramped and it's also a bit confusing which date is which.

@NanisTe
Copy link

NanisTe commented Jun 5, 2023

Why do we need moving values we could have visually fixed min max values below the slider and fixed min max selection values above the slider. No moving or realigning needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:styling feature:st.slider priority:P2 status:confirmed Bug has been confirmed by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants