Skip to content
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

[Resource referencing] Multi-Step Form with Stepper - V2 Mandatory fields #423

Open
ChaimaaZaoui opened this issue Jul 24, 2023 · 3 comments
Labels
feature 🤌 new features

Comments

@ChaimaaZaoui
Copy link

ChaimaaZaoui commented Jul 24, 2023

As a user,
I want to have a clear understanding of my progress in a multi-step form by visualizing it through a stepper component,
and I want to be able to navigate through the form using Next and Previous buttons.

Acceptance criteria

Scenario 1: Moving forward

Given that I am on a specific step of the Resource referencing process,
When I have completed the required fields on the current step,
Then the Next button should be active which allows me to proceed to the next step.

Given that I am on a specific step of the Resource referencing process,
When I have not completed the required fields on the current step,
Then the Next button remain inactive and non-clickable.

Given that I am on the last step of the Resource referencing process,
Then the Next button should be hidden.

┆Issue is synchronized with this Wrike task by Unito

@ChaimaaZaoui ChaimaaZaoui added feature 🤌 new features Ready for TechSpec Ticket to be pulled into Technical specification column labels Jul 24, 2023
@loiclaudet
Copy link
Contributor

@ChaimaaZaoui our stepper already handles Next/Previous buttons state.

However we need to add validation rules for ShareData steps 3 and 4.

We can either create a dedicated ticket to handle both step validation states,
or update this issue description, as you prefer.

If we create a new issue, we can copy the following spec for step validation rules:

Tech Spec

Validation Domain

  • Create a validation domain that validates shared data.

This domain must expose :

  • a validation logic for each field, in order to display the appropriate field state, display a possible error, etc, to the user.
  • a validation function that reflects the valid state of the step, in order control Next button state.

Several schema validation libraries can be used to help for forms input validation, such Zod.

Apply validation to the step

  • Define the validate function in shareDataset.tsx, that calls the exposed the validation function from the domain.

@loiclaudet loiclaudet added Ready for PP Ticket ready to be in the Planning poker ceremony and removed Ready for TechSpec Ticket to be pulled into Technical specification column labels Sep 19, 2023
@ChaimaaZaoui
Copy link
Author

@0xLodz this issue is mainly about the validation when mandatory fields are completed. I just reminded the general functioning to link it to the initial US.

@ChaimaaZaoui ChaimaaZaoui removed the Ready for PP Ticket ready to be in the Planning poker ceremony label Sep 25, 2023
@AnjaMis AnjaMis moved this to 📋 Backlog in 💻 Development Sep 29, 2023
@AnjaMis AnjaMis moved this from 📋 Backlog to 📆 To do in 💻 Development Sep 29, 2023
@loiclaudet loiclaudet self-assigned this Oct 5, 2023
@loiclaudet
Copy link
Contributor

@ChaimaaZaoui for share data step 3,

  • what is/are the errors messages that must be displayed below the mandatory title field?

  • what are the rules for this field to be considered as mandatory? At least one non-space character?

  • from when do we display errors? After Next button click, or from the fact the field is "dirty" (user has interacted with it)?

Thanks.

@AnjaMis AnjaMis moved this from 📆 To do to 🏗 In progress in 💻 Development Oct 6, 2023
@ccamel ccamel moved this from 🏗 In progress to 🚫 Blocked in 💻 Development Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🤌 new features
Projects
Status: 🚫 Blocked
Development

No branches or pull requests

2 participants