-
Notifications
You must be signed in to change notification settings - Fork 9
[MOB-4042] Handle links meant to be opened in a new tab in EcosiaWebViewModal
#989
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
base: main
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
- Load target='_blank' URLs directly in modal instead of new tabs - Track origin pages of blank-target links to prevent navigation loops - When user goes back to origin page, continue navigating back - Remove unused onOpenInNewTab callback and related code - Simplify coordinator by removing closure retention logic - Change parent to immutable (let) since it's never reassigned - Remove debugging artifacts (.id modifier) - Restore pageTitle property for original contract
812e2d3 to
ee614e0
Compare
|
|
||
| // If this is a back navigation to a page we loaded from a target="_blank" link, | ||
| // prevent it and go back further (to the page before the blank link was clicked) | ||
| if navigationAction.navigationType == .backForward, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The WebView delegates carry quite some logic. Can you please add unit test coverage making sure the logic works? As well to the addition below? Thank you
ecotopian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Would be neat to have some unit tests covering the new logic. No blocker, but nice to have.
MOB-4042
Context
We noticed that some links meant to be opened in a new tab within our
EcosiaWebViewModalweren't working.We don't, in fact, handle tabs or special navigation in this modal view.
Approach
We wanted to implement the simplest approach possible that wouldn't interfere much with a convoluted UX or the Firefox code.
Problem: Handle target="_blank" links in profile modal.
Attempts:
Other
We also removed some callbacks we identified not working.
Before merging
Checklist