Adds navigation and styled wrapper for webview - Introduces Error handling start#30027
Adds navigation and styled wrapper for webview - Introduces Error handling start#30027cdanwards wants to merge 1 commit intoExpensify:nikki-saml-newdot-iosfrom
Conversation
|
Flow as it stands with these changes: I based the navigation off of this pattern where we're using the WebView for the WalletStatementPage: |
There was a problem hiding this comment.
Couple of minor comments but this looks great so far. Noticed some weird behavior (with and without calling Sessions.clearSignInData() when going back to the home page, definitely something to investigate further.
It might be nice to use the same interstitial loading view as we do for web/desktop. Right now that view lives in src/pages/signin/SAMLSignInPage/index.js but maybe we could separate it out into it's own component like the DeeplinkRedirectLoadingIndicator
| > | ||
| <HeaderWithBackButton | ||
| title="SAML Sign In" | ||
| onBackButtonPress={() => Navigation.navigate(ROUTES.HOME)} |
There was a problem hiding this comment.
I think here we'd want to call Session.clearSignInData(); here. Otherwise, if the user has SAML required on their account they'll be dropped right back into the same flow
| includeSafeAreaPaddingBottom={false} | ||
| > | ||
| <HeaderWithBackButton | ||
| title="SAML Sign In" |
There was a problem hiding this comment.
If we can leave this blank I think it'd be cleaner
| }; | ||
|
|
||
| const renderLoading = () => <FullScreenLoadingIndicator />; | ||
| // const renderLoading = () => <FullScreenLoadingIndicator />; |
There was a problem hiding this comment.
Let's remove this if it's unused with the new logic
NikkiWines
left a comment
There was a problem hiding this comment.
one other small thing noticed while testing
| /> | ||
| <ScreenWrapper | ||
| shouldShowOfflineIndicator={false} | ||
| includeSafeAreaPaddingBottom={false} |
There was a problem hiding this comment.
We'll need to add a component display name and then pass it here
| includeSafeAreaPaddingBottom={false} | |
| includeSafeAreaPaddingBottom={false} | |
| testID={SAMLSignInPage.displayName} |
| const shortLivedAuthToken = searchParams.get('shortLivedAuthToken'); | ||
| Session.signInWithShortLivedAuthToken(credentials.login, shortLivedAuthToken); | ||
| return; | ||
| Navigation.navigate(ROUTES.HOME); |
There was a problem hiding this comment.
I don't think we need the return; or Navigation.navigate(ROUTES.HOME) here actually. Session.signInWithShortLivedAuthToken should take care of any necessary redirects
|
Merged this logic into #29526 so we should be all set for this PR 👍 |

Details
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop