Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIS-877] User typing events #1254

Merged
merged 7 commits into from
Jul 9, 2021
Merged

[CIS-877] User typing events #1254

merged 7 commits into from
Jul 9, 2021

Conversation

skorepak
Copy link
Contributor

@skorepak skorepak commented Jul 7, 2021

This PR

  • replaces currentlyTypingMebmers with currentlyTypingUsers
  • changes type from ChatChannelMember to ChatUser

Links

https://stream-io.atlassian.net/browse/CIS-877

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Jul 7, 2021

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2021

Codecov Report

Merging #1254 (66d0d83) into main (959df0b) will decrease coverage by 0.01%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1254      +/-   ##
==========================================
- Coverage   91.40%   91.38%   -0.02%     
==========================================
  Files         219      219              
  Lines        9419     9421       +2     
==========================================
  Hits         8609     8609              
- Misses        810      812       +2     
Flag Coverage Δ
llc-tests 91.22% <92.85%> (-0.02%) ⬇️
llc-tests-ios12 88.07% <67.85%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Sources/StreamChat/Deprecations.swift 16.66% <0.00%> (-3.34%) ⬇️
Sources/StreamChat/Models/ChatMessage.swift 91.80% <ø> (ø)
Sources/StreamChat/Models/Channel.swift 78.43% <66.66%> (-1.17%) ⬇️
Sources/StreamChat/ChatClient.swift 94.39% <100.00%> (ø)
.../ChannelController/ChannelController+Combine.swift 100.00% <100.00%> (ø)
.../ChannelController/ChannelController+SwiftUI.swift 100.00% <100.00%> (ø)
...trollers/ChannelController/ChannelController.swift 92.88% <100.00%> (ø)
Sources/StreamChat/Database/DTOs/ChannelDTO.swift 99.06% <100.00%> (-0.01%) ⬇️
...Middlewares/UserTypingStateUpdaterMiddleware.swift 100.00% <100.00%> (ø)
...es/StreamChat/Workers/DatabaseCleanupUpdater.swift 94.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 959df0b...66d0d83. Read the comment docs.

@skorepak skorepak force-pushed the CIS-877-User-typing-events branch from 79a217c to 855eeea Compare July 8, 2021 07:36
Copy link
Contributor

@evsaev evsaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks 👍 There's just one comment about lazy loading of typing users

public let currentlyTypingMembers: Set<_ChatChannelMember<ExtraData.User>>

/// A list of currently typing users.
public let currentlyTypingUsers: Set<_ChatUser<ExtraData.User>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to have backing @CoreDataLazy field for this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👍🏻 , please check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the currentlyTypingMembers variable into Deprecations.swift (with empty implementation) and mark it as renamed? It will help customers with the transition because they will be able to apply fixits.

Copy link
Contributor

@VojtaStavik VojtaStavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Let's wait with merging this since we have to release a hotfix and we shouldn't include breaking changes there.

public let currentlyTypingMembers: Set<_ChatChannelMember<ExtraData.User>>

/// A list of currently typing users.
public let currentlyTypingUsers: Set<_ChatUser<ExtraData.User>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add the currentlyTypingMembers variable into Deprecations.swift (with empty implementation) and mark it as renamed? It will help customers with the transition because they will be able to apply fixits.

CHANGELOG.md Outdated
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

# Upcoming

### ⚠️ Breaking Changes from `4.0-beta.5`
- Changed ChannelDTO from `currentlyTypingMembers: Set<MemberDTO>` to `currentlyTypingUsers: Set<UserDTO>` to show all typing users (not only channel members; eg: watching users) [#1254](https://github.com/GetStream/stream-chat-swift/pull/1254)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTOs are internal types, please refer to the public API that was changed

@skorepak skorepak force-pushed the CIS-877-User-typing-events branch from a2f6c70 to ffbd6d0 Compare July 8, 2021 11:05
@tbarbugli tbarbugli merged commit 04f5ada into main Jul 9, 2021
@tbarbugli tbarbugli deleted the CIS-877-User-typing-events branch July 9, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants