Skip to content

Commit

Permalink
docs: fix some sentences in the "Welcome to the Community" and "Intro…
Browse files Browse the repository at this point in the history
…duction to Storybook" section for clarity and fix some typos. (open-sauced#130)

* Update welcome-to-the-community.md

Added more context and fixed the unordered list inconsistent spacing

* Update introduction-to-contributing.md

Revised and clarified the "Testing" section, and provided additional details in the "Building" section.

* doc:  Improved the Storybook doc by fixing typos, rephrased sentences to be clear and  fixed heading inconsistencies

Worked on this issue. The "Introduction to Storybook" doc needs improvement open-sauced#133
  • Loading branch information
Barry-dE authored Aug 21, 2023
1 parent 032f9b8 commit 812acde
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 1 addition & 3 deletions docs/community/welcome-to-the-community.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ At OpenSauced, we strive to create a welcoming and inclusive community for every
The OpenSauced community is a group of open-source enthusiasts who are passionate about making open-source more accessible to everyone. Here are some ways you can keep up with what we're doing:

- 🐦 Follow us on Twitter [@SaucedOpen](https://twitter.com/saucedopen) for announcements and our frequent Twitter Spaces.

- Join our [Discord](https://discord.gg/opensauced), and hang out with us in our weekly office hours.

- Subscribe to our [YouTube channel](https://www.youtube.com/@OpenSauced) for the latest updates and video content for OpenSauced.

- 📰 Subscribe to our [newsletter](https://news.opensauced.pizza/#/portal/signup) for all things OpenSauced and open source.

## How can I get involved?
Expand All @@ -40,6 +37,7 @@ You can get involved in the OpenSauced community in a few ways:
- Share what you're working on, ask questions, or mentor new contributors in our [Discord](https://discord.gg/opensauced).

## Resources on Getting Started with Open Source
Getting started with open source can be quite daunting for beginners, so we've put together some resources to help you get started.

- 📝 Check out our [Dev blog](https://dev.to/opensauced) where we provide resources for open-source contributors.
- 📖 Take our [Intro to Open Source Course](https://github.com/open-sauced/intro) to help you get started with open-source.
5 changes: 3 additions & 2 deletions docs/contributing/introduction-to-contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,20 @@ npm ci
```

## Building
To generate a production-ready version of your code, run:

```shell
npm run build
```

## Testing

For running the test suite, use the following command. Since the tests run in watch mode by default, some users may encounter errors about too many files being open. In this case, it may be beneficial to [install watchman](https://facebook.github.io/watchman/docs/install.html).

For running the test suite, use the following command:
```shell
# the tests will run in watch mode by default
npm test
```
Since the tests run in watch mode by default, some users may encounter errors about too many files being open. In this case, it may be beneficial to [install watchman](https://facebook.github.io/watchman/docs/install.html).

For more info on testing React and JavaScript, check out this course [Testing JavaScript](https://testingjavascript.com/)

Expand Down
22 changes: 11 additions & 11 deletions docs/technical/introduction-to-storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_label: Introduction to storybook
keywords:
- Introduction to storybook
---

Storybook is an open-source tool that helps developers build, test, and document UI components in isolation.
Storybook is being leveraged to mock out visual React components. The latest version of the design system can be found at this [URL](https://sauced-components.netlify.app/).

To run storybook, use this command:
Expand All @@ -20,34 +20,34 @@ Storybook is broken into several categories:

<ul>
<li><b>Button:</b> These are the button elements that appear in the project in various forms. They primarily are the Button component in the project but can also be icons.</li>
<li><b>Cards:</b> These are the main container elements in the project. Each item represents a live component in their current form in the project.</li>
<li><b>Cards:</b> These are the main container elements in the project. Each item represents a live component in its current form in the project.</li>
<li><b>Primitives: These are the basic styling of base HTML components.</b></li>
<li><b>Nav:</b> This is the main navigation bar for the project. There are two states, when there is no user logged in and when a user is logged in.</li>
<li><b>Nav:</b> This is the main navigation bar for the project. There are two stateswhen there is no user logged in and when a user is logged in.</li>
<li><b>Footer:</b> This represents the various footers for the project.</li>
<li><b>Homepage:</b> This is the main component for the project homepage and shows the home page in its current form.</li>
<li><b>Homepage:</b> This is the main component of the project homepage and shows the home page in its current form.</li>
<li><b>Miscellaneous:</b> These are components that currently don't fit neatly into the above categories.</li>
</ul>

## Making changes to storybook

This section details how to make changes to Storybook, mainly creating new categories or UI elements.

## Adding a new category
This section details how to make changes to Storybook, mainly by creating new categories or UI elements.

To add a new category, a new file needs to be added to `/stories`. Please follow the naming convention of `*Previous File Number + 1*-*Name of Story Capitalized*-stories.js` when creating a new file. In the file ensure you have this code in the file:
### Adding a new category

To add a new category, a new file needs to be added to the `/stories` directory. When creating a new file, the filename should be named using the following convention: ```*Previous File Number + 1*-*Name of Story Capitalized*-stories.js```. For example, if the last file was 2-SideBar-stories.js, then the new file should be named ```3-NameOfYourFile-stories.js```.
In the file ensure you have this code:
```
export default {
title: "*Name of category*"
};
```

## Adding a new UI element
### Adding a new UI element

To add a new UI element to to an existing category, add the following code to that category's file:
To add a new UI element to an existing category, add the following code to that category's file:

```
export const *Name of UI Element* = () => (
// code for the new element
);
```

0 comments on commit 812acde

Please sign in to comment.