Skip to content

Commit ab01e2f

Browse files
committed
feat: Update README and theming docs
1 parent 590d38e commit ab01e2f

File tree

3 files changed

+87
-45
lines changed

3 files changed

+87
-45
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Check out our current openings and apply via [Stream's website](https://getstrea
5454
Run the following command if you are using **Angular 13**:
5555

5656
```shell
57-
npm install stream-chat-angular @stream-io/stream-chat-css stream-chat @ngx-translate/core
57+
npm install stream-chat-angular stream-chat @ngx-translate/core
5858
```
5959

6060
Run this command if you are using **Angular 12**:
6161

6262
```shell
63-
npm install stream-chat-angular @stream-io/stream-chat-css stream-chat@5 @ngx-translate/core --legacy-peer-deps
63+
npm install stream-chat-angular stream-chat@5 @ngx-translate/core --legacy-peer-deps
6464
```
6565

6666
## Sample App

docusaurus/docs/Angular/concepts/themeing-and-css.mdx

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,47 @@ import DarkThemeScreenshot from "../assets/dark-theme-screenshot.png";
99
import CustomLightThemeScreenshot from "../assets/custom-light-theme-screenshot.png";
1010
import CustomDarkThemeScreenshot from "../assets/custom-dark-theme-screenshot.png";
1111

12+
## Overriding CSS
13+
14+
To override pre-defined library styles, follow this simple process:
15+
16+
- Import our bundled CSS into your root stylesheet. We maintain a separate repository, [stream-chat-css](https://github.com/GetStream/stream-chat-css), which houses all of the SCSS files for the components.
17+
18+
- Use the browser inspector or view the library code and locate default styles you wish to override
19+
20+
- Add selectors to your local CSS file to override our defaults.
21+
22+
- Add your local CSS selectors after Stream's bundled CSS
23+
24+
- Additionally you can overrive [the following CSS variables](https://github.com/GetStream/stream-chat-css/blob/main/src/styles/_variables.scss) to better customize the chat UI
25+
26+
For example:
27+
28+
```scss
29+
@import "~stream-chat-angular/src/assets/styles/scss/index.scss";
30+
31+
/* Your CSS here */
32+
```
33+
34+
OR
35+
36+
```css
37+
@import "~stream-chat-angular/src/assets/styles/css/index.css";
38+
39+
/* Your CSS here */
40+
```
41+
42+
## Importing scss Files
43+
44+
As an alternative to importing our entire style sheet (perhaps, due to it's size), there's also the option to easily assemble only
45+
what you need by importing individual scss files. The imports should happen in your root stylesheet.
46+
47+
:::note
48+
If not importing our entire bundled CSS, individually importing the SDK's scss files is the better alternative to copy and pasting
49+
our stylesheets and then customizing that code in your application. The CSS in the library does change occasionally, and you want
50+
to keep up to date with these to ensure no problems arise by falling behind in important styling updates.
51+
:::
52+
1253
## Changing the theme
1354

1455
Our library supports light and dark themes. You can change between the different themes using the `ThemeService`:
@@ -55,34 +96,3 @@ The result:
5596
**Example 2** - Custom dark theme
5697

5798
<img src={CustomDarkThemeScreenshot} width="900" />
58-
59-
## Overriding CSS
60-
61-
To override pre-defined library styles, follow this simple process:
62-
63-
- Import our bundled CSS into your root stylesheet. We maintain a separate repository, [stream-chat-css](https://github.com/GetStream/stream-chat-css), which houses all of the SCSS files for the components.
64-
65-
- Use the browser inspector or view the library code and locate default styles you wish to override
66-
67-
- Add selectors to your local CSS file to override our defaults.
68-
69-
- Add your local CSS selectors after Stream's bundled CSS
70-
71-
For example:
72-
73-
```scss
74-
@import "~@stream-io/stream-chat-css/dist/css/index.css";
75-
76-
/* Your CSS here */
77-
```
78-
79-
## Importing scss Files
80-
81-
As an alternative to importing our entire style sheet (perhaps, due to it's size), there's also the option to easily assemble only
82-
what you need by importing individual scss files. The imports should happen in your root stylesheet.
83-
84-
:::note
85-
If not importing our entire bundled CSS, individually importing the SDK's scss files is the better alternative to copy and pasting
86-
our stylesheets and then customizing that code in your application. The CSS in the library does change occasionally, and you want
87-
to keep up to date with these to ensure no problems arise by falling behind in important styling updates.
88-
:::

projects/stream-chat-angular/README.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,38 @@ The best way to get started is to follow the [Angular Chat Tutorial](https://get
3030
Stream is free for most side and hobby projects. To qualify, your project/company must have no more than 5 team members and earn less than $10k in monthly revenue.
3131
For complete pricing and details visit our [Chat Pricing Page](https://getstream.io/chat/pricing/).
3232

33+
## Docs
34+
35+
The [docs](https://getstream.io/chat/docs/sdk/angular/) provide a brief description about the components and services in the library.
36+
37+
The Angular library is created using the [stream-chat-js](https://github.com/getstream/stream-chat-js) library. For the most common use cases our services should give a nice abstraction over this library, however you might need it for more advanced customization, the [documentation](https://getstream.io/chat/docs/js/) is on our website.
38+
39+
## Contributing
40+
41+
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.
42+
43+
## We are hiring!
44+
45+
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.
46+
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.
47+
48+
Check out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).
49+
3350
## Installation
3451

3552
### Install with NPM
3653

37-
```
38-
npm install stream-chat-angular @stream-io/stream-chat-css stream-chat @ngx-translate/core
54+
Run the following command if you are using **Angular 13**:
55+
56+
```shell
57+
npm install stream-chat-angular stream-chat @ngx-translate/core
3958
```
4059

41-
**Important note** If you are using **Angular 12** you will need to add `--legacy-peer-deps` flag as `@ngx-translate/core`'s newest version only supports Angular 13.
60+
Run this command if you are using **Angular 12**:
61+
62+
```shell
63+
npm install stream-chat-angular stream-chat@5 @ngx-translate/core --legacy-peer-deps
64+
```
4265

4366
## Sample App
4467

@@ -56,19 +79,28 @@ STREAM_USER_TOKEN=<Your user token>
5679

5780
Run `npm start` and navigate to `http://localhost:4200/`.
5881

59-
## Docs
82+
## Customization examples
6083

61-
The [docs](https://getstream.io/chat/docs/sdk/angular/) provide a brief description about the components and services in the library.
84+
This repository includes a sample app that showcases how you can provide your own template for different components within the SDK:
6285

63-
The Angular library is created using the [stream-chat-js](https://github.com/getstream/stream-chat-js) library. For the most common use cases our services should give a nice abstraction over this library, however you might need it for more advanced customization, the [documentation](https://getstream.io/chat/docs/js/) is on our website.
86+
To run the app:
6487

65-
## Contributing
88+
Create a file named `.env` in the root directory with the following content:
6689

67-
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.
90+
```
91+
STREAM_API_KEY=<Your API key>
92+
STREAM_USER_ID=<Your user ID>
93+
STREAM_USER_TOKEN=<Your user token>
94+
```
6895

69-
## We are hiring!
96+
Run `npm start:customizations-example` and navigate to `http://localhost:4200/`.
7097

71-
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.
72-
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.
98+
## Local development
7399

74-
Check out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).
100+
Run `npm install` in the root of the project. You can use the `npm run start:dev` command to start the SampleApp with automatic reloading.
101+
102+
A note about the documentation:
103+
104+
- Documentations for Angular services are generated from doc comments in the source files (not under source control)
105+
- Documentations for inputs and outputs of Angular components are generated from doc comments in the source files (not under source control)
106+
- Everything else in the documentation is written in `mdx` files located in the `docusaurus` folder

0 commit comments

Comments
 (0)