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

fix back forward swipe gesture in landscape #3278

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

brindy
Copy link
Contributor

@brindy brindy commented Aug 26, 2024

Task/Issue URL: https://app.asana.com/0/392891325557410/1208145984254241/f
Tech Design URL:
CC:

Description:
Fixes the constraints of the uistackview so that the webview uses the full area and so that the back and forward navigation gestures works.

Steps to test this PR:

  1. Reset your simulator and set the variant manager to only use mb (the new onboarding) by commenting out the other variant.
  2. Launch the app and browse to some sites. Switch between landscape and portrait and check that back and forward navigation gestures still work.
  3. Confirm that new dax onboarding still works as expected (ie doesn't look broken because of this change)
  4. Check on small phone, large phone with notch, iPad

@alessandroboron
Copy link
Contributor

@brindy it’s fixed, thanks! I’m approving it! Was the stackView not constrained to the safe area?

While testing I noticed something that I will need to address in the task to fix the Instagram/Youtube dialog.

When navigating back and forward using gesture it seems that the web view delegate method webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) doesn't get called?.

This means that during the onboarding the user can swipe back and the dax dialog doesn’t get updated (Video attached).

Simulator.Screen.Recording.-.iPad.mini.6th.generation.-.2024-08-27.at.08.36.53.mov

One simple workaround could be to disable allowsBackForwardNavigationGestures during the onboarding. An other solution is to check if navigationAction.navigationType == .backForward and perform the logic. I’ll evaluate pros and cons of both.

@brindy
Copy link
Contributor Author

brindy commented Aug 27, 2024

@alessandroboron

Was the stackView not constrained to the safe area?

Yes, that was the problem - the UIStackView was using safe area for constraints, but it needed to use the superview so that it can go to the extents of the screen. The webview takes care of the safe area on its own for rendering content. :)

@brindy brindy merged commit a8aa0f0 into release/7.135.0 Aug 27, 2024
13 checks passed
@brindy brindy deleted the brindy/fix-back-forward-swipe-in-landscape branch August 27, 2024 11:19
samsymons added a commit that referenced this pull request Aug 28, 2024
# By Anh Do (2) and others
# Via Bartek Waresiak (2) and GitHub (1)
* main:
  Add PPro unified feedback form (#3248)
  disable flaky test (#3283)
  Unified feedback form for Privacy Pro (#3172)
  Release 7.135.0-1 (#3280)
  fix back forward swipe gesture in landscape (#3278)
  Set onboarding completed for sync end to end tests (#3259)
  Release 7.135.0-0 (#3277)
  BSK Bump for macOS Freemium PIR RMF Attribute (No iOS Impact) (#3275)
  Fix math expressions on address bar (#3262)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Aug 29, 2024
# By Daniel Bernal (4) and others
# Via Bartek Waresiak (2) and others
* main: (32 commits)
  Add error pixels for Subscription keychain access errors (#3276)
  [DuckPlayer] 24. FrontEnd Translation (#3281)
  [DuckPlayer] 23. Ship Review Fixes (#3279)
  Logging refactoring phase #2 (#3268)
  Move WireGuard dependency to packet tunnel provider (#3273)
  Add PPro unified feedback form (#3248)
  disable flaky test (#3283)
  Unified feedback form for Privacy Pro (#3172)
  Release 7.135.0-1 (#3280)
  fix back forward swipe gesture in landscape (#3278)
  Set onboarding completed for sync end to end tests (#3259)
  Release 7.135.0-0 (#3277)
  BSK Bump for macOS Freemium PIR RMF Attribute (No iOS Impact) (#3275)
  Fix math expressions on address bar (#3262)
  fix progress view crash by removing call to flush (#3272)
  Update autoconsent to v10.15.0 (#3254)
  Mitigate Onboarding pixels firing with empty atb (#3265)
  Clean up legacy VPN navigation (#3266)
  Re-Enable Broken Site Toast on iOS (#3244)
  Bump BSK (No iOS Changes) (#3261)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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