Skip to content

Commit ca7af19

Browse files
Prettier fixes
1 parent f05b9ac commit ca7af19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+237
-117
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Create a report to help us improve
44
title: 'bug:'
55
labels: 'bug, status: unconfirmed'
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
@@ -14,6 +13,7 @@ A clear and concise description of what the bug is.
1413
**To Reproduce**
1514

1615
Steps to reproduce the behavior:
16+
1717
1. Go to '...'
1818
2. Click on '....'
1919
3. Scroll down to '....'
@@ -28,6 +28,7 @@ A clear and concise description of what you expected to happen.
2828
If applicable, add screenshots to help explain your problem.
2929

3030
**Package version**
31+
3132
- stream-chat-react:
3233
- stream-chat-css:
3334
- stream-chat-js:

.github/ISSUE_TEMPLATE/feature_request.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Describe a new feature
44
title: ''
55
labels: feature
66
assignees: ''
7-
87
---
98

109
**Motivation**

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: Lint & test with Node
2020
steps:
2121
- uses: actions/checkout@v4
22-
22+
2323
- uses: ./.github/actions/setup-node
2424

2525
- name: Build SDK

.ladle/config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// https://www.ladle.dev/docs/config
22
export default {
33
envPrefix: 'E2E_',
4-
}
4+
};

CONTRIBUTING.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,46 @@ As a contributor, here are the guidelines we would like you to follow:
88
- [Submission Guidelines](#submission-guidelines)
99
- [Signing the CLA](#contributor-licence-agreement)
1010

11-
1211
## <a name="asking-questions"></a>Are you looking for answers?
12+
1313
There are many ways you can get your questions answered. It can be hard to decide, where to begin if you are just starting out. We suggest you take a look at the resources in the following order:
1414

1515
### 1. Stream chat API documentation
16-
Package `stream-chat-react` has a peer dependency [stream-chat-js](https://github.com/GetStream/stream-chat-js) - a client library for interacting with the Stream Chat API (see the [API docs](https://getstream.io/chat/docs/javascript/?language=javascript)).
16+
17+
Package `stream-chat-react` has a peer dependency [stream-chat-js](https://github.com/GetStream/stream-chat-js) - a client library for interacting with the Stream Chat API (see the [API docs](https://getstream.io/chat/docs/javascript/?language=javascript)).
1718

1819
### 2. Documentation for stream-chat-react
20+
1921
The [stream-chat-react](https://getstream.io/chat/docs/sdk/react/) documentation is held separately from the Stream Chat API docs. Besides documenting the component API, it provides examples of their use in various scenarios.
2022

2123
### 3. Read the source code
24+
2225
When you plan on contributing to the repository try to get acquainted with the existing code base. The best way to learn :)
2326

2427
### 4. Take a look at our tutorials
2528

26-
2729
### Get help from our Customer Success team
28-
If what you are looking for is technical support embedding Stream in your application, we suggest emailing our Customer Success team at support@getstream.io with your application key and the SDK versions you're using. The Issue section of this GitHub repo is now reserved only for bug reports, feature improvements and suggestions.
2930

31+
If what you are looking for is technical support embedding Stream in your application, we suggest emailing our Customer Success team at support@getstream.io with your application key and the SDK versions you're using. The Issue section of this GitHub repo is now reserved only for bug reports, feature improvements and suggestions.
3032

3133
## <a name="filing-an-issue"></a>Filing an issue
32-
Spotting imperfections and not keeping them to yourself is the first step to make this library better. We are very grateful for reports concerning imperfections in the source code or the [documentation]((https://getstream.io/chat/docs/sdk/react/)). Before filing an issue, please, review the list of [open issues](https://github.com/GetStream/stream-chat-react/issues) first.
34+
35+
Spotting imperfections and not keeping them to yourself is the first step to make this library better. We are very grateful for reports concerning imperfections in the source code or the [documentation](<(https://getstream.io/chat/docs/sdk/react/)>). Before filing an issue, please, review the list of [open issues](https://github.com/GetStream/stream-chat-react/issues) first.
3336

3437
### Reporting bugs
35-
You can report a source code bug by using the [Bug Report template](https://github.com/GetStream/stream-chat-react/issues/new/choose). Make sure you include "steps to reproduce" section. Bug that cannot be reproduced cannot be solved.
3638

37-
Do not be afraid to report imperfections in our [documentation]((https://getstream.io/chat/docs/sdk/react/)) as well. In such case, please attach the `docs` tag to the issue.
39+
You can report a source code bug by using the [Bug Report template](https://github.com/GetStream/stream-chat-react/issues/new/choose). Make sure you include "steps to reproduce" section. Bug that cannot be reproduced cannot be solved.
3840

41+
Do not be afraid to report imperfections in our [documentation](<(https://getstream.io/chat/docs/sdk/react/)>) as well. In such case, please attach the `docs` tag to the issue.
3942

4043
### Requesting a feature
44+
4145
You can request a feature by submitting a [Feature request issue](https://github.com/GetStream/stream-chat-react/issues/new?assignees=&labels=feature&template=feature_request.md&title=) in our repository. If you would like to implement the proposal, please state it in the issue. It will allow us to discuss the proposal and better coordinate the efforts. You can even ping us - mention `@GetStream/stream-react-developers ` in the issue.
4246

4347
## <a name="contribution-standards"></a> Contributing to the repo
4448

4549
### Set up for success
50+
4651
It is always good to get acquainted with the specifics of the package. For example the `stream-chat-react` package has its peer dependencies (`stream-chat-js`, `stream-chat-css`), which you may need to tweak at the same time, while developing the feature for `stream-chat-react`. To get more into those specifics, please read [development guide](./developers/DEVELOPMENT.md).
4752

4853
### Good first issue
@@ -51,28 +56,32 @@ It is always good to get acquainted with the specifics of the package. For examp
5156
Any contributions to the library should follow Stream's coding rules.
5257

5358
#### 1. Code should be tested
59+
5460
All the code submitted should be covered by unit tests. Mocking utilities are provided in `src/mock-builders`. Optimally a suite of E2E tests should be included as well.
5561

5662
#### 2. API Changes should be documented
63+
5764
Changes to components interface exposed to the library integrators should be documented. We keep the documentation `docusaurus/docs/React` folder. Please see the [dedicated documentation guide](./developers/DOCUMENTATION.md) for more information on how to maintain our documentation.
5865

5966
#### 3. Code should be DRY & correctly formatted
67+
6068
If you find yourself copying source code from one place to another, please extract it into a separate component or function.
6169

6270
#### 4. Keep an eye on performance
71+
6372
Keep in mind that the chat application may need to work with thousands of messages.
6473

6574
#### 5. Follow commit formatting rules
66-
We follow [Angular's Commit Message Format rules](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format) with [possible deviations](./developers/COMMIT.md). The same rules are used by our release automation tool. Therefore, every commit message should strictly comply with these rules.
6775

76+
We follow [Angular's Commit Message Format rules](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-format) with [possible deviations](./developers/COMMIT.md). The same rules are used by our release automation tool. Therefore, every commit message should strictly comply with these rules.
6877

6978
## <a name="submission-guidelines"></a> Submitting your work
79+
7080
1. Make sure you have signed our Contributor License agreement
7181
2. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the repo and create a dedicated git branch locally
7282
3. Follow the [coding rules](#coding-rules)
7383
4. Create a descriptive PR ([see more on PR requirements](./developers/PR_REVIEW.md))
7484

75-
7685
## <a name="contributor-licence-agreement"></a> Contributor License Agreement
77-
Before we can merge your contribution into our repository, we would like to ask you to sign the [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform).
7886

87+
Before we can merge your contribution into our repository, we would like to ask you to sign the [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform).

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ For complete pricing and details visit our [Chat Pricing Page](https://getstream
5050

5151
`yarn add stream-chat stream-chat-react`
5252

53-
5453
## Example Applications
5554

5655
We have built five demo applications showcasing a variety of chat use cases, including social messaging, team collaboration, customer support, livestream gaming, and virtual event. You can preview these [demos](https://getstream.io/chat/demos/) on our website. Also, the code is [open source](https://github.com/GetStream/website-react-examples/).
@@ -61,15 +60,15 @@ We use a doc generator to build our [component documentation](https://getstream.
6160

6261
The React components are created using the [stream-chat](https://github.com/getstream/stream-chat-js) library. If you're customizing the components, it's likely you'll need to make additional calls to our Chat API using our JavaScript client, which has [documentation](https://getstream.io/chat/docs/javascript/) on our website.
6362

64-
## Component Reusability
63+
## Component Reusability
6564

6665
For components that implement significant logic, it's helpful to split the component into two parts: a top-level component which handles functionality and a lower level component which renders the UI. This way you can swap UI without altering the logic that gives the component its functionality. We use this provider/consumer pattern frequently in the library, and the below example shows how to swap out the `Message` UI component with `CustomMessageUI` (using `WithComponents`), without affecting any logic in the application.
6766

6867
```jsx
6968
<Channel>
7069
<Window>
7170
<ChannelHeader />
72-
<WithComponents overrides={{Message: CustomMessageUI}}>
71+
<WithComponents overrides={{ Message: CustomMessageUI }}>
7372
<MessageList />
7473
</WithComponents>
7574
<MessageInput />
@@ -85,9 +84,9 @@ The preferred method for overriding the pre-defined styles in the library is to
8584
```css title="index.css"
8685
@layer stream, stream-overrides;
8786

88-
@import "stream-chat-react/css/v2/index.css" layer(stream);
87+
@import 'stream-chat-react/css/v2/index.css' layer(stream);
8988
/* or */
90-
@import "stream-chat-react/dist/css/v2/index.css" layer(stream);
89+
@import 'stream-chat-react/dist/css/v2/index.css' layer(stream);
9190

9291
@layer stream-overrides {
9392
/* your overrides */
@@ -103,6 +102,7 @@ Our library supports auto-translation for various user languages. Please read ou
103102
We welcome code changes that improve this library or fix a problem. Please make sure to follow all best practices and add tests, if applicable, before submitting a pull request on GitHub. We are pleased to merge your code into the official repository if it meets a need. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our license file for more details.
104103

105104
## We are hiring!
105+
106106
We recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and are actively growing.
107107
Our APIs are used by more than a billion end-users, and by working at Stream, you have the chance to make a huge impact on a team of very strong engineers.
108108

@@ -116,4 +116,4 @@ This project uses `lamejs` library under the LGPL license to convert the recorde
116116
The library source code is dynamically imported and used only if audio recording is enabled.
117117

118118
You can obtain the source code for `lamejs` from the [lamejs repository](https://github.com/gideonstele/lamejs) that is a fork of [the original JS library](https://github.com/zhuker/lamejs).
119-
You can find the source code for LAME at https://lame.sourceforge.net and its license at: https://lame.sourceforge.net/license.txt
119+
You can find the source code for LAME at https://lame.sourceforge.net and its license at: https://lame.sourceforge.net/license.txt

SECURITY.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# Reporting a Vulnerability
2+
23
At Stream we are committed to the security of our Software. We appreciate your efforts in disclosing vulnerabilities responsibly and we will make every effort to acknowledge your contributions.
34

45
Report security vulnerabilities at the following email address:
6+
57
```
68
security@getstream.io
79
```
10+
811
Alternatively it is also possible to open a new issue in the affected repository, tagging it with the `security` tag.
912

1013
A team member will acknowledge the vulnerability and will follow-up with more detailed information. A representative of the security team will be in touch if more information is needed.
1114

1215
# Information to include in a report
16+
1317
While we appreciate any information that you are willing to provide, please make sure to include the following:
14-
* Which repository is affected
15-
* Which branch, if relevant
16-
* Be as descriptive as possible, the team will replicate the vulnerability before working on a fix.
18+
19+
- Which repository is affected
20+
- Which branch, if relevant
21+
- Be as descriptive as possible, the team will replicate the vulnerability before working on a fix.

developers/COMMIT.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ The commit type makes up the first part of the commit header:
1010

1111
It must be one of the following:
1212

13-
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
14-
* **chore**: Changes that do not relate to a fix or feature and don't modify source or test files (for example updating dependencies)
15-
* **ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
16-
* **docs**: Documentation only changes
17-
* **feat**: A new feature
18-
* **fix**: A bug fix
19-
* **perf**: A code change that improves performance
20-
* **revert**: Reverts a previous commit
21-
* **refactor**: A code change that neither fixes a bug nor adds a feature
22-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
23-
* **test**: Adding missing tests or correcting existing tests
24-
* **deprecate**: Certain parts or APIs are deprecated and scheduled for a removal in a newer major version
13+
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
14+
- **chore**: Changes that do not relate to a fix or feature and don't modify source or test files (for example updating dependencies)
15+
- **ci**: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
16+
- **docs**: Documentation only changes
17+
- **feat**: A new feature
18+
- **fix**: A bug fix
19+
- **perf**: A code change that improves performance
20+
- **revert**: Reverts a previous commit
21+
- **refactor**: A code change that neither fixes a bug nor adds a feature
22+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
23+
- **test**: Adding missing tests or correcting existing tests
24+
- **deprecate**: Certain parts or APIs are deprecated and scheduled for a removal in a newer major version

developers/DEPRECATIONS.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Deprecations
22

33
You can deprecate a feature or a component once:
4+
45
1. an alternative exists.
56
2. the support for the given functionality is scheduled for termination
67

developers/DEVELOPMENT.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
## 1. Set yourself up
2+
23
If you are solving issues, that require adjustments in CSS or Stream Chat API client, then you want to fork the following repositories:
34

45
- `stream-chat-react`
56
- `stream-chat-css`
67
- `stream-chat-js`
78

8-
99
GitHub provides guides on how to [fork and contribute to projects](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).
1010

1111
## 2. Link the peer dependencies
12+
1213
If you are doing changes in peer dependencies and you want to see them reflected in a running application, you will need to [create symbolic links](https://classic.yarnpkg.com/en/docs/cli/link) to those repositories on your disk (`yarn link` in peer dependency's root folder --> `yarn link dep_name` in `stream-chat-react` root folder). No need to tweak `package.json` manually.
1314

1415
## 3. Create a new branch
16+
1517
Please create a new branch from the freshly pulled `develop` branch. We keep a simple [system of branches](./BRANCHES.md).
1618

1719
## 4. Write your code
20+
1821
Please follow our [Coding rules](../CONTRIBUTING.md#coding-rules). You can start by designing the user journeys by writing E2E tests.
1922

2023
## 4. Run your code
24+
2125
Again, if you are doing changes in peer dependencies, run `yarn start`:
26+
2227
1. in their root folders as well as
2328
2. in the root folder of the `stream-chat-react` package.
2429

2530
Then you can start one of the applications in the `examples` folder. We recommend you to run the [`typescript` app](../examples/typescript).
2631

2732
## 5. Push your changes and create a PR
33+
2834
You are almost done. Please do not underestimate the role of a [well-prepared PR](./PR.md).
2935

3036
## 6. Fix imperfections
37+
3138
It can happen that the PR reviewer asks you to fix imperfections in your implementation. Please make adjustments agreed with the PR reviewer and push them back upstream.
3239

3340
## 7. Once the PR is merged
41+
3442
You can delete the local copy of your branch. Well done!

developers/E2E.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ note: this document is a WIP
33
# E2E tests
44

55
End-to-end tests are a great mean of:
6+
67
- quality assurance
78
- feature documentation
89

910
They play a crucial role in communicating the expected behavior and interaction between the components. E2E test suites are great for documenting the user journeys - a good start to developing a given feature.
1011

11-
Our E2E tests live in the [`e2e` folder](./e2e). They rely on so-called stories located in [`src/stories` folder](./src/components). E2E tests are run with the combination of [ladle](https://www.ladle.dev/) (utility used for documenting our components in form of stories) and [playwright](https://playwright.dev/) (E2E test runner).
12+
Our E2E tests live in the [`e2e` folder](./e2e). They rely on so-called stories located in [`src/stories` folder](./src/components). E2E tests are run with the combination of [ladle](https://www.ladle.dev/) (utility used for documenting our components in form of stories) and [playwright](https://playwright.dev/) (E2E test runner).
1213

1314
To run the E2E tests you need to:
1415

0 commit comments

Comments
 (0)