Skip to content

Back button web view to esc (revive fixed version of: https://github.com/element-hq/element-x-android/pull/6724)#6725

Merged
jmartinesp merged 16 commits into
element-hq:developfrom
toger5:toger5/back-button-web-view-to-esc
May 13, 2026
Merged

Back button web view to esc (revive fixed version of: https://github.com/element-hq/element-x-android/pull/6724)#6725
jmartinesp merged 16 commits into
element-hq:developfrom
toger5:toger5/back-button-web-view-to-esc

Conversation

@toger5

@toger5 toger5 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Content

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • 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 defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

toger5 and others added 9 commits April 22, 2026 12:53
 - inject escape into webview instead of going back.
 - the webview will call back when no other modal is open.
pip in case the webview did not handle the esc action.
…sc' into toger5/back-button-web-view-to-esc

# Conflicts:
#	features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenViewTest.kt
@CLAassistant

CLAassistant commented May 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible:

  • If your pull request adds a feature or modifies the UI, this should have an equivalent pull request in the Element X iOS repo unless it only affects an Android-only behaviour or is behind a disabled feature flag, since we need parity in both clients to consider a feature done. It will also need to be approved by our product and design teams before being merged, so it's usually a good idea to discuss the changes in a Github issue first and then start working on them once the approach has been validated.
  • Your branch should be based on origin/develop, at least when it was created.
  • The title of the PR will be used for release notes, so it needs to describe the change visible to the user.
  • The test pass locally running ./gradlew test.
  • The code quality check suite pass locally running ./gradlew runQualityChecks.
  • If you modified anything related to the UI, including previews, you'll have to run the Record screenshots GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, it will prevent the CI from running temporarily, until you upload a new commit after that one. To do so, just pull the latest changes and push an empty commit.

@jmartinesp

Copy link
Copy Markdown
Member

The back button still doesn't seem to be working for me in the current EC version while I'm in the lobby, only tapping on the 'minimize' button seems to work.

@toger5

toger5 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

The back button still doesn't seem to be working for me in the current EC version while I'm in the lobby, only tapping on the 'minimize' button seems to work.

also in this PR?

@toger5

toger5 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

I will have a look

@toger5

toger5 commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@jmartinesp I checked the logic again:

  • in the lobby the pip does no make any sense (The user needs to interact. And the pip does not allow to interact with the web view)
  • so controls.canEnterPip() will return false -> if we press back or minimise we will end up closing the webview
  • the same for the minimise button.

I think what we should do is changing the icon for the App bar. In the lobby it should be a back icon instead of a minimise icon. (issue: element-hq/element-call#3959)

Current state on my emulator (call.element.dev/room):

Screen_recording_20260511_111651.webm

!NOTE one cannot see the back button presses. But whenever sth cahnges without a touch, i am pressing the back button of the emulator

@toger5 toger5 marked this pull request as ready for review May 11, 2026 09:16
@toger5 toger5 requested a review from a team as a code owner May 11, 2026 09:16
@toger5 toger5 requested review from jmartinesp and removed request for a team May 11, 2026 09:16
@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.25%. Comparing base (2ea23bc) to head (7973e9c).

Files with missing lines Patch % Lines
...nt/android/features/call/impl/ui/CallScreenView.kt 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6725      +/-   ##
===========================================
+ Coverage    81.14%   81.25%   +0.11%     
===========================================
  Files         2647     2648       +1     
  Lines        74099    74115      +16     
  Branches      9600     9605       +5     
===========================================
+ Hits         60126    60225      +99     
+ Misses       10438    10348      -90     
- Partials      3535     3542       +7     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinesp jmartinesp force-pushed the toger5/back-button-web-view-to-esc branch from 355ede8 to 7973e9c Compare May 13, 2026 06:41
@jmartinesp

Copy link
Copy Markdown
Member

I tried fixing the issues myself, since there was a mix of conflicts and problems ktlintFormat wouldn't fix.

@toger5

toger5 commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

Thank you so much.
The changes look like you saved me a lot of time!

@jmartinesp jmartinesp merged commit c959f50 into element-hq:develop May 13, 2026
28 of 29 checks passed
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.

3 participants