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

Set step in DatetimeRangeSlider to 1 minute #6373

Merged
merged 4 commits into from
Feb 23, 2024

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Feb 22, 2024

I noticed the step was set to 1ms on DatetimeRangeSlider; this sets it to a more sensible default.

This makes it possible to update the sliders with the arrow key and actual see a change.

screenrecord-2024-02-22_10.03.08.mp4
import panel as pn
from datetime import datetime
pn.extension()

pn.widgets.DatetimeRangeSlider(value=(datetime(2020, 1, 1), datetime(2020, 3, 1)), start=datetime(2020, 1, 1), end=datetime(2020, 3, 1))

@hoxbro hoxbro changed the title Add step to DatetimeRangeSlider Set step in DatetimeRangeSlider to 10 minutes Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.63%. Comparing base (b9b7613) to head (f8cbcb8).
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6373       +/-   ##
===========================================
+ Coverage   71.63%   83.63%   +11.99%     
===========================================
  Files         305      305               
  Lines       45568    45589       +21     
===========================================
+ Hits        32644    38129     +5485     
+ Misses      12924     7460     -5464     
Flag Coverage Δ
ui-tests 39.66% <100.00%> (?)
unitexamples-tests 71.62% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@philippjfr
Copy link
Member

I'm fine with this but maybe 1 minute or 1 hour is a more "standard" default?

panel/widgets/slider.py Outdated Show resolved Hide resolved
@hoxbro
Copy link
Member Author

hoxbro commented Feb 23, 2024

Update to 1 minute.

@hoxbro hoxbro changed the title Set step in DatetimeRangeSlider to 10 minutes Set step in DatetimeRangeSlider to 1 minute Feb 23, 2024
@philippjfr philippjfr merged commit 8c8d1ec into main Feb 23, 2024
14 of 15 checks passed
@philippjfr philippjfr deleted the add_step_datetimerangeslider branch February 23, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants