Giter Club home page Giter Club logo

stream-chat-swiftui's Introduction

SwiftUI StreamChat SDK

The SwiftUI SDK is built on top of the StreamChat framework and it's a SwiftUI alternative to the StreamChatUI SDK. It's built completely in SwiftUI, using declarative patterns, that will be familiar to developers working with SwiftUI. The SDK includes an extensive set of performant and customizable UI components which allow you to get started quickly with little to no plumbing required.

The complete documentation and capabilities of the SwiftUI SDK can be found here and you may find our SwiftUI Chat App tutorial helpful as well.

Main Features

  • Channel list: Browse channels and perform actions on them.
  • Message list: Fast message list that renders many different types of messages.
  • Message Composer: Powerful and customizable message composer, extendable with your own custom attachments.
  • Message reactions: Ready made reactions support, easily configurable depending on your use-cases.
  • Offline support: Browse channels and send messages while offline.
  • Highly customizable components: The components are designed in a way that you can easily customize or completely swap existing views with your own implementation.

Main Principles

  • Progressive disclosure: The SDK can be used easily with very minimal knowledge of it. As you become more familiar with it, you can dig deeper and start customizing it on all levels.
  • Familiar behavior: The UI elements are good platform citizens and behave like native elements; they respect tintColor, paddings, light/dark mode, dynamic font sizes, etc.
  • Swift native API: Uses Swift's powerful language features to make the SDK usage easy and type-safe.
  • Uses SwiftUI patterns and paradigms: The API follows the declarative nature and patterns of SwiftUI. It makes integration with your existing SwiftUI code easy and familiar.
  • Fully open-source implementation: You have access to the complete source code of the SDK here on GitHub.

Architecture

The SwiftUI SDK offers three types of components:

  • Screens - Easiest to integrate, but offer small customizations, like branding and text changes.
  • Stateful components - Offer more customization options and possibility to inject custom views. Also fairly simple to integrate, if the extension points are suitable for your chat use-case. These components come with view models.
  • Stateless components - These are the building blocks for the other two types of components. In order to use them, you would have to provide the state and data. Using these components only make sense if you want to implement completely custom chat experience.

Free for Makers

Stream is free for most side and hobby projects. You can use Stream Chat for free if you have less than five team members and no more than $10,000 in monthly revenue.


We are hiring

We've recently closed a $38 million Series B funding round and we keep actively growing. Our APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world. Check out our current openings and apply via Stream's website.

Quick Overview

Channel List

Features Preview
A list of channels matching provided query
Channel name and image based on the channel members or custom data
Unread messages indicator
Preview of the last message
Online indicator for avatars
Create new channel and start right away
Customizable channel actions on swipe
Typing and read indicators

Message List

Features Preview
A list of messages in a channel
Photo attachments
Giphy attachments
Video attachments
Link previews
File previews
Custom attachments
Message reactions
Message grouping based on the send time
Thread and inline replies
Typing and read indicators

Message Composer

Features Preview
Support for multiline text, expands and shrinks as needed
Image, video and file attachments
Camera integration
Custom attachments
Mentions
Instant commands (e.g. giphy)
Custom commands

stream-chat-swiftui's People

Contributors

adamrushy avatar adolfogarza avatar amosgyamfi avatar andrewsb avatar daemonloki avatar ddomovoj avatar dependabot[bot] avatar finestructure avatar ipavlidakis avatar jeroenleenarts avatar laevandus avatar marco-ulge avatar martinmitrevski avatar masarusanjp avatar mfreiwald avatar mkhandium avatar mrfifield avatar polqf avatar saidreclip avatar sam-spencer avatar testableapple avatar wang-li avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stream-chat-swiftui's Issues

Pass GIF to Chat (GIPHY SDK)

Our team has implemented the GIPHY SDK in Stream but is unable to pass a GIF into the chat. Currently, we have only been able to pass a video or link.

Based on user testing and our assessment of leading chat apps on the market, the GIPHY SDK provides a more common and more powerful user experience for selecting GIFs than the existing GIPHY implementation that Stream uses.

image

Chat channel is not removed from UI when user is programmatically removed from channel using removeMembers

What did you do?

In our app, users are added and removed from admin panel which call the server to execute addMembers and removeMembers on different channels.

Use case:
Step 1: Keep the app open as all channels of user are visible
Step 2: Remove the user from a channel using removeMembers method call from server

What did you expect to happen?

Expectation was that the chat screen would update and that particular channel will be removed from the chat list immediately.

What happened instead?

The channel wasn't removed from the chat list and user was able to interact with that channel. Even switching app from background to foreground does not update the chat list. Also in this scenario, when app is brought from background to foreground then clicking on any channel in chat list would crash the app.

GetStream Environment

**GetStream Chat version:Using from master branch
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
**iOS version:14.8.1
**Swift version:Swift 5
**Xcode version:13.2.1
**Device:iPhone 11

Image Picker's tap target is way off

video-1644645582.mp4

What did you do?

When I tap at the bottom half of the Tiger photo, I ended up selecting the video below. See the attached video

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: 15
Swift version:
Xcode version:
Device: iPhone 13 Pro

Additional context

Catalyst: Windows Resizing Issue with ChatChannelView

What did you do?

Went through the tutorial to create a new app using the SwiftUI framework for Stream. Ran the project on My Mac β€” both Catalyst and Designed for iPad.

When you resize the window larger, everything goes well, but when you resize the window back down, the leading edge content (the chat messages) slides underneath the sidebar of the navigation view (channel list).

What did you expect to happen?

I expected the messages within the channel to stay visible.

What happened instead?

The messages on the left-hand side of the channel view get obscured by the channel list.

GetStream Environment

GetStream Chat version: main
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 15.2 (Catalyst)
Swift version: 5.6
Xcode version: Version 13.3.1 (13E500a)
Device: Issue occurs on both Mac Studio (Catalyst) and Mac Studio (Designed for iPad)

Additional context

As a work around, I attempted to implement my own custom ChannelListView with my own NavigationView, but the issue persisted, indicating that it's likely an issue local to the ChatChannelView or MessageListView?

Video

issue.mov

`makeMessageReadIndicatorView` is not called anymore if I use custom `makeMessageContainerView`

What did you do?

I can successfully remove SEEN view when somebody see my message by implementing makeMessageReadIndicatorView, but if I implement makeMessageContainerView then makeMessageReadIndicatorView is not called anymore.

What did you expect to happen?

makeMessageReadIndicatorView func should be called anyway

What happened instead?

makeMessageReadIndicatorView func is not called anymore

GetStream Environment

GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: Latest
Swift version: 5
Xcode version: Version 13.3 (13E113)
Device: iPhone 12/13 | Simulator

Additional context

App crashes when there is link attachment with `nil` previewURL

What did you do?

  • User A sent a zoom url in a channel
  • User B clicked on that channel from the channel list screen

What did you expect to happen?

  • User B should see the message list

What happened instead?

  • App crashes for User B

GetStream Environment

**GetStream Chat version: ** 4.15.0
GetStream Chat frameworks: - StreamChatSwiftUI
iOS version: - 15.3
Swift version: - 5
Xcode version: - 13.2.1
Device: - iPhone SE (2020)

Additional context

It crashes in QuotedMessageViewContainer’s QuotedMessageView, where the previewURL parameter of the linkAttachments[0] is nil while fetching it forcefully. Have attached screenshots for better context.

Screenshot 2022-05-30 at 11 12 56 AM
Screenshot 2022-05-30 at 11 11 52 AM

In ChatChannelView, typing indicator covers message

272715082_776173260259132_5693551124117532932_n

See screenshot.
You could argue this is working as intended ... but there has got to be a better UI design to avoid the covering the message?

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: 15
Swift version:
Xcode version:
Device: iPhone 13 Pro

Additional context

The "X" button is invisible in Dark Mode

258864273_267689202106332_4026149861756073656_n
272676579_492186735671682_1970805811181609195_n

See screenshots for comparison of Dark Mode vs Light Mode.
When I was in Dark mode, I actually thought there was no way to get out of this view ...

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: 15
Swift version:
Xcode version:
Device: iPhone 13 Pro

Additional context

SwiftUI empty state for chat

What are you trying to achieve?

Hi. Is it possible to have emptyview for chat if there is no message and have ability to replace whole message content with custom view? It is supported on Android so wondering wether it can be done on iOS as well?

Composer view component changes

What are you trying to achieve?

Hello. I am trying to modify composer view. I have two issues right now.

  1. change height of inputs and buttons

  2. change background color of whole composer view.

What would be the better way?

  1. Would be nice to have separate prop under Appearance to set height of input view. Right now I can not change it.
  2. I can change the background color of whole composer view, but it discards changes for input. So would be nice to have separate prop under colors to set ComposerViewType background color in Appearance

GetStream Environment

GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: Latest
Swift version: 5
Xcode version: Version 13.3 (13E113)
Device: iPhone 12/13 | Simulator

Configurable Video Attachment Parameters

One of our product's core features is unlockable photo/video content (user can pay to unlock photo and video within the chat). It would be ideal for us to control some of Stream's video attachment parameters:

  • Compression level / quality
  • Resolution
  • Max file size
  • Max video duration (if limit exists)

Thank you,
Kyle

Open 1-1 chat window directly, Instead of showing list of channels.

What are you trying to achieve?

I am trying to open the chat window between two members, I have created a channel specifying the two members. Now instead of open the chat listing i want to open 1-1 window directly.

If possible, how can you achieve this currently?

What would be the better way?

GetStream Environment

ios
GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
StreamChatSwiftUI

Additional context

Custom emoji reactions over message [Swift UI]

What are you trying to achieve?

We are using SwiftUI SDK. We would like to have custom emojis have in place for reactions.
It can be done right now, but as far as I can see the tint color of those emojis are hardcoded and can not be configured.

If possible, how can you achieve this currently?

We use the default emojis in place

What would be the better way?

If it's possible to pass custom images and configure tintColor from outside, would be amazing. So basically the tint color should be an optional parameter

GetStream Environment

GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: Latest
Swift version: 5
Xcode version: Version 13.3 (13E113)
Device: iPhone 12/13 | Simulator

In ChatChannelView, keyboard doesn't come up when the scroll view is bouncing at the bottom

video-1644646542.mp4

What did you do?

In the ChatChannelView, scroll pretty hard and fling toward the bottom. The scroll will do a spring bounce (so far so good).
While the spring bounce is happening, tap on the TextField input ... notice that the keyboard attempts to come up but quickly gets dismissed.

This is a pretty common interaction: I come into the app to check a batch of messages I missed; I scroll up to see them, then I scroll down and fling hard ==> then I tap on the TextField input view to write a response. Keyboard fails to come up.

This bug doesn't exist in any other messaging apps like iMessages, Whatsapp or Signal.

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: 15
Swift version:
Xcode version:
Device: iPhone 13 pro

Additional context

How to hide search bar and disable chat swipe gesture?

I tried to find this query in the official documentation and also went through the SDK options but couldn't find a simple way to do this. We have similar customization in Android and there it is very simple to hide search bar and disable chat swipe gesture.

The initial height when editing a message is incorrect

What did you do?

Hold down on a message, from the menu tap 'Edit message'.

What did you expect to happen?

The height of the message would accommodate 3 lines as it does when writing a message.

What happened instead?

The initial height is smaller than expected, displaying 1 line of text and requiring scrolling (as shown in the attached video). If you change a character then the height updates to what it should be.

GetStream Environment

GetStream Chat version: 4.15.0 (master branch)
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: iOS 15.5
Swift version: Swift 5
Xcode version: Version 13.4 (13F17a)
Device: Simulator (iPhone 13 Pro)

Additional context

Video here: https://www.dropbox.com/s/p85k454gz14t59h/edit_message_layout.mov?dl=0

Read only access to `MessageCachingUtils`

What are you trying to achieve?

Hello. We would like to have public read only access to MessageCachingUtils.
It would avoid us to repeat the same functionality on our side.

If possible, how can you achieve this currently?

I am accessing message.author property which is lazy var and is not recommended to be use used from performance perspective.

What would be the better way?

Better way would be to access MessageCachingUtils and have only read only access.

Add image attachment animation / transition from UIKit SDK to SwiftUI SDK.

What are you trying to achieve?

In UIKit SDK, when tapping an image in the chat, the image scales up to fill the screen (similar to iMessage). In the SwiftUI SDK, the image opens in a separate overlay that slides up from the bottom of the viewport. The UIKit animation feels more efficient and more elegant.

UIKit:

UIKit_image.mp4

SwiftUI:

SwiftUI_Image.mp4

GetStream Environment

GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 15.2
Swift version: 5
Xcode version: 13.2.1
Device:

Additional context

makeLoadingView not called

What did you do?
Updated the package dependency to StreamChatSwiftUI 4.15.0

What did you expect to happen?
The method to be called as it was before updating the SDK

What happened instead?
Nothing. The method is implemented in a ViewFactory instance and was called correctly under the previous package

GetStream Environment
**GetStream Chat version: 4.15.0
**GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
**iOS version: 15.2
**Swift version: 5
**Xcode version: 13.2
**Device: iPhone 13 Pro Max (Xcode Simulator 13.2)

bug: scrolling jank on message input bar becoming first responder

this video demonstrates:

Simulator.Screen.Recording.-.iPod.touch.7th.generation.-.2022-02-07.at.21.16.22.mp4

i'm running master of this library on Version 13.2.1 (13C100) of Xcode

i'd love to get this fixed, currently evaluating stream vs some other options, this SwiftUI library is super expressive, but might just be missing some tiny bits of polish

Animation missing on message overlay

What did you do?

Long press on message to open overlay.

What did you expect to happen?

On the UIKit SDK, there is a "pop in" animation.

UIKit.20SDK.mp4

What happened instead?

Animation isn't present on SwiftUI SDK. Will there be design parity added between SDKs? Is this a SwiftUI limitation?

SwiftUI.20SDK.mp4

GetStream Environment
GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 14.5
Swift version: Swift 5
Xcode version: 13.2.1
Device: iPhone 11 Pro

Allow message grouping customization

What are you trying to achieve?

Some people find the current (userid-HH:mm key based) message grouping/timestamps display annoying and redundant.

If possible, how can you achieve this currently?

By beating the DateFormatter into submission (e.g suppressing minutes) and hoping it won't bite me back elsewhere.

What would be the better way?

I think being able to plug a custom ChatMessage -> AnyHashable function into the SDK would be awesome.

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
Swift version:
Xcode version:
Device:

Additional context

ChatChannelView scroll view jitters like crazy when you scroll to top or bottom

video-1644618373.mp4

What did you do?

See my video.

  1. Scroll to bottom of a ChatChannelView. If you fling too hard, this won't reproduce; but if you just land at the end, the offset jitters like crazy.
  2. Scroll to the top of a ChatChannelView. When you pull pretty hard, the scroll offset is all over the place

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: iOS 15.
Swift version: 5.5.2
Xcode version: 13.2.1
Device: iPhone 13 Pro

Additional context

Place Date Indicator in Message List

What are you trying to achieve?

Place Date Indicator in message list.

If possible, how can you achieve this currently?

It is available in Swift SDK but not SwiftUI SDK.

/// Defines where the date indicator in the message list is placed.
public enum DateIndicatorPlacement {
  case none
  case overlay
  case messageList // Not supported yet.
}

Thanks!

Notifications are not received

What did you do?

Configured Push Notifications in App using this doc - https://getstream.io/chat/docs/sdk/ios/guides/push-notifications. I have verified that Stream is able to set the deviceToken token successfully after user connection is successful. Send messages in chat from other device doesn't notify user via Push Notification.

I tried a similar scenario in the Demo app. In the first device I signed in as Luke Skywalker and in second device I signed in as Leia Organa, then I tried to send messages from one user to another user whose app was in background and the device didn't receive any Push Notification.

What did you expect to happen?

To receive Push Notification for new messages

What happened instead?

Push Notifications were not received

GetStream Environment

GetStream Chat version: Using from main branch
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 14.8.1 || 15.3
Swift version: Swift 5
Xcode version: 13.2.1
Device: iPhone 11 || iPhone 12

Update to Use Latest Stream SDK Version

What are you trying to achieve?

A fix was made in the Stream SDK repo recently which is required in our application. It was merged recently here: GetStream/stream-chat-swift#2028. It would be great if StreamSwiftUI could update its dependency to bring this in.

GetStream Environment

GetStream Chat frameworks: StreamChatSwiftUI (master branch)
iOS version: All
Swift version: All
Xcode version: All
Device: All

Ability to set custom background for chat composer and list view

What are you trying to achieve?

  • Set custom background color for chatview -> composer (including safe area)
  • Set custom background color for chatview -> list

If possible, how can you achieve this currently?

What would be the better way?

Have props for both cases to set the background colors

GetStream Environment

GetStream Chat version: Latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: Latest
Swift version: 5
Xcode version: Version 13.3 (13E113)
Device: iPhone 12/13 | Simulator

Additional context

Photo viewers do not size/position photos correctly anymore after you swipe left and right

What did you do?

video-1644646133.mp4

What did you expect to happen?

When I send 2 screenshots (taken on iPhone 13 Pro) and opened them in photo viewer .... the photos are initially correctly sized and position (aspect-ratio-fit and centered). Then I swipe left and right to view both photos ... watch the video, the photos are suddenly incorrectly sized and incorrectly positioned.

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat 4.10.0, StreamChatSwiftUI 4.9.0
iOS version: 15
Swift version:
Xcode version:
Device: iPhone 13 Pro

Additional context

Nothing happens on clicking message commands button in message composer

What did you do?

I am using latest master branch via SPM. Clicking on the thunder icon for message commands does not present the commands dialog, it just shows as the commands button in blue color as selected. The same scenario is reproducible in the latest demo app as well.

What did you expect to happen?

To open a diaslog where user can select a message commad to run

What happened instead?

The message commad icon's color is changed to blue and no dialog is shown.

GetStream Environment

GetStream Chat version: Using from master branch
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 14.8.1
Swift version: Swift 5
Xcode version: 13.2.1
Device: iPhone 11

Drag and Drop

What are you trying to achieve?

I would like to drag and drop photos and files (on iPadOS and macOS) into ChatChannelListView, ChatChannelScreen, etc.

If possible, how can you achieve this currently?

As far as I'm aware, you cannot inject attachments programmatically into the message composer without using the built-in attachment system (AttachmentPicker/MessageComposerViewModel) from the UI itself.

What would be the better way?

Support the iOS feature of Drag and Drop.

Attachments ignore MessageListConfig.messagePaddings

What did you do?

        let mlc = MessageListConfig(messagePaddings: MessagePaddings(horizontal: 40) )
        let utils = Utils(messageListConfig: mlc)
         streamChat = StreamChat(chatClient: chatClient, appearance: appearance, utils: utils)

What did you expect to happen?

All messages paddings affected.

What happened instead?

Attachments are not affected.

Simulator Screen Shot - iPhone 13 - 2022-05-25 at 17 50 08

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
Swift version:
Xcode version:
Device:

Additional context

Recent message is not shown in chat list screen when user is added to an existing channel

What did you do?

In our app, users are added to channels from admin panel which call the server to execute addMembers on different channels.

Use case:
Step 1: Keep the app open as all channels of user are visible in chat list screen
Step 2: Add user to a existing channel with messages using addMembers method call from server

What did you expect to happen?

Expectation was that the chat list screen would update and that particular channel will be added with correct data, including the recent message shown below channel name.

What happened instead?

The channel was added with correct profile photo and channel name but instead of the recent message it showed No messages below channel name.

GetStream Environment

GetStream Chat version: Using from master branch
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 14.8.1
Swift version: Swift 5
Xcode version: 13.2.1
Device: iPhone 11

Is it possible to intercept scroll position changes?

Hi,

I need to somehow know when the message list scroll view has the content offset changed (to update my customized UI – I have a shadow that is supposed to disappear when there's no more content to scroll). Do you think that's possible at all in the current implementation? I mean, without resorting to enumerating the underlying UIKit subviews and observing properties.

Replying to a message from the menu is broken

What did you do?

Hold down on a message, from the menu tap 'Reply'.

What did you expect to happen?

It should have displayed the reply interface (like it does when you swipe a message to reply).

What happened instead?

It shows a blank space. If you swipe to reply a message after this has happened then that doesn't work either, unless you go back to the message list and revisit the screen (as shown in the attached video).

GetStream Environment

GetStream Chat version: 4.15.0 (master branch)
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: iOS 15.5
Swift version: Swift 5
Xcode version: Version 13.4 (13F17a)
Device: Simulator (iPhone 13 Pro)

Additional context

Video here: https://www.dropbox.com/s/yviszpnk5s2avvl/Screen%20Recording%202022-05-30%20at%2012.15.33.mov?dl=0

When switching between text-input and image-picker, the keyboard shouldn't animate

video.mp4

What are you trying to achieve?

See a comparison between Stream and Signal. First part of the video is Stream and the second part is Signal.

In Signal, when you open the inline image-picker, the keyboard doesn't shift or animate. This is the standard behavior across most messaging apps.
In UIKit world, you can accomplish it by using UITextField.inputView

If possible, how can you achieve this currently?

I guess I'll just have to write my own custom composer ...

What would be the better way?

StreamChatSwiftUI can use UITextField.inputView for the image picker.

User Mentions Not Being Sent

What did you do?

I've mentioned a user in a Stream message but it doesn't appear that the library is parsing or sending them in ChatChannelController's createNewChannel method.

You can see here in MessageComposerViewModel that the mentionedUserIds property is missing and so the default value of an empty array is being used. This is the codepath I'm seeing when entering text in the composer and tapping the regular send button.

In fact, only the text, attachments and quotedMessageId parameters are being sent.

This issue also seems to exist when replying to messages here.

What did you expect to happen?

I'd expect the mentionedUserIds value to be passed in as expected. Our backend is monitoring messages sent and cannot pick up on any user mentions without this.

What happened instead?

No mentions are being passed.

GetStream Environment

GetStream Chat version: main branch
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: Any
Swift version: Any
Xcode version: Any
Device: Any

Leaving a group doesn't take you back to the channel list

What did you do?

Open a group, tap the settings, choose 'leave group' and confirm.

What did you expect to happen?

Upon leaving the group it should send you back to the channel list (as it does in the stream-chat-swift app).

What happened instead?

You remain viewing the conversation and can still send messages, making it seem like you haven't left the group. You can also view the group settings again and keep attempting to leave the group which is confusing. Manually navigating back to the channel list resolves the issue.

GetStream Environment

GetStream Chat version: 4.15.0 (master branch)
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: iOS 15.5
Swift version: Swift 5
Xcode version: Version 13.4 (13F17a)
Device: Simulator (iPhone 13 Pro)

Additional context

Video here: https://www.dropbox.com/s/x2zcb74vvpj3nzb/leave_group.mov?dl=0

Long boring messages break scroll to bottom functionality

What did you do?

Launched the demo app, copied and pasted a paragraph from a random Wikipedia article, scrolled up, maybe tapped on the input field to make the keyboard visible, tapped "scroll to bottom" button.

What did you expect to happen?

Most recent message is visible.

What happened instead?

It doesn't scroll to the correct location.

RocketSim_Recording_iPhone_13_mini_2022-05-26_20 04 59

GetStream Environment

GetStream Chat version: 4.15 I think
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 15.5
Swift version: 5
Xcode version: 13
Device: Sim

Additional context

Reply Composer Animation Missing

What did you do?

Initiate reply to a message

What did you expect to happen?

On older releases, when replying there was fade animation on the message composer's title "Reply to Message" and close (x) button during open and close. This appears to have been removed in a recent release and feels less smooth, especially on open.

Old Behavior:

Upload.from.GitHub.for.iOS.MOV

What happened instead?

New behavior:

Upload.from.GitHub.for.iOS.MOV

Reply title now collides with contents in chat.

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
Swift version:
Xcode version:
Device:

Additional context

ChatChannel in makeLeadingComposerView

What are you trying to achieve?

I’m trying to make a custom leading composer view that presents a custom sheet where the user can perform an action on the current channel.

However, the parameters for makeLeadingComposerView do not provide a way to know what the current channel is.

If possible, how can you achieve this currently?

I’m not sure quite how I might accomplish this. I would need to track when the user navigates within the context of the current window.

What would be the better way?

Ideally, the ViewFactory function makeLeadingComposerView would give me channel: ChatChannel (similar to makeChannelHeaderViewModifier) so that I know what the current context is.

Mixed media attachments have incorrect bubble

What did you do?

Launched the demo app, attached 2 photos and a video, sent.

What did you expect to happen?

The entire block having rounded top-left, bottom-left and top-right edges

What happened instead?

The non-rounded edge in the middle of the block.

Simulator Screen Shot - iPhone 12 Pro - 2022-05-31 at 16 51 07
Simulator Screen Shot - iPhone 12 Pro - 2022-05-31 at 16 51 23

GetStream Environment

GetStream Chat version:
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
Swift version:
Xcode version:
Device:

Additional context

How to hide TabView bottom toolbar when ChatChannelView is pushed?

What are you trying to achieve?

I want to achieve WhatsApp-style navigation where I have a TabView for the top-level navigation of the app, but when ChatChannelView is pushed, the bottom toolbar is hidden.

What I initially tried:

TabView {
   HomeView()
   ChatChannelListView() // <--- This has a NavigationView inside
}

Now when I tap on a thread, the ChatChannelView is nested inside the TabView. So the TextField input is not at the bottom of the screen but rather nested inside the TabView.

In UIKit, there is hidesBottomBarWhenPushed to configure this, but there doesn't appear to be an obvious way to do so in SwiftUI?

Next I tried this:

NavigationView {
  TabView {
    HomeView()
    ChatChannelListViewWithoutNavigation() // <=== by copy-pasting ChatChannelListView and editing it
  }
}

This could work but it would be nice if ChatChannelListView allows me to customize it without copy-pasting?
In this setup, there also appears to be a nasty SwiftUI bug on iOS 15 where if you background the app, the ChatChannelView automatically gets popped ....

If possible, how can you achieve this currently?

Right now, I am copy-pasting ChannelListView into CustomChannelListView and modifying the file to get rid of the NavigationView. Ideally, StreamChatSwiftUI SDK should let me customize that ...

What would be the better way?

See above

Searching channels, then cancelling and selecting a channel crashes

What did you do?

Search for a channel, then cancel, then select a channel from the list and the app crashes.

What did you expect to happen?

The app would open the channel without crashing.

What happened instead?

The app crashed Swift/ContiguousArrayBuffer.swift:575: Fatal error: Index out of range.

GetStream Environment

GetStream Chat version: 4.15.0 (master branch)
GetStream Chat frameworks: StreamChatSwiftUI
iOS version: iOS 15.5
Swift version: Swift 5
Xcode version: Version 13.4 (13F17a)
Device: Simulator (iPhone 13 Pro)

Additional context

Video here: https://www.dropbox.com/s/4xui1nt4o30sht1/crash.mov?dl=0
Crash report here: https://www.dropbox.com/s/n0pfga2xu24dd70/SwiftUIChatDemo-2022-05-30-151603.ips?dl=0

User is able to send blank message

What did you do?

Type one or multiple spaces in the message input box and the send button would get enabled and clicking on it will send the empty message.

What did you expect to happen?

If there are only blank spaces in the message input bar then the send button should stay disabled.

GetStream Environment

GetStream Chat version: From main branch
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 14.8.1
Swift version: Swift 5
Xcode version: 13.2.1
Device: iPhone 11

Including a `struct MessageDisplayInfo` disables factory's makeMessageContainerView

got an interesting one. check this out

lmao.mov

uncommenting that struct MessageDisplayInfo makes it so the custom makeMessageContainerView i have in my ViewFactory stops taking effect. kind of wild, right? it's not doing a default registration or anything like that.

i'm doing this because i need to hide the delivery indicators and message timestamps from the message containers. going to email you a copy of the project, it's very hello world-y

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.