Skip to content

Conversation

@jonathan-herbault
Copy link

@jonathan-herbault jonathan-herbault commented Dec 3, 2025

DESCRIPTION

This Pr aims to update de stepper to be more responsive and not broken on little screen.

The different main changes are (https://linear.app/wttj/issue/WUI-242/component-or-stepper) :

  • Stepper item can no longer take 2 lines.
  • Stepper item and separator keep their size.
  • Stepper correctly scroll horizontally.
  • The Stepper item selected is centered (if possible on the center of the stepper)
  • If the Stepper is scrolling, now show a fade (left or right). The fade should not appear if you are at 0% for the left or 100% for the right.

HOW TO TEST

Find the Stepper component.
Check that previous exemples are not broken.
A new exemple responsive has been added to demonstrate (and help to test) the responsive of the Stepper.

SCREENSHOTS / SCREEN RECORDINGS

Scroll Right fade:

image

Both scroll fade:
image

Scroll left fade :
image

ANIMATION:
https://github.com/user-attachments/assets/910eb84f-55b3-46c6-8781-09af7b5fcb1a

COMPATIBILITY

  • Tested on Safari (desktop)
  • Tested on Chrome (desktop)
  • Tested on Firefox (desktop)
  • Tested on mobile device sizes
  • Tested on tablet device sizes
  • Tested on IOS Safari (either device or simulator)

QA

  • Thoroughly tested in local environment
  • Added tests for all new features
  • Added tests that considered edge cases

@linear
Copy link

linear bot commented Dec 3, 2025

@github-actions github-actions bot added the wip label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

👀 Visit Preview

@jonathan-herbault jonathan-herbault changed the base branch from main to chore-belonging December 3, 2025 08:35
@jonathan-herbault jonathan-herbault marked this pull request as ready for review December 3, 2025 09:12
@jonathan-herbault jonathan-herbault requested a review from a team as a code owner December 3, 2025 09:12
@github-actions github-actions bot added to-review and removed wip labels Dec 3, 2025
@cnairi
Copy link
Contributor

cnairi commented Dec 8, 2025

Could you please rebase @jonathan-herbault?
Guidelines are here to avoid massive conflics: https://wttj.slack.com/archives/C09CT2BSF0B/p1763989674754069?thread_ts=1763720141.002349&cid=C09CT2BSF0B

thanks

@jonathan-herbault jonathan-herbault force-pushed the wui-242-component-stepper-responsive branch from 0a00500 to f05d37b Compare December 9, 2025 10:10
@jonathan-herbault
Copy link
Author

Could you please rebase @jonathan-herbault? Guidelines are here to avoid massive conflics: https://wttj.slack.com/archives/C09CT2BSF0B/p1763989674754069?thread_ts=1763720141.002349&cid=C09CT2BSF0B

thanks

@cnairi sounds good now. And thx for the tips !

@cnairi cnairi force-pushed the wui-242-component-stepper-responsive branch from f05d37b to 1f674c5 Compare December 11, 2025 09:20
Copy link
Contributor

@Isaacmaamouche Isaacmaamouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think using the intersection observer to check for the first step item and its container left boundary (same for last item and right boundary) could be better for performance but that could mean a complete rework of what you did.
I can try giving it a shot in the coming week. For now, this is still great!

Comment on lines +39 to +70
&.fade-left::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 70px;
background: linear-gradient(
to right,
var(--components-colors-stepper-color-background),
transparent
);
pointer-events: none;
z-index: 1;
}

&.fade-right::after {
content: '';
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 70px;
background: linear-gradient(
to left,
var(--components-colors-stepper-color-background),
transparent
);
pointer-events: none;
z-index: 1;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can have a basic class for

content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      width: 70px;
      pointer-events: none;
      z-index: 1;

Then have a class for each with

right: 0;
 background: linear-gradient(
        to left,
        var(--components-colors-stepper-color-background),
        transparent
      );

overflow: hidden;
}

.root {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe root and wrapper can be switch name

Comment on lines +31 to +32
-ms-overflow-style: none;
scrollbar-width: none;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep scrollbar, even if is not beautiful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants