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

Redesign and improve slider widgets #13551

Open
wants to merge 5 commits into
base: branch-3.5
Choose a base branch
from
Open

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Nov 26, 2023

This PR replaces noUiSlider-based implementation of slider widgets with an "in-house" implementation. This is an early work in progress that preserves (so far) most of the original functionality, improves and simplifies styling, reuses bokehjs' components like tooltips and implements more types sliders.

This PR also adds rudimentary support for property overrides, like:

class BaseSlider(Model):
  value = Any()
class NumberSlider(BaseSlider):
  value = Override(Float())

Example showing normal and stealth sliders:

image

Example showing customization via stylesheets (see examples/styling/widgets/color_sliders.py):

Screencast.from.27.11.2023.00.44.19.webm

@mattpap mattpap added this to the 3.4 milestone Nov 26, 2023
Copy link

codecov bot commented Nov 26, 2023

Codecov Report

Attention: Patch coverage is 97.95918% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.65%. Comparing base (d9a2f7a) to head (5930ea7).

Additional details and impacted files
@@             Coverage Diff             @@
##           branch-3.5   #13551   +/-   ##
===========================================
  Coverage       92.65%   92.65%           
===========================================
  Files             326      326           
  Lines           20734    20759   +25     
===========================================
+ Hits            19211    19235   +24     
- Misses           1523     1524    +1     

@jbednar
Copy link
Contributor

jbednar commented Nov 26, 2023

Can the text value be editable, if enabled? Can we have both hard and soft bounds? #9943

@mattpap
Copy link
Contributor Author

mattpap commented Nov 26, 2023

Can the text value be editable, if enabled? Can we have both hard and soft bounds? #9943

Eventually yes. One of the goals of this work is to allow such features to be implemented, but that will happen in follow-up work.

@mattpap mattpap modified the milestones: 3.4, 3.5 Jan 11, 2024
@mattpap mattpap added the tag: CSS CSS, styling, theming and widget design. label Jan 11, 2024
@mattpap mattpap removed the tag: CSS CSS, styling, theming and widget design. label Feb 27, 2024
@mattpap mattpap force-pushed the mattpap/10081_sliders branch 2 times, most recently from 029e8a8 to 510ecb0 Compare February 27, 2024 10:29
@mattpap mattpap changed the base branch from branch-3.4 to branch-3.5 March 14, 2024 16:51
@mattpap mattpap force-pushed the mattpap/10081_sliders branch 2 times, most recently from 1de3a9f to 4638dfd Compare March 19, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment