Skip to content

feat(stepper): Add documentation for stepper - #6533

Merged
g1shin merged 2 commits into
angular:stepperfrom
g1shin:readme
Aug 21, 2017
Merged

feat(stepper): Add documentation for stepper#6533
g1shin merged 2 commits into
angular:stepperfrom
g1shin:readme

Conversation

@g1shin

Copy link
Copy Markdown

No description provided.

@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 17, 2017
Comment threadsrc/lib/stepper/stepper.md Outdated
@@ -0,0 +1,128 @@
Angular Material stepper walks users through multi-step processes by breaking them up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The docs pattern I've been trying to keep is something like

  • One-sentence summary of the component (tabs docs seem to be the exception)
  • Live overview example
  • Individual sections specific to the component
  • Accessibility section

The live example can go in a follow up PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd make the first sentence tagline something like

Angular Material's stepper provides a wizard-like workflow by dividing content into logical steps.

that drives a stepped workflow. Material stepper extends the CDK stepper and has Material Design
styling.

There are two stepper components: `md-horizontal-stepper` and `md-vertical-stepper`. They

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd put this under a header like ### Stepper variants

Comment threadsrc/lib/stepper/stepper.md Outdated


### Event
The `selectionChange` output event is emitted when the selected step changes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd omit the events section since the information is covered in the generated API docs (we should remove this from the tabs docs as well)

Comment threadsrc/lib/stepper/stepper.md Outdated
- <kbd>RIGHT_ARROW</kbd>: Focuses the next step header
- <kbd>ENTER</kbd>, <kbd>SPACE</kbd>: Selects the step that the focus is currently on
- <kbd>TAB</kbd>: Focuses the next tabbable element
- <kbd>TAB</kbd>+<kbd>SHIFT</kbd>: Focuses the previous tabbable element No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need an Accessibility section at the end that describes the a11y aspects of the component. In this case it should mention that the stepper is treated as a tabbed view for a11y purposes. Should also mention any required labels, etc.

@karakara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nits / typos

Comment threadsrc/lib/stepper/stepper.md Outdated
The `selectionChange` output event is emitted when the selected step changes.

### Labels
If a step's label is only text then `label` attribute can be used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"If a step's label is only text, then the label attribute can be used."

Comment threadsrc/lib/stepper/stepper.md Outdated
```

### Linear stepper
`linear` attribute can be set on `md-horizontal-stepper` and `md-vertical-stepper` to create

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

linear attribute -> The linear attribute

Comment threadsrc/lib/stepper/stepper.md Outdated
### Linear stepper
`linear` attribute can be set on `md-horizontal-stepper` and `md-vertical-stepper` to create
a linear stepper that requires the user to complete previous steps before proceeding
to following steps. For each `md-step`, `stepControl` attribute can be set to the top level

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

stepControl attribute -> the stepControl attribute

Comment threadsrc/lib/stepper/stepper.md Outdated
using a different form for each step.

#### Using a single form
When using a single form for the stepper, `mdStepperPrevious` and `mdStepperNext` has to be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

has to be -> have to be

Comment threadsrc/lib/stepper/stepper.md Outdated
### Types of steps

#### Optional step
If completion of a step in linear stepper is not required, then `optional` attribute can be set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

optional attribute -> the optional attribute

Comment threadsrc/lib/stepper/stepper.md Outdated

#### Editable step
By default, steps are editable, which means users can return to previously completed steps and
edit their responses. `editable="true"` can be set on `md-step` to change the default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing the period at the end

Comment threadsrc/lib/stepper/stepper.md Outdated
edit their responses. `editable="true"` can be set on `md-step` to change the default

#### Completed step
By default, `completed` attribute of a step returns `true` if the step is valid (in case of

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

completed attribute -> the completed attribute

@g1shin

Copy link
Copy Markdown
Author

Revised based on review. Ready for review again 👍

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@jelbourn

Copy link
Copy Markdown
Contributor

I'll leave it to @kara or @mmalerba for a final review

@karakara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. @mmalerba ?

@karakara removed their assignment Aug 18, 2017
@mmalerba

Copy link
Copy Markdown
Contributor

lgtm

@g1shin
g1shin merged commit bc8407e into angular:stepperAug 21, 2017
g1shin pushed a commit to g1shin/material2 that referenced this pull request Aug 22, 2017
* Documentation for stepper
* Revision based on review + add accessibility section
g1shin pushed a commit to g1shin/material2 that referenced this pull request Aug 22, 2017
* Documentation for stepper
* Revision based on review + add accessibility section
g1shin pushed a commit to g1shin/material2 that referenced this pull request Aug 22, 2017
* Documentation for stepper
* Revision based on review + add accessibility section
@angular-automatic-lock-bot

ghost commented Sep 6, 2019

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 6, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yesPR author has agreed to Google's Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@g1shin@jelbourn@mmalerba@kara@googlebot@jwshinjwshin