marimo icon indicating copy to clipboard operation
marimo copied to clipboard

mo.ui.slider: show value on hover

Open akshayka opened this issue 1 year ago • 1 comments

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

akshayka avatar Jan 22 '24 22:01 akshayka

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 avatar Jan 25 '24 01:01 abant07

@abant07 are you still actively working on this? Might otherwise have a look myself.

ericjanto avatar Jun 19 '24 20:06 ericjanto

No sorry, go ahead and take it over

abant07 avatar Jun 19 '24 20:06 abant07

@ericjanto - let us know if you need any help getting started

mscolnick avatar Jul 01 '24 16:07 mscolnick

@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?

ericjanto avatar Jul 12 '24 11:07 ericjanto

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)

mscolnick avatar Jul 12 '24 16:07 mscolnick

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.

ericjanto avatar Jul 12 '24 18:07 ericjanto

@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!

ericjanto avatar Aug 10 '24 13:08 ericjanto

@akshayka @ericjanto I wanted to get a look at what this is referring to and found this image Image shows a tool tip on the mo.ui.slider showing a value Am I correct in assuming that this issue can be closed?

bookofbash avatar Aug 12 '24 03:08 bookofbash

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.

akshayka avatar Aug 12 '24 03:08 akshayka