|
| 1 | +--- |
| 2 | +# Sidenav top-level section |
| 3 | +# should be the same for all markdown files for each extension |
| 4 | +section: extensions |
| 5 | +# Sidenav secondary level section |
| 6 | +# should be the same for all markdown files for each extension |
| 7 | +id: Quick Starts |
| 8 | +# Tab |
| 9 | +source: about |
| 10 | +--- |
| 11 | +# About |
| 12 | +The **@patternfly/quickstarts** extension is made up of two parts: `Quickstarts` and `In App Documenation` product documentation tools. |
| 13 | + |
| 14 | +## Full live demo application |
| 15 | +A live demo of **Quickstarts and In App Documentation** can be found [here](https://quickstarts.netlify.app/), or view the [demo code](https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/dev). |
| 16 | + |
| 17 | +A few key concepts are outlined below. |
| 18 | + |
| 19 | +## Quickstarts |
| 20 | +A `Quickstart` is a set of step-by-step instructions and tasks presented in a side panel embedded in a product’s UI. Quick starts can help users get started with a product, and they often provide guidance around installation and setup. |
| 21 | + |
| 22 | +Each task in a quick start has multiple steps, and each quick start has multiple tasks. The outcome of the quick start includes the artifacts or state needed to successfully use the product, specific features, or add-ons. |
| 23 | + |
| 24 | +<img src="./img/side-panel.png" alt="Side panel elements" width="449"/> |
| 25 | + |
| 26 | +For more detailed design guidelines and visuals see [here.](/extensions/quick-starts/design-guidelines#quickstarts) |
| 27 | + |
| 28 | +### Quickstart format |
| 29 | + |
| 30 | +#### For developers |
| 31 | +A detailed breakdown of the quickstart format in code can be seen [here](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/module/src/utils/quick-start-types.ts). |
| 32 | + |
| 33 | +Quickly preview a [basic exmaple](/extensions/quick-starts/Basic-Quick-Starts), and remember there is a [live demo](https://quickstarts.netlify.app/) with [full demo code](https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/dev). |
| 34 | + |
| 35 | +#### For content authors |
| 36 | +Quickstarts can be written in `yaml` with markdown support, `asciidoc`, or just `json`. For examples of each of these formats see [here](https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/dev/src/quickstarts-data) |
| 37 | + |
| 38 | +### Opening and closing the side panel |
| 39 | + |
| 40 | +#### Custom handler |
| 41 | +Open the side panel by calling the `setActiveQuickStart` or `setActiveQuickstartID` methods. These methods are provided by the `QuickStartContext` and can be accessed in your React components: |
| 42 | +```typescript |
| 43 | +const { setActiveQuickStart } = React.useContext<QuickStartContextValues>( |
| 44 | + QuickStartContext, |
| 45 | + ); |
| 46 | +``` |
| 47 | + |
| 48 | +#### Quickstart catalog |
| 49 | +By providing a set of quickstarts to the `QuickStartContainer`, a full page catalog view will be generated. Clicking on a catalog card will open its respective `Quickstart` in the side panel. |
| 50 | + |
| 51 | +<img src="./img/catalog.png" alt="Quick start catalog" width="1680"/> |
| 52 | + |
| 53 | +## In App Documenation |
| 54 | +In App Documentation is used to provide definitions for a set of topics relevant to your product. A single unit of In App Documentation can be called a `HelpTopic`, which is also the name used in code. `HelpTopic`'s essential sections are a **content** section that contains a definition of the term or topic, and an optional list of **links** to provide the user with other relevant information. |
| 55 | + |
| 56 | +`HelpTopics` are displayed in a side panel just like `Quickstarts`: |
| 57 | + |
| 58 | +<img src="./img/help-topic.png" alt="Quick start catalog" width="449"/> |
| 59 | + |
| 60 | +### Help Topic format |
| 61 | + |
| 62 | +#### For developers |
| 63 | +A detailed breakdown of the `HelpTopic` format in code can be seen [here](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/module/src/utils/help-topic-types.ts). |
| 64 | + |
| 65 | +Quickly preview a [basic exmaple](/extensions/quick-starts/In-App-Documentation), and remember there is a [live demo](https://quickstarts.netlify.app/in-context-help) with [full demo code](https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/dev). |
| 66 | + |
| 67 | +#### For content authors |
| 68 | +HelpTopics are written in `yaml` with markdown support. An example can be seen [here](https://github.com/patternfly/patternfly-quickstarts/blob/main/packages/dev/src/quickstarts-data/yaml/in-context-help/example-topics.yaml) |
| 69 | + |
| 70 | +### Opening and closing the side panel |
| 71 | +Open the side panel by calling `setActiveHelpTopicByName` (available from `HelpTopicContext`) with a `HelpTopic`'s name value. |
| 72 | + |
| 73 | +```typescript |
| 74 | +const { setActiveHelpTopicByName } = React.useContext<HelpTopicContextValues>(HelpTopicContext); |
| 75 | +``` |
| 76 | + |
| 77 | +Close it by calling `setActiveHelpTopicByName` with an empty string. There is no prebuilt `HelpTopic` catalog. simply attach a handler with `setActiveHelpTopicByName` to the appropriate DOM element. See the [basic exmaple](/extensions/quick-starts/In-App-Documentation), or [live demo code](https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/dev) for more details. |
0 commit comments