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

Improve pip and add feature flag. #3199

Merged
merged 5 commits into from
Jul 16, 2024
Merged

Improve pip and add feature flag. #3199

merged 5 commits into from
Jul 16, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 15, 2024

Content

Add feature flag for PiP, disabled in production for now.
Change Call screen top left icon, when pip is supported, use a Back arrow instead of a Close. Closes #3197
Hang up when the Pip is closed.

Motivation and context

Improve Pip feature, and disable the feature until it is correctly tested and production ready.

Screenshots / GIFs

Tests

  • Play with the call with and without activating the feature flag.
  • When in PiP, close the window and observe that on the timeline the call is correctly hanged up.
  • If Pip is supported and the FF is enabled, observe that the Call screen is displaying a Back button.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty added the PR-Change For updates to an existing feature label Jul 15, 2024
@bmarty bmarty requested a review from a team as a code owner July 15, 2024 15:35
@bmarty bmarty requested review from jmartinesp and removed request for a team July 15, 2024 15:35
val isSupportedByTheOs = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
context.packageManager?.hasSystemFeature(PackageManager.FEATURE_PICTURE_IN_PICTURE).orFalse()
return if (isSupportedByTheOs) {
runBlocking { featureFlagService.isFeatureEnabled(FeatureFlags.PictureInPicture) }
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is OK to use a runBlocking here, since at some point the FF will be removed.

Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/FbhuEc

Copy link

sonarcloud bot commented Jul 15, 2024

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 47.61905% with 11 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@7ae5e99). Learn more about missing BASE report.
Report is 3 commits behind head on develop.

Files Patch % Lines
...droid/features/call/impl/pip/PipSupportProvider.kt 0.00% 6 Missing ⚠️
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 4 Missing ⚠️
.../android/libraries/featureflag/api/FeatureFlags.kt 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3199   +/-   ##
==========================================
  Coverage           ?   76.11%           
==========================================
  Files              ?     1643           
  Lines              ?    38686           
  Branches           ?     7480           
==========================================
  Hits               ?    29446           
  Misses             ?     5349           
  Partials           ?     3891           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@bmarty bmarty enabled auto-merge July 16, 2024 08:03
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@bmarty bmarty merged commit 544b4a1 into develop Jul 16, 2024
34 checks passed
@bmarty bmarty deleted the feature/bma/improvePip branch July 16, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use close button of the call starts Picture in Picture
2 participants