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

[HOLD][$250] Xero - Strange animation after dismissing 2FA setup RHP and not here page on LHN #45572

Open
2 of 6 tasks
izarutskaya opened this issue Jul 17, 2024 · 73 comments
Open
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Jul 17, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.8-1
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : #44059
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User has a workspace.
  • The workspace is connected to Xero.
  • User has not set up 2FA.
  1. Go to staging.new.expensify.com
  2. Log out if logged in.
  3. Log in to the account from precondition.
  4. Click Enable two-factor authentication.
  5. Click the back button on 2FA set up RHP.
  6. Navigate between Account settings, Search and Inbox.

Expected Result:

App should throw 2FA set up modal again if user exits 2FA set up flow.

Actual Result:

In Step 5, when clicking on back button on 2FA setup RHP, the RHP dismissal has a weird animation.
In Step 6, after switching between sections, not here page shows up on the left hand panel.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6544785_1721201414390.20240717_152508.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e2d69ad81006978f
  • Upwork Job ID: 1813578824903964216
  • Last Price Increase: 2024-09-04
Issue OwnerCurrent Issue Owner: @ahmedGaber93
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Triggered auto assignment to @VictoriaExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Jul 17, 2024

Triggered auto assignment to @MonilBhavsar (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 17, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@MonilBhavsar MonilBhavsar removed the DeployBlocker Indicates it should block deploying the API label Jul 17, 2024
@MonilBhavsar
Copy link
Contributor

Commented on the offending PR #44059

@rushatgabhane
Copy link
Member

The issue is present after reverting this PR too. its unrelated to the PR and related to navigation

@MonilBhavsar
Copy link
Contributor

Ok thanks for checking!

@MonilBhavsar
Copy link
Contributor

The issue is present after reverting this PR too.

@rushatgabhane if we revert this PR, then the 2FA modal doesn't show up and looks like issue is not reproducible?

@rushatgabhane
Copy link
Member

rushatgabhane commented Jul 17, 2024

@MonilBhavsar let me rephrase what i mean - this same issue is present on production also. The PR above did not make any changes to how back navigation was handled

  1. Go to production - https://new.expensify.com/settings/security/two-factor-auth?backTo=home
  2. Click back
Screen.Recording.2024-07-17.at.17.12.45.mov

@MonilBhavsar
Copy link
Contributor

Ok thanks for clarifying. Makes sense

@MonilBhavsar MonilBhavsar added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title Xero - Strange animation after dismissing 2FA setup RHP and not here page on LHN [$250] Xero - Strange animation after dismissing 2FA setup RHP and not here page on LHN Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01e2d69ad81006978f

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 17, 2024
@melvin-bot melvin-bot bot removed the Overdue label Sep 27, 2024
@VictoriaExpensify
Copy link
Contributor

As above. Making this a monthly as that's what the related issue is

@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 29, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Xero - Strange animation after dismissing 2FA setup RHP and not here page on LHN

What is the root cause of that problem?

First let split this problem into 2 issues.

  • Why the sidebar had strange animation moving from right to left
  • Why only sidebar is displaying and where is the main chat?
  1. When we have a backTo param inside our url which is HOME, currently we're showing Sidebar component for HOME page inside BottomTabNavigator.tsx file

    <Tab.Screen
    name={SCREENS.HOME}
    component={SidebarScreen}
    />

    But why we see a strange animation for Home sidebar since we disabled it here:
    const screenOptions: StackNavigationOptions = {
    headerShown: false,
    animationEnabled: false,
    };

    Because we invoked the BottomTabNavigator inside AuthScreens and enabled the animation here
    const screenOptions = getRootNavigatorScreenOptions(shouldUseNarrowLayout, styles, StyleUtils);

    <RootStack.Screen
    name={NAVIGATORS.BOTTOM_TAB_NAVIGATOR}
    options={screenOptions.bottomTab}
    component={BottomTabNavigator}
    />

    bottomTab: {
    ...commonScreenOptions,
    cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator(isSmallScreenWidth, false, false, props),

    We can see here that the animation is enabled, I've tried disabling the animation and it solved the first issue (sidebar strange animation)
    const commonScreenOptions: StackNavigationOptions = {
    headerShown: false,
    gestureDirection: 'horizontal',
    animationEnabled: true,
    cardOverlayEnabled: true,
    animationTypeForReplace: 'push',
    };

  2. Why the main chat is not displaying?, because we use getMatchingCentralPaneRouteForState function to display the central pane route for bottom tab navigator i.e for HOME page we will display Report chat.

And for navigation i think we use linkTo function and we invoke the getMatchingCentralPaneRouteForState inside the linkTo function if it does not match these 3 conditions

if (isCentralPaneName(action.payload.name) && (isTargetScreenDifferentThanCurrent || areParamsDifferent)) {

} else if (type === CONST.NAVIGATION.TYPE.UP) {

} else if ((action.payload.name === NAVIGATORS.FULL_SCREEN_NAVIGATOR || isSideModalNavigator(action.payload.name)) && !isTargetNavigatorOnTop) {

If the above 3 conditions are false we will invoke the getMatchingCentralPaneRouteForState inside this condition
} else if (action.payload.name === NAVIGATORS.BOTTOM_TAB_NAVIGATOR) {

But when pressing the go back button we use the goBack function which uses the CONST.NAVIGATION.TYPE.UP type which leads this condition to true

} else if (type === CONST.NAVIGATION.TYPE.UP) {

navigate(fallbackRoute, CONST.NAVIGATION.TYPE.UP);
and here
function quitAndNavigateBack(backTo?: Route) {
clearTwoFactorAuthData();
Navigation.goBack(backTo);
}

and will not invoke the getMatchingCentralPaneRouteForState function

What changes do you think we should make in order to solve the problem?

Instead of using goBack function we can use navigate here
Navigation.navigate(backTo)

function quitAndNavigateBack(backTo?: Route) {
clearTwoFactorAuthData();
Navigation.goBack(backTo);
}

Result

Screen.Recording.2024-09-29.at.07.28.56.mov

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Monthly KSv2 labels Sep 29, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 2, 2024

@ahmedGaber93 Can you please kindly have a look at my proposal

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2024
@ahmedGaber93
Copy link
Contributor

@NJ-2020 use navigate instead of goBack is already proposed by adamgrzybowski here #45572 (comment) as a workaround, but we decide to wait for fixing goBack #45572 (comment).

Copy link

melvin-bot bot commented Oct 7, 2024

@MonilBhavsar, @ahmedGaber93, @VictoriaExpensify Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Oct 7, 2024
@ahmedGaber93
Copy link
Contributor

@VictoriaExpensify I think we need to add monthly label because we hold it for monthly issue #47534

@melvin-bot melvin-bot bot removed the Overdue label Oct 7, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

@MonilBhavsar, @ahmedGaber93, @VictoriaExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 11, 2024
@ahmedGaber93
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Oct 11, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

@MonilBhavsar, @ahmedGaber93, @VictoriaExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Oct 15, 2024
@ahmedGaber93
Copy link
Contributor

@melvin-bot melvin-bot bot removed the Overdue label Oct 15, 2024
@MonilBhavsar MonilBhavsar added Monthly KSv2 and removed Daily KSv2 labels Oct 16, 2024
@MonilBhavsar
Copy link
Contributor

Adjusted label, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
Development

No branches or pull requests

9 participants