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

Align participants sorting with Web #186

Merged
merged 9 commits into from
Oct 18, 2023

Conversation

ipavlidakis
Copy link
Collaborator

@ipavlidakis ipavlidakis commented Oct 11, 2023

🔗 Issue Links

Resolves https://github.com/GetStream/ios-issues-tracking/issues/582

🎯 Goal

Avoid moving video tracks when user properties change, especially when that user is currently visible.

📝 Summary

Based on React implementation here

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (Docusaurus, tutorial, CMS)

@ipavlidakis ipavlidakis added the enhancement New feature or request label Oct 11, 2023
@ipavlidakis ipavlidakis self-assigned this Oct 11, 2023
@github-actions
Copy link

github-actions bot commented Oct 11, 2023

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@ipavlidakis ipavlidakis marked this pull request as ready for review October 12, 2023 15:50
@ipavlidakis ipavlidakis requested a review from a team as a code owner October 12, 2023 15:50
Copy link
Collaborator

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

looks great in general. However, we need to test few things before merging, since there's some logic that's removed that might have an impact. @testableapple can also help.

Sources/StreamVideo/CallState.swift Show resolved Hide resolved
Sources/StreamVideo/Utils/Sorting.swift Outdated Show resolved Hide resolved
Sources/StreamVideo/Utils/Sorting.swift Outdated Show resolved Hide resolved
@@ -380,24 +364,6 @@ open class CallViewModel: ObservableObject {
/// - participant: the participant whose track visibility would be changed.
/// - isVisible: whether the track should be visible.
public func changeTrackVisibility(for participant: CallParticipant, isVisible: Bool) {
if !isVisible {
Copy link
Collaborator

Choose a reason for hiding this comment

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

While some of this stuff might not be needed anymore, with the introduction of the visibility modifier, we need to test all cases. This code was here because of tracks being hidden when changing layouts. Did you test that everything works as expected?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tests so far haven't yield anything concerning but i'll run another round with this one and the comment above just to be sure.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I had one case where one track never got enabled. Hard to tell if it was us or the SFU.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was related to this #191

StreamVideoTests/Utils/Sorting_Tests.swift Show resolved Hide resolved
@ipavlidakis ipavlidakis force-pushed the feature/retain-ordering-when-speaker-changes branch 4 times, most recently from 006ecc7 to b675e4f Compare October 16, 2023 12:08
Copy link
Collaborator

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

great work 👏 I did some tests, but would be good if @testableapple does some more.

@ipavlidakis ipavlidakis force-pushed the feature/retain-ordering-when-speaker-changes branch from b675e4f to de7056d Compare October 17, 2023 13:09
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

79.4% 79.4% Coverage
0.0% 0.0% Duplication

@ipavlidakis ipavlidakis merged commit 2da3e3f into main Oct 18, 2023
@ipavlidakis ipavlidakis deleted the feature/retain-ordering-when-speaker-changes branch October 18, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants