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

feat: Minimise incoming/outgoing call screen (WPB-979) #2912

Merged
merged 51 commits into from
Apr 29, 2024

Conversation

ohassine
Copy link
Member

@ohassine ohassine commented Apr 18, 2024

StoryWPB-979 Minimise Call Screen


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Description

  • Allow the app to minimise incoming/outgoing call screen.
  • Show an ongoing non dismissable notification when starting or receiving a call.
  • Rename classes from using "Initiating" term to "Outgoing" for outgoing call
screen-20240418-171535.mp4

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

ohassine and others added 26 commits April 9, 2024 14:58
…separate_activity

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/home/conversations/ConversationScreen.kt
…separate_activity

# Conflicts:
#	gradle/libs.versions.toml
…ity' into move_calling_to_a_separate_activity
Copy link
Contributor

github-actions bot commented Apr 18, 2024

Test Results

922 tests  +6   922 ✅ +6   8m 26s ⏱️ - 1m 14s
123 suites ±0     0 💤 ±0 
123 files   ±0     0 ❌ ±0 

Results for commit 5f515ed. ± Comparison against base commit b0043db.

This pull request removes 9 and adds 15 tests. Note that renamed tests count towards both.
com.wire.android.ui.calling.initiating.InitiatingCallViewModelTest ‑ given a start call error, when user tries to start a call, call ring tone is not called()
com.wire.android.ui.calling.initiating.InitiatingCallViewModelTest ‑ given an outgoing call, when the user ends call, then invoke endCall useCase and close the screen()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndCallIsMuted_whenGettingState_thenShouldHaveMutedCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndCallIsNotMuted_whenGettingState_thenShouldNotHaveMutedCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndConnectivityIssueAndSomeOtherScreen_whenGettingState_thenShouldHaveActiveCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndConnectivityIssues_whenGettingState_thenShouldHaveConnectivityInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenActiveCallAndHomeScreenAndConnectivityIssues_whenGettingState_thenShouldHaveActiveCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenNoActiveCallAndHomeScreenAndGathering_whenGettingState_thenShouldHaveConnectingInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenNoActiveCallAndHomeScreenAndSlowSync_whenGettingState_thenShouldHaveConnectingInfo()
com.wire.android.notification.CallNotificationManagerTest ‑ given an outgoing call for one user, when handling notifications, then show notification for that call()
com.wire.android.notification.CallNotificationManagerTest ‑ given no outgoing calls, when handling notifications, then hide outgoing call notification()
com.wire.android.notification.WireNotificationManagerTest ‑ givenOutgoingCall_whenCurrentUserIsDifferentFromCallReceiver_thenCallNotificationIsShown()
com.wire.android.ui.calling.outgoing.OutgoingCallViewModelTest ‑ given a start call error, when user tries to start a call, call ring tone is not called()
com.wire.android.ui.calling.outgoing.OutgoingCallViewModelTest ‑ given an outgoing call, when the user ends call, then invoke endCall useCase and close the screen()
com.wire.android.ui.calling.outgoing.OutgoingCallViewModelTest ‑ given user already started a call, when user tries to start another call, then do not initiat a new one()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenAnIncomingCallAnd_whenGettingState_thenShouldHaveIncomingCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenAnOngoingCallAndCallIsMuted_whenGettingState_thenShouldHaveMutedCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenAnOngoingCallAndCallIsNotMuted_whenGettingState_thenShouldNotHaveMutedCallInfo()
com.wire.android.ui.common.topappbar.CommonTopAppBarViewModelTest ‑ givenAnOngoingCallAndConnectivityIssueAndSomeOtherScreen_whenGettingState_thenShouldHaveActiveCallInfo()
…

♻️ This comment has been updated with latest results.

@AndroidBob
Copy link
Collaborator

Build 4322 failed.

@AndroidBob
Copy link
Collaborator

Build 4465 failed.

@AndroidBob
Copy link
Collaborator

Build 4469 failed.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 4475 succeeded.

The build produced the following APK's:

Garzas
Garzas previously requested changes Apr 26, 2024
Copy link
Contributor

@Garzas Garzas 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 🎸 Just two small questions

@@ -53,6 +54,7 @@ class CallNotificationManager @Inject constructor(
private val notificationManager = NotificationManagerCompat.from(context)
private val scope = CoroutineScope(SupervisorJob() + dispatcherProvider.default())
private val incomingCallsForUsers = MutableStateFlow<List<Pair<UserId, Call>>>(emptyList())
private val outgoingCallForUsers = MutableStateFlow<Map<UserId, Call>>(mapOf())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use persistentMap?

Copy link
Member Author

Choose a reason for hiding this comment

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

What's the point of persistentMap ?

Copy link
Member

@vitorhugods vitorhugods left a comment

Choose a reason for hiding this comment

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

Nice to see this!

Just a couple of small suggestions and one maybe important question about priority of the top app bar regarding calls.

…tionManagerTest.kt

Co-authored-by: Vitor Hugo Schwaab <vitor@schwaab.dev>
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 4481 succeeded.

The build produced the following APK's:

@ohassine ohassine dismissed Garzas’s stale review April 29, 2024 09:13

stale review

@ohassine ohassine enabled auto-merge April 29, 2024 09:13
@ohassine ohassine added this pull request to the merge queue Apr 29, 2024
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Merged via the queue into develop with commit 7875c99 Apr 29, 2024
12 of 13 checks passed
@ohassine ohassine deleted the minimise-calling-screens branch April 29, 2024 09:51
@AndroidBob
Copy link
Collaborator

Build 4510 succeeded.

The build produced the following APK's:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants