Skip to content

Fix InAppMessage Scrolling #640

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

Merged
merged 3 commits into from
May 13, 2024
Merged

Conversation

prudrabhat
Copy link
Contributor

@prudrabhat prudrabhat commented Apr 3, 2024

Description

Problem: Currently, InAppMessages with content overflowing the bounds are not scrollable even when gestures are disabled. This is because the draggable effect on the AndroidView that hosts the WebView is conflicting with the WebViews scroll (isHorizontalScrollEnabled, isVerticalScrollEnabled).

Solution: Apply gesture detection on the frame of the WebView i.e the Card inside the MessageFrame and ensure that it is enabled only if gestures are not available.

Also fixed deprecated usage of performGesture with performTouchInput

Related Issue

#638

How Has This Been Tested?

  • Manual test with test app.
  • Jetpack test suite does not support scroll verification, the swipe verification instrumented tests pass.
    • No gestures defined + swipe/scroll on in-app message => scrolls webveiw
    • Gestured defined + swipe + swipe/scroll on in-app message => No change

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@prudrabhat prudrabhat self-assigned this Apr 3, 2024
@prudrabhat prudrabhat changed the title Fix InAppMessageScrolling Fix InAppMessage Scrolling Apr 3, 2024
@prudrabhat prudrabhat marked this pull request as draft April 5, 2024 21:32
- Also replace deprecated test method.
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Merging #640 (843cb75) into dev (257d036) will increase coverage by 0.02%.
The diff coverage is 97.44%.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #640      +/-   ##
============================================
+ Coverage     81.45%   81.47%   +0.02%     
+ Complexity     2124     2123       -1     
============================================
  Files           191      191              
  Lines          8913     8926      +13     
  Branches       1114     1115       +1     
============================================
+ Hits           7260     7272      +12     
  Misses         1101     1101              
- Partials        552      553       +1     
Flag Coverage Δ
functional-tests 27.67% <97.44%> (+0.09%) ⬆️
unit-tests 68.80% <0.00%> (-0.11%) ⬇️

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

Files Coverage Δ
...mobile/services/ui/message/views/MessageContent.kt 93.10% <100.00%> (-1.24%) ⬇️
...g/mobile/services/ui/message/views/MessageFrame.kt 94.52% <97.37%> (+2.85%) ⬆️

... and 1 file with indirect coverage changes

@prudrabhat prudrabhat marked this pull request as ready for review April 11, 2024 20:53
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