[MobileStepper] Add ability to maintain the 3 dots exactly at center of the whole stepper width, whatever is the width of "Back" and "Next"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
In you demo page https://material-ui.com/components/steppers/#dots you use words "Back" and "Next", plus an icon for each, so the width of these buttons are exactly the same, so we see 3 dots exactly at middle of the Stepper container.
But if you change the labels by let's say "Previous" and "Next" (or change locale of these labels), then the buttons width is not the same, and the 3 dots move a bit to the right and so they are not centered anymore with the whole Stepper container.
- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
You could add an option to let developer decide if dots should:
- current behaviour: maintain exactly the same space between:
**Backto 3 dots (on the left side of stepper)
** 3 dots toNext(on the right side of stepper)
OR - new behaviour: remain always at middle of stepper
Examples 🌈
import MobileStepper from '@material-ui/core/MobileStepper';
export default function DotsCenteredMobileStepper() {
...
return (
<MobileStepper
...
variant="dots"
dotPosition="centered"
nextButton={
<Button ... >
Next
</Button>
}
backButton={
<Button ... >
Back
</Button>
}
/>
);
}
Motivation 🔦
This option would help to:
- set dot position exactly at the middle of Stepper, so in some cases it could help container design, for example to do some alignment
- maintain position of dots if Back/Next buttons label are changing during navigation through steps
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MobileStepper component and its variant="dots" behavior, then compare it with the dots demo linked in the issue. Review how backButton and nextButton widths affect the layout and determine the API and tests needed for centered dots. Done means the requested centered positioning works with unequal or localized button labels without changing current behavior by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100