-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable back button if going from dapp to home & redirection problems #1472
Enable back button if going from dapp to home & redirection problems #1472
Conversation
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.
Left one question about a case we might want to handle. But overall, these change look correct to me.
if(this.isHomepage() && lastUrlBeforeHome){ | ||
this.go(lastUrlBeforeHome); | ||
}else{ | ||
current && current.goBack(); |
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.
If this.isHomepage()
is true and lastUrlBeforeHome
is false, is it possible that current.goBack()
could be called when there is nowhere to go back to? I am thinking of when this.handleAndroidBackPress
is called.
Positive test cases (happy flow) looks good Just a few issues I saw when comparing to what's on playstore and testflight (version 0.2.14 389) Issue 1: When on homepage, then navigating to a dapp via "Featured Projects", searching via search engine (duck duck go or google), or navigating directly to a URL, then pressing back button, the forward button does not appear as an option. FYI Screen casts have the emulator with this branch on left, and real device with playstore on the right... Via Featured Projects seen here = https://recordit.co/yZF2jPKcit Steps to reproduce:
Via search engine seen here = https://recordit.co/2JtrEla5yL Steps to reproduce:
Issue 2: When first arriving on homepage, or opening a new tab, and tapping the home button, the back arrow is enabled, and then tapping it shows the forward arrow, which keeps you on the homepage when tapping either. Seen here = https://recordit.co/Flfx2NThCf steps to reproduce:
|
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.
Fixes look good on both OS's, QA Passed 👍
…1472) * Enable back button if going from dapp to home & redirection problems * fix for android * prevent going back when it's not possible * Fix can go back function and go forward
Description
This enables going back to the last url after you pressed home as mentioned in #1408. Also fixes a redirection problem, that happened sometimes when going to a dapp from home as mentioned on: #1408 comment.
(Note: While trying to fix this, there were other small issues found with the navigation that are not addressed on the issue #1408 so we should test the browser navigation a bit more and maybe create another issue for refactoring it.)
Issue
Resolves #1408