Skip to content

Commit

Permalink
Merge pull request #641 from GetStream/release/2.2.0
Browse files Browse the repository at this point in the history
chore(llc,core,ui,localization): 2.2.0
  • Loading branch information
imtoori authored Aug 25, 2021
2 parents 1842a4b + 588234d commit cf8a028
Show file tree
Hide file tree
Showing 141 changed files with 6,906 additions and 3,052 deletions.
43 changes: 0 additions & 43 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

98 changes: 98 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Bug Report
description: Create a report to help us improve
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: dropdown
id: packages
attributes:
label: Which packages are you using?
description: You may select more than one.
multiple: true
options:
- stream_chat
- stream_chat_flutter
- stream_chat_flutter_core
- stream_chat_persistance
- stream_chat_localizations
validations:
required: true
- type: dropdown
id: platforms
attributes:
label: On what platforms did you experience the issue?
description: You may select more than one.
multiple: true
options:
- iOS
- Android
- Web
- Windows
- MacOS
- Linux
validations:
required: true
- type: textarea
id: version
attributes:
label: What version are you using?
description: Please specify the package names and versions
placeholder: package - version
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also, what did you expect to happen?
placeholder: Description of the bug and what was expected.
validations:
required: true
- type: textarea
id: repro-steps
attributes:
label: Steps to reproduce
description: How do you trigger this bug? Please walk us through it step by step.
value: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
...
render: bash
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Supporting info to reproduce
description: Please add any relevant code, screenshots and info needed to reproduce this issue.
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
id: flutter-analyze
attributes:
label: Flutter analyze output
description: Paste the output of `flutter analyze` here.
placeholder: If there are any analysis errors, try resolving them before filing this issue.
render: shell
- type: textarea
id: flutter-doctor
attributes:
label: Flutter doctor output
description: Paste the output of `flutter doctor -v` here.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/GetStream/stream-chat-flutter/blob/develop/CODE_OF_CONDUCT.md)
options:
- label: "I agree to follow this project's Code of Conduct"
required: true
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Feature Request
description: Suggest an idea for this project
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help us improve!
- type: dropdown
id: packages
attributes:
label: Please select which package this feature is related to
description: You may select more than one.
multiple: true
options:
- stream_chat
- stream_chat_flutter
- stream_chat_flutter_core
- stream_chat_persistance
- stream_chat_localizations
validations:
required: true
- type: dropdown
id: platforms
attributes:
label: Which platforms would this feature impact?
description: You may select more than one.
multiple: true
options:
- iOS
- Android
- Web
- Windows
- MacOS
- Linux
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: A clear description of what the problem is.
placeholder: "Example: I'm always frustrated when [...]"
- type: textarea
id: solution
attributes:
label: "Describe the solution that you'd like"
description: A clear description of what you want to happen.
placeholder: "Example: When clicking this I want that."
- type: textarea
id: alternatives
attributes:
label: "Describe alternatives that you have considered"
description: "A clear description of any alternative solutions or features you've considered."
placeholder: "Example: Instead of this it should do that."
- type: textarea
id: additional
attributes:
label: "Additional context"
description: "Add any other context or screenshots about the feature request here."
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/GetStream/stream-chat-flutter/blob/develop/CODE_OF_CONDUCT.md)
options:
- label: "I agree to follow this project's Code of Conduct"
required: true
21 changes: 19 additions & 2 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'PR Title is Conventional'
name: 'PR is Conventional and Semantic'
on:
pull_request_target:
types:
Expand All @@ -9,7 +9,7 @@ on:
- develop

jobs:
main:
conventional_pr_title:
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
Expand All @@ -25,3 +25,20 @@ jobs:
requireScope: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

semantic_changelog_update:
needs: conventional_pr_title # Trigger after the [conventional_pr_title] completes
runs-on: ubuntu-latest
steps:
- uses: GetStream/verify-semantic-changelog-update@main
with:
scopes: |
{
"llc": "packages/stream_chat",
"ui": "packages/stream_chat_flutter",
"core": "packages/stream_chat_flutter_core",
"localization": "packages/stream_chat_flutter_localizations",
"persistence": "packages/stream_chat_persistence"
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Stream's Flutter code is kept in a single mono-repository consisting of multiple

`stream_chat_persistence` - This package provides a persistence client for fetching and saving chat data locally. Stream Chat Persistence uses Moor as a disk cache.

`stream_chat_localizations` - This package provides a set of localizations for the SDK.

### Local Setup

Congratulations! 🎉. You've successfully cloned our repo, and you are ready to make your first contribution. Before you can start making code changes, there are a few things to configure.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This repository contains code for our [Dart](https://dart.dev/) and [Flutter](ht
Stream allows developers to rapidly deploy scalable feeds and chat messaging with an industry leading 99.999% uptime SLA guarantee.

## Sample apps and demos
Our team maintains a dedicated repository for fully-fledged sample applications and demos. Consider checking out [GetStream/flutter-samples](https://github.com/GetStream/flutter-samples) to learn more or get started by looking at our latest [Stream Chat demo](https://github.com/GetStream/flutter-samples/tree/main/stream_chat_v1).
Our team maintains a dedicated repository for fully-fledged sample applications and demos. Consider checking out [GetStream/flutter-samples](https://github.com/GetStream/flutter-samples) to learn more or get started by looking at our latest [Stream Chat demo](https://github.com/GetStream/flutter-samples/tree/main/packages/stream_chat_v1).

## Free for Makers

Expand Down
29 changes: 15 additions & 14 deletions docusaurus/docs/Flutter/basics/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ Exploring The Basics Of Stream Chat

![](../assets/sdk_title.png)

Stream Chat is a service that helps you easily build a full chat experience in your Flutter (and more) apps.
Stream Chat is a service that helps you easily build a full chat experience in your Flutter apps.
We also support a variety of other SDKs.

This section of the documentation focuses on our Flutter SDK which helps you easily
ship high quality messaging experiences in apps and programs built with the [Flutter toolkit made
by Google](https://flutter.dev).
ship high quality messaging experiences in apps and programs built with the [Flutter toolkit
made by Google](https://flutter.dev).

The Stream Chat Flutter SDK comprises of four different packages to choose from ranging from ones
The Stream Chat Flutter SDK comprises five different packages to choose from, ranging from ones
giving you complete control to ones that give you a rich out-of-the-box chat experience.

The packages that make up the Stream Chat SDK are:
Expand All @@ -30,28 +31,28 @@ reusable and customisable UI components.
saving chat data locally.
5. <b>Localizations (stream_chat_localizations)</b>: provides a set of localizations for the SDK.

We recommend building prototypes using the full UI package since it contains UI widgets already
integrated with Stream's API. [stream_chat_flutter](https://pub.dev/packages/stream_chat_flutter)
is the fastest way to get up and running using Stream chat in your app.
We recommend building prototypes using the full UI package, [stream_chat_flutter](https://pub.dev/packages/stream_chat_flutter),
since it contains UI widgets already integrated with Stream's API. It is the fastest way to get up
and running using Stream chat in your app.

The Flutter SDK enables you to build any type of chat or messaging experience for Android, iOS, Web
and Desktop.

If you're building a very custom UI and would prefer a more lean package,
our [core package](https://pub.dev/packages/stream_chat_flutter) will be suited to this use case. Core allows you to build custom,
expressive UIs while retaining the benefits of our full Flutter SDK.
APIs for accessing and controlling users, sending messages, etc are seamlessly integrated into
this package and accessible via providers and builders.
[stream_chat_flutter_core](https://pub.dev/packages/stream_chat_flutter_core) will be suited to this
use case. Core allows you to build custom, expressive UIs while retaining the benefits of our full
Flutter SDK. APIs for accessing and controlling users, sending messages, and so forth are seamlessly integrated
into this package and accessible via providers and builders.

Before going into the docs, let's take a small detour to look at how the elements of Stream Chat are structured.

### Basic Structure

There are two core elements in chat, <b>Users and Channels.</b>
There are two core elements in chat, <b>Users</b> and <b>Channels</b>.
Channels are groups of one or more users that can message each other.
In an app, you need to have a user connected to query channels.

There is no specific distinction between a chat between two people and a group chat,
There is no specific distinction between a chat with only two people and a group chat,
but there is a way to create a unique chat between a certain number of people by creating a <b>distinct</b> channel.

![](../assets/chat_basics.png)
Expand All @@ -68,7 +69,7 @@ While this is a simplistic overview of the service, the Flutter SDK handles the

Before reading the docs, consider trying our [online API tour](https://getstream.io/chat/get_started/),
it is a nice way to learn how the API works.
It's in-browser so Javascript-based but the ideas are pretty much the same as Dart.
It's in-browser so you'll need to use Javascript but the core conceps are pretty much the same as Dart.

You may also like to look at the [Flutter tutorial](https://getstream.io/chat/flutter/tutorial/)
which focuses on using the UI package to get Stream Chat integrated into a Flutter app.
Expand Down
28 changes: 16 additions & 12 deletions docusaurus/docs/Flutter/guides/adding_custom_attachments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,25 @@ Next, we build the Static Maps URL (Add your API key before using the code snipp
}
```

And then modify the MessageListView and tell it how to build a location attachment:
And then modify the `MessageListView` and tell it how to build a location attachment, using the `messageBuilder` property and copying the default message implementation overriding the `customAttachmentBuilders` property:

```dart
MessageListView(
customAttachmentBuilders: {
'location': (context, message, attachments) {
var attachmentWidget = Image.network(
_buildMapAttachment(
attachments[0].extraData['latitude'],
attachments[0].extraData['longitude'],
),
);
return wrapAttachmentWidget(context, attachmentWidget, null, true, BorderRadius.circular(8.0));
}
messageBuilder: (context, details, messages, defaultMessage) {
return defaultMessage.copyWith(
customAttachmentBuilders: {
'location': (context, message, attachments) {
final attachmentWidget = Image.network(
_buildMapAttachment(
attachments[0].extraData['latitude'],
attachments[0].extraData['longitude'],
),
);
return wrapAttachmentWidget(context, attachmentWidget, null, true, BorderRadius.circular(8.0));
}
},
);
},
),
```
Expand Down
Loading

0 comments on commit cf8a028

Please sign in to comment.