kobalte icon indicating copy to clipboard operation
kobalte copied to clipboard

feat: stepper component added

Open Waishnav opened this issue 1 year ago • 7 comments

Waishnav avatar Nov 07 '24 07:11 Waishnav

Deploy Preview for kobalte ready!

Name Link
Latest commit
Latest deploy log https://app.netlify.com/sites/kobalte/deploys/673bbae8938ade42f8530ccc
Deploy Preview https://deploy-preview-523--kobalte.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 07 '24 07:11 netlify[bot]

Thanks for the PR!

There's a few changes needed around accessibility, mostly using a <Tabs> component internally instead of re-implementing them.

Thanks for the detailed review. I've push the new commit and used the Tabs component internally. could you please go through new changes.

Waishnav avatar Nov 13 '24 12:11 Waishnav

The previous button is not functioning correctly. When at step 1, it works as expected. However, when navigating to step 2 and then clicking previous, instead of returning to step 1, it moves to step 3.

hngngn avatar Nov 16 '24 10:11 hngngn

The previous button is not functioning correctly. When at step 1, it works as expected. However, when navigating to step 2 and then clicking previous, instead of returning to step 1, it moves to step 3.

its old deployment, I've fixed it in new commits.

Waishnav avatar Nov 16 '24 11:11 Waishnav

Why are there two components Stepper.Item and Stepper.Trigger? Can't they be combined into one? Stepper.Item also gets confused with Stepper.Content

zobweyt avatar Nov 18 '24 14:11 zobweyt

In the form example the "Enter" key is ignored. I think this is an accessibility issue

zobweyt avatar Nov 18 '24 14:11 zobweyt

What do you think about introducing something like onBeforeStepChange? This will allow us to handle step validation easier. We could listen to this event inside a specific step component and compare the current index with the step index. This way we can move all the validation logic to each individual step, which will help us eliminate long components. As a result, we will wrap each step component in a separate wrapper. This is very useful in complex forms.

Or you can add events to the step component directly, so you don't need to compare the index each time. This is a cool feature for end users and extensibility.

By using onBeforeStepChange you can cancel navigation programmatically and thus indicate that something is wrong with the current step.

zobweyt avatar Nov 18 '24 14:11 zobweyt

what happend? :(

MarekJavurek avatar Oct 21 '25 04:10 MarekJavurek