mui / mui/material-ui

[slider] Show value tooltip when hovering a slider thumb with disableSwap true

Open
#30,753 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: slider type: new feature
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Summary 💡

Hovering on a slider thumb should make a tooltip with the thumb's value pop out when valueLabelDisplay is set to auto and disableSwap is set. Just like it does when disableSwap is not set.

Examples 🌈

https://codesandbox.io/s/pensive-dream-w91mx?file=/src/App.js

In this example, the only difference between the two sliders is that disableSwap is set on the second one.
A tooltip showing the value of the thumb should pop out when hovering on the thumb regardless of whether disableSwap is set or not.

Motivation 🔦

I don't think that setting disableSwap should change the behavior of valueLabelDisplay.
It is unexpected and makes disableSwap unusable when you need to maintain the ability to show the thumbs' value on hover.

I thought it was a bug at first, but it seem it may have been the intended behavior (https://github.com/mui-org/material-ui/pull/25547#pullrequestreview-623291082), so I'm filing a feature request instead.

I could take a stab at it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the /src/App.js example in the linked CodeSandbox and compare the two sliders, focusing on valueLabelDisplay="auto" with and without disableSwap. Done means hovering either thumb shows its value tooltip in both configurations without changing the existing disableSwap behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.