-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add supportal navigation #35410
Add supportal navigation #35410
Conversation
480a17e
to
0b896fd
Compare
That lint error was not introduced in this PR |
@ishpaul777 @ One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
This PR can only be tested internally |
const isSupportalTransition = currentUrl.includes('authTokenType=support'); | ||
if (isLoggingInAsNewUser && isTransitioning) { | ||
Session.signOutAndRedirectToSignIn(); | ||
Session.signOutAndRedirectToSignIn(false, isSupportalTransition); |
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.
I thought it was strange we had to add this here, but while testing, around 30% of the times we called signOutAndRedirectToSignIn
from here instead of LogoutPreviousUserPage
Ok @roryabraham I think this is finally ready. Can you please also test it with the instructions on https://github.com/Expensify/Web-Expensify/pull/40720 to be sure I'm not missing something on my own tests? |
src/libs/actions/Session/index.ts
Outdated
let preferredLocale: ValueOf<typeof CONST.LOCALES> | null = null; | ||
Onyx.connect({ | ||
key: ONYXKEYS.NVP_PREFERRED_LOCALE, | ||
callback: (val) => (preferredLocale = val), | ||
}); | ||
|
||
function isSupportalToken(): boolean { |
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.
this seems like it's effectively the same as NetworkStore.isSupportAuthToken
. Can we DRY this up?
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.
hm, there was a reason why this was added in both places when we first implemented this. I think it was something related to cyclical imports and that the middleware couldn't use the place where we kept isSupportAuthToken before. But it's been a while since the first version, so I don't remember why anymore, and looks like I can use the Session. isSupportAuthToken everywhere.
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.
Nope, it actually fails to execute if I try to use Session.isSupportAuthToken
here.
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.
kk, no more blockers and this is testing well for me
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb.movweb.movMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.4.48-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.48-0 🚀
|
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/363810
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop