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 DatetimeSlider widget #7374

Merged
merged 19 commits into from
Oct 31, 2024
Merged

Add DatetimeSlider widget #7374

merged 19 commits into from
Oct 31, 2024

Conversation

thuydotm
Copy link
Collaborator

@thuydotm thuydotm commented Oct 8, 2024

This MR adds DatetimeSlider widget, which is mentioned in #1972. The code is mainly based on Bokeh DateSlider model and the existing Panel DateSlider widget. Huge thanks to @hoxbro for your support!

TODO:

  • add tests
  • add reference notebook

@thuydotm
Copy link
Collaborator Author

thuydotm commented Oct 8, 2024

I’m think about the unit for step param? Looking at the existing datetime select widget, DatetimeRangeSlider, the unit is in ms. But we only display the information up to seconds with format "%d %b %Y %H:%M:%S", should it be second instead of ms?

@thuydotm
Copy link
Collaborator Author

thuydotm commented Oct 8, 2024

pre-commit.ci autofix

@thuydotm thuydotm requested a review from hoxbro October 11, 2024 10:57
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.23%. Comparing base (4e146af) to head (7398483).
Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7374      +/-   ##
==========================================
+ Coverage   81.42%   82.23%   +0.81%     
==========================================
  Files         337      338       +1     
  Lines       50514    50598      +84     
==========================================
+ Hits        41131    41611     +480     
+ Misses       9383     8987     -396     

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

Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

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

I have left some small comments, but this PR seems solid overall.

panel/models/datetime_slider.py Outdated Show resolved Hide resolved
panel/tests/widgets/test_slider.py Outdated Show resolved Hide resolved
panel/widgets/slider.py Outdated Show resolved Hide resolved
panel/widgets/slider.py Outdated Show resolved Hide resolved
panel/widgets/slider.py Outdated Show resolved Hide resolved
panel/models/datetime_slider.ts Show resolved Hide resolved
panel/tests/widgets/test_slider.py Show resolved Hide resolved
@thuydotm
Copy link
Collaborator Author

@hoxbro thanks for reviewing! I've pushed the changes as suggested.

panel/models/timezone.d.ts Outdated Show resolved Hide resolved
panel/widgets/slider.py Outdated Show resolved Hide resolved
@philippjfr
Copy link
Member

Thanks @thuydotm!!

@philippjfr philippjfr merged commit f712587 into holoviz:main Oct 31, 2024
18 checks passed
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.

4 participants