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

website: Update Stepper documenation #1161

Merged
merged 11 commits into from
Mar 30, 2023
Merged

Conversation

adamhock
Copy link
Contributor

Changes

Testing

N/A

Docs

N/A

@adamhock adamhock requested a review from a team as a code owner March 28, 2023 04:05
@adamhock adamhock requested review from a team, mayank99 and elephantcatdog and removed request for a team March 28, 2023 04:05
There are two different styles of stepper, depending on the amount of steps required to complete the process.

### Short Stepper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should an example for a "short" stepper be shown here even if it's similar (if not identical) to the main example at the top of the page?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know what would be best to do here, and this will likely pop up in future #961 PRs. I would like to hear @iTwin/itwinui thoughts on this.

If we don't get a clear direction from the comments, just do what you think is best and we can make sweeping changes once we make it to the end of documentation site content updates.

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 the main example should be "the best version" of the component. The style of the stepper is defined by a prop and not automatically so I think we should have separate example of Short stepper just to say that this style is default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An example for short stepper has been added

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you do main and short example a bit more different? Maybe make short stepper to have only 3 steps or smth.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The short example now only has 3 steps and the step labels are different from the main example

apps/website/src/pages/docs/stepper.mdx Show resolved Hide resolved

The user may click on previous steps to go back. [Tooltips](tooltip) can also be implemented to give more information about a particular step.

Designers should confirm the display is acceptable due to the number of steps and labels at various resolutions. If text wrapping occurs or the stepper's visual quality decreases significantly when the window is re-sized, use the long stepper instead (see below).
Copy link
Contributor

Choose a reason for hiding this comment

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

Review this paragraph - is kinda confusing to read it.
Also use links to sections and not (see below)


### Short Stepper

The default "short" stepper example is suggested for processes with four (4) steps or less. Each step is named under the circle. This stepper is suggested if the step names can be summarized with very short labels. For example, instead of “Complete Billing Information”, simply use “Billing.”
Copy link
Contributor

Choose a reason for hiding this comment

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

Move usage guidelines to Usage section. You could also add example layout there.

Copy link
Contributor Author

@adamhock adamhock Mar 28, 2023

Choose a reason for hiding this comment

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

The usage guidelines have been moved to the usage section. The layout example is a WIP

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The layout example has been updated. I decided to go with a simpler layout than the screenshots provided, but there's a small bug I'm running into with inputs that I'm tackling

StepperLayoutExampleBug

Copy link
Contributor

Choose a reason for hiding this comment

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

You can add state management for inputs.
Or leave it as is because it's not a complete example.

Copy link
Contributor

Choose a reason for hiding this comment

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

there is no need for state. you can fix the bug by using a different key for the different inputs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@FlyersPh9 FlyersPh9 added the documentation Improvements or additions to documentation label Mar 28, 2023

3. **Content**

4. [**Buttons**](button): A [call-to-action button](button#call-to-action) for progress & one or two [default](button#default) buttons for canceling and/or going back one step. If the user has not completed a required task, the call-to-action button may be disabled. If the stepper is in a full screen page, the buttons can be placed within a sticky footer.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The hyperlinks for CTA and default buttons coincide with #1158

@adamhock adamhock added this pull request to the merge queue Mar 30, 2023
Merged via the queue into main with commit 8790577 Mar 30, 2023
@adamhock adamhock deleted the adam/stepper-documentation branch March 30, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants