-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DS-219] Add SegmentedControl component #566
Conversation
🦋 Changeset detectedLatest commit: fdf3904 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for wl-hopper ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
packages/components/src/SegmentedControl/src/SegmentedControl.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/src/SegmentedControl.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/src/SegmentedControlItem.module.css
Show resolved
Hide resolved
eb590da
to
a5cf027
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The animation in the "preview" example looks weird. When selecting an item for the first time (if no button was selected before), there is an animation that makes it appear from the left, but it should just select without the sliding animation
In fact it's only noticeable on the left most one
packages/components/src/SegmentedControl/src/SegmentedControl.module.css
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/src/SegmentedControl.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/src/SegmentedControlItem.module.css
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/src/SegmentedControl.module.css
Outdated
Show resolved
Hide resolved
packages/components/src/SegmentedControl/tests/jest/SegmentedControl.test.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some errors in the console: "A component changed from uncontrolled to controlled". Most likely related to the internal state we're keeing in the SegmentedControl
a5cf027
to
ba5e3eb
Compare
packages/components/src/SegmentedControl/src/SegmentedControlItem.module.css
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're really now in the fine tuning section, but when focusing the segmented control with the keyboard, the outline is barely visible. Now that it's now showing on click, it's really ok to have a big blue outline like the buttons have.
Added the segmented control component