Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions rfcs/react-components/components/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,40 @@ As we start working on new components, there might be some components that are s
- It should be generic enough to be used in multiple scenarios. This is to avoid creating a component that is only used in one place.
- (if option 1 or 3 is chosen) It should provide more than a blurb of code snippets that the users might just copy and paste.

## Chosen option (Option 1: Recipes)

### What is a recipe?

A recipe is a document that allows you to communicate how to build a component, how to explain a concept, or how to use our library to build an experience.

### What is expected of a recipe?

A recipe should have the following aspects:

- Concise information with a clear goal.
- It should cover more abstract concepts and not just code snippets.
- It should also be able to be used by a developer that is new to Fluent UI.
- When writing a recipe for a component, it should be generic enough to be used in multiple scenarios and not just one.
- It should promote the use of our composition model and already created components.

### How can a recipe help you?

#### Component recipes

When a component is simple enough to be built with already created components, we can provide a recipe that will guide the user on how to build said component. This will help by not creating a component that does not provide high value and keep the library small.

These recipes will also help when we get requests to create a component, but we won't work on it in the near future. By providing a recipe, we can help fill the requests partially and allow the user to build the component themselves. If the recipe gets enough traction, we can revisit prioritizing working on this component.

#### Concept recipes

When a concept in our library is hard to grasp and our documentation doesn't provide enough information, we can provide a recipe that will guide the user on how to use/understand the concept. These recipes should not be of every concept specific to our library, instead they should be used as a way to help users understand concepts that are critical to becoming more familiar with our library.

#### Prototype recipes

When a user wants to build an experience that is not covered by our library and will not be added because it is not atomic enough or because of its complexity, we can provide a recipe to guide the user on how to build these experiences. These should be created by using our library and do not have specific implementation details as they may not apply to all scenarios. A common example of such experience is a message for a chat application.

---

## Detailed Design or Proposal

### Option 1: Recipes section in docsite
Expand Down