-
Notifications
You must be signed in to change notification settings - Fork 816
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
feat: add stepper component #718
Conversation
@mikezzb is attempting to deploy a commit to the Documenso Team Team on Vercel. A member of the Team first needs to authorize it. |
Important Auto Review SkippedAuto reviews are limited to the following labels: coderabbit. Please add one of these labels to enable auto reviews. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the TipsChat with CodeRabbit Bot (
|
Hey there, it looks like you haven't accepted our contributor license agreement yet. In order for us to accept your pull request we ask that you please fill out the CLA: |
Should we integrate the next / prev button and the step progress bar inside Stepper or let the Stepper children handle it? I can modify it based on the updated design and will add more documentation and example usage after the design is confirmed. |
Ideally stepper children would handle it which would be another argument for having it via context, overall this is the start of a nice solution but needs a bit of refinement before it can be accepted. My ideal solution provides the kind of API described in the issue where my children can deal with most of their logic removing the need for the current "document flow" that is mostly a bandaid around not having this component/api. |
As mentioned on the other PR, yourself and #720 are both bringing some fantastic ideas on how to solve this. I reckon working together would net an amazing result, hope ya'll consider it! 🙌 |
import type { FC } from 'react'; | ||
|
||
type StepContextType = { | ||
stepIndex: number; |
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.
Perhaps we also need an isCompleting
or similar context value for forms that have async complete actions!
This is likely going to be the winner, sorry @G3root 💚 The API looks fine, code is looking great just a minor tweak to add a property and some questions around how we can remove some of nasty document flow cruft. Would love a loom but it's not totally required. |
Fixes #708
Created a stepper component that will enhance the user experience and reduce the complexity of current multistep forms.
Features
onComplete
oronStepChanged
WithStep<T>
as an interface for stepper childrenExample:
EditDocumentForm
using the new stepper