marimo
marimo copied to clipboard
mo.ui.slider: show value on hover
Description
When hovering over a location in the slider (not necessarily the knob), it would be helpful to know what value would be selected on click.
Suggested solution
Show the value as a tooltip on hover. Potentially make this configurable in the Python API.
Alternative
No response
Additional context
No response
Hi can I work this as well. Is there anything I should know while reproducing the environment or the ReadMe is good enough?
Thanks! Amogh
@abant07 are you still actively working on this? Might otherwise have a look myself.
No sorry, go ahead and take it over
@ericjanto - let us know if you need any help getting started
@mscolnick Thank you for offering help getting started. I'm having a look at this right now but I'm not sure my development setup is correct. I tried to make a few changes (e.g. add a classname) to the RangeSlider
component in range-slider.tsx
but I can't see them in the front-end.
I run marimo edit --no-token --headless notebook.py
and pnpm dev
and open the localhost associated with the Vite dev server in my browser. Anything I might be missing?
Which URL are you visiting when you run those commands? http://localhost:3000/
?
You may need to refresh after changing some classnames since if its a new classname, it may not exist on the shadow dom (which each component is)
Yes, I'm visiting the :3000 URL and I also tried refreshing the page. Very peculiar.
I added a console.log statement and it appeared, so I might just go ahead anyway.
@mscolnick Realistically I won't be able to work on this in the near future–I'm currently busy with a relocation process. If anyone else wants to work on this, it's free for grabs!
@akshayka @ericjanto I wanted to get a look at what this is referring to and found this
Image shows a tool tip on the mo.ui.slider showing a value
Am I correct in assuming that this issue can be closed?
I believe it was for hovering on a specific location in the slider different from the knob. But I think this isn't necessary. For cases when you want that much control, maybe the user should use mo.ui.number. We can close.