JuliaPluto / PlutoUI.jl

https://featured.plutojl.org/basic/plutoui.jl
The Unlicense
299 stars 54 forks source link

Adding `TimePicker` #181

Closed icweaver closed 2 years ago

icweaver commented 2 years ago

Follow-up from #179

github-actions[bot] commented 2 years ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/icweaver/PlutoUI.jl", rev="time_picker")
julia> using PlutoUI

Or run this code in your browser: Run with binder

icweaver commented 2 years ago

Ok things should be up! Here's a quick demo showing the points you brought up in the previous thread:

Screenshot from 2022-01-06 15-54-21

Is this what you had in mind? It looks like we can also input milliseconds if step < 1. Should I add this in too? Also, how unhappy should I be that I made this type-unstable?

https://github.com/JuliaPluto/PlutoUI.jl/blob/10ec4a0726219c77292f6f7ba50bf382aa15b82d/src/Builtins.jl#L895

At any rate, happy to add tests/docs next once the implementation looks alright to you!

icweaver commented 2 years ago

Went ahead and added some tests (9bb2702) with the current impl. btw, things are looking so slick now with the new dark mode, looking forward to trying it with the DatePicker!

Screenshot from 2022-01-21 14-05-19