Skip to content

Commit 2af9ff0

Browse files
authored
Merge branch 'main' into cra-to-vite-docs
2 parents cff083b + 123cb88 commit 2af9ff0

File tree

5 files changed

+133
-6
lines changed

5 files changed

+133
-6
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# How to Become a ReactPlay Open Source Project Maintainer
6+
7+
[ReactPlay](https://reactplay.io/) is an open-source community that welcomes volunteers to become maintainers. If you are interested in becoming a maintainer, here are the criteria and requirements you need to meet.
8+
9+
## About the Role
10+
11+
- It is a volunteer effort. 🙋‍♂️
12+
- You must have a love for open source and people. 💛
13+
- You may have to give 4-5 hours a week. ⏳
14+
15+
## Criteria
16+
17+
- Be a Contributor first. Make sure you have contributed to at least 2 issues to understand the ReactPlay ecosystem, processes, and accepting criteria for any contributions.
18+
- Make a short write-up explaining why do you want to take up this role? This write-up should be no more than 150 words.
19+
- [Schedule a meeting](https://zcal.co/tapasadhikary/15min) with our existing project maintainer for 15 mins to discuss your points.
20+
21+
Don't forget to read out everything that is listed here: https://opensource.guide/best-practices/
22+
23+
## Please Note
24+
25+
1. You do not need prior experience in maintaining an Open Source project to be a maintainer of ReactPlay.
26+
1. We welcome everyone who is interested in becoming a maintainer, and if we are not able to get you started immediately, it doesn't mean we are rejecting you.
27+
1. If there is a gap that you need to bridge and come back, we will communicate that to you.
28+
1. We are looking for maintainers who are committed to the project for the long term.
29+
30+
## Existing roles
31+
32+
- Community Manager
33+
- Social & Events
34+
- Maintainers
35+
- Content
36+
- Dev Enablement

docs/How-To-Guides/how-to-create-play.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ Parameter details
7272
npx create-react-play -c <the_play_id>
7373
```
7474

75-
**Note:** If the play folder `<reactplay_directory>/src/plays/<your_play_name>` remain empty after running above command that means you might be in some older version of the package. Use `@latest` in that case
76-
`bash
77-
npx create-react-play@latest -c <the_play_id>
78-
`
75+
**Note:** If the play folder `<reactplay_directory>/src/plays/<your_play_name>` remain empty after running above command that means you might be in some older version of the package. Use `@latest` in that case.
76+
77+
```bash
78+
npx create-react-play@latest -c <the_play_id>
79+
```
80+
7981
<p align="center">
8082
<img src="https://res.cloudinary.com/atapas/image/upload/v1675172352/ReactPlay/Screenshot_2023-01-31_at_7.06.07_PM_jhbcbl.png" alt="copy-command" />
8183
</p>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# How to Add Styling to Your Play
6+
7+
Styling is an essential part of any play, and it's crucial to follow best practices to ensure that your code is maintainable and scalable. Here are some **Dos and Don'ts** to keep in mind when adding styling to your play:
8+
9+
## Do's
10+
11+
- Use class names that start with the play name and are in the kebab case. This naming convention helps to keep your code organized and easy to read.
12+
For example, if your play name is `"my-play"`, your class name should be `my-play__my-class`.
13+
14+
- Use CSS libraries that provide additional features such as [scoped styles](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) and automatic [vendor prefixing](https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix).
15+
16+
- `Tailwind CSS` support has been enabled in ReactPlay. You can use this CSS library in your play.
17+
18+
- Use CSS modules to style your components. CSS modules allow you to write modular and reusable CSS code that is scoped to a specific component.
19+
For example, you can create a CSS module for your component like this:
20+
21+
```css
22+
.my-play__my-class {
23+
color: red;
24+
}
25+
```
26+
27+
And then import it into your component like this:
28+
29+
```jsx
30+
import styles from "./MyComponent.module.css";
31+
32+
function MyComponent() {
33+
return <div className={styles["my-play__my-class"]}>Hello World</div>;
34+
}
35+
```
36+
37+
- Use `styled-components` to create reusable and composable components. `styled-components` allow you to write CSS code that is scoped to a specific component and can be reused across your project.
38+
39+
## Don'ts
40+
41+
- Do not use inline styles unless necessary. Inline styles can make your code harder to read and maintain, and they can also negatively impact performance. Instead, use CSS classes to style your components. This approach helps to keep your code organized and makes it easier to maintain.
42+
For example, instead of using inline styles like this:
43+
44+
```jsx
45+
function MyComponent() {
46+
return <div style={{ color: "red" }}>Hello World</div>;
47+
}
48+
```
49+
50+
You can create a CSS class and apply it to your component like this:
51+
52+
```css
53+
.my-play__my-class {
54+
color: red;
55+
}
56+
```
57+
58+
```jsx
59+
function MyComponent() {
60+
return <div className="my-play__my-class">Hello World</div>;
61+
}
62+
```
63+
64+
- Do not use global styles. Global styles can cause naming conflicts and make it harder to maintain your code. Instead, use CSS modules or `styled-components` to create modular and reusable CSS code.
65+
For example, you can create a CSS module for your component like this:
66+
67+
```css
68+
.my-play__my-class {
69+
color: red;
70+
}
71+
```
72+
73+
And then import it into your component like this:
74+
75+
```jsx
76+
import styles from "./MyComponent.module.css";
77+
78+
function MyComponent() {
79+
return <div className={styles["my-play__my-class"]}>Hello World</div>;
80+
}
81+
```
82+
83+
- Do not override the styles using `!important` CSS property. They override all the other declarations and make the CSS code difficult to maintain and debug. Instead, you can use other options to override styles such as using the source order rule, the inherited property rule, or the specificity rule.
84+
85+
By following these dos and don'ts, you can ensure that your play is well-styled, maintainable, and scalable. Remember to choose the approach that works best for your project and to keep your code organized and easy to read.
86+
87+
## ✋ Need Help?
88+
89+
You can reach out to us at [ReactPlay Twitter Handle | @ReactPlayIO](https://twitter.com/ReactPlayIO) with a DM. Additionally, feel free to join our [Discord community](https://discord.gg/vrTxWUP8Am) for discussions.

docs/apis-hook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const { data, error, isLoading } = useGitHub(`username`);
196196

197197
return (
198198
<div className="data-container">
199-
{loading && <p>Loading...</p>}
199+
{isLoading && <p>Loading...</p>}
200200
{error && <p>{error?.message ?? "Something went wrong"}</p>}
201201
{data && <p>{data.login}</p>}
202202
</div>

docs/contribution-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ We also love `typo` issues. If you find a typo somewhere, get in touch us and cr
2929
- Found a bug. Great! Go ahead and open a [bug report](https://github.com/reactplay/react-play/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%F0%9F%90%9B+%5BBug+report%5D%3A+)
3030
- You could also improve the [docs](https://github.com/reactplay/docs) which would help us immensely.
3131
- You could give us feedback, suggestions and help us improve our UX.
32-
- Have interest in interacting with public, you are welcome to manage our social media handles like [Twitter](https://twitter.com/ReactPlayIO) and [LinkedIn](https://www.linkedin.com/company/reactplay/).
32+
- Have an interest in interacting with the public? You are welcome to manage our social media handles like [Twitter](https://twitter.com/ReactPlayIO), [LinkedIn](https://www.linkedin.com/company/reactplay/), and [Facebook](https://web.facebook.com/groups/reactplay).
3333
- Have a flair for writing, you could publish articles on our [blog](https://blog.reactplay.io/).
3434
- You could also be our advocate and help us in arranging events, sponsors and support.
3535

0 commit comments

Comments
 (0)