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 for payment 2024-07-24] [$250] Header is not displayed after reloading page on waypoint screen #44165

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 21, 2024 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 21, 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.0-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @ZhenjaHorbach
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1718901200855539

Action Performed:

  1. Open App
  2. Tap the FAB -> Submit expense -> Distance
  3. Open any waypoint
  4. Reload the page
  5. Press go back

Expected Result:

Header shouldn't disappear

Actual Result:

after reloading and pressing go back button, the header is not displayed

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

2024-06-20.18.31.35.mov
GBSA4059.1.MP4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e7345d06d12d9654
  • Upwork Job ID: 1805372602824719078
  • Last Price Increase: 2024-06-24
Issue OwnerCurrent Issue Owner: @strepanier03
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

Triggered auto assignment to @strepanier03 (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.

@ZhenjaHorbach
Copy link
Contributor

I reported this issue
If necessary, I can help in reviewing proposals

@bernhardoj
Copy link
Contributor

bernhardoj commented Jun 21, 2024

Proposal

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

The page header isn't displayed when reloading waypoint screen and go back.

What is the root cause of that problem?

In waypoint screen, going back will call go back with a fallback to the distance request screen.

onBackButtonPress={() => {
Navigation.goBack(ROUTES.MONEY_REQUEST_STEP_DISTANCE.getRoute(action, iouType, transactionID, reportID));
}}

The MONEY_REQUEST_STEP_DISTANCE route will navigate user to the IOURequestStepDistance. The header doesn't show because isCreatingNewRequest is true.

shouldShowWrapper={!isCreatingNewRequest}

But this isn't the problem for the start page. The problem is, the user should be navigated to the IOURequestStartPage where there will be 3 tab, Manual, Scan, and Distance and the route for the Distance tab is MONEY_REQUEST_CREATE_TAB_DISTANCE, so the route being used here for create case is wrong.

The missing header also happens when we open the waypoint page from the confirmation screen, refresh, and go back, because the backTo param is missing from the distance page.

const isCreatingNewRequest = !(backTo || isEditing);

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

We can use the same back login when selecting a waypoint (selectWaypoint) by using the backTo param and fallback to the distance tab.

if (backTo) {
Navigation.goBack(backTo);
return;
}
Navigation.goBack(ROUTES.MONEY_REQUEST_CREATE_TAB_DISTANCE.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID));

We can create a new function for go back so it's reusable.

For the second issue, we need to use getActiveRoute instead of getActiveRouteWithoutParams

ROUTES.MONEY_REQUEST_STEP_WAYPOINT.getRoute(action, CONST.IOU.TYPE.SUBMIT, transactionID, report?.reportID, index.toString(), Navigation.getActiveRouteWithoutParams()),

This way, the backTo params of the waypoints page is the distance page with the backTo params.
waypoint route: encode(waypoint?backTo=distance?backTo=confirmation)

@melvin-bot melvin-bot bot added the Overdue label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@strepanier03
Copy link
Contributor

Confirmed reproducible using browserstack.

image

@melvin-bot melvin-bot bot removed the Overdue label Jun 24, 2024
@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Jun 24, 2024
@melvin-bot melvin-bot bot changed the title Header is not displayed after reloading page on waypoint screen [$250] Header is not displayed after reloading page on waypoint screen Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 24, 2024
Copy link

melvin-bot bot commented Jun 24, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

@ZhenjaHorbach
Copy link
Contributor

@strepanier03, can I be C+ here since I reported this issue and already have context ?

@mananjadhav
Copy link
Collaborator

@bernhardoj Your proposal looks promising can you explain what do we mean by passing two backTo params? encode(waypoint?backTo=distance?backTo=confirmation)

@bernhardoj
Copy link
Contributor

So, when we open the distance page from the confirmation page, the distance page route will have a backTo param
/create/submit/distance/1/1579314117131792?backTo={confirmationPage}

Then, when we open the waypoint page, the backTo is currently /create/submit/distance/1/1579314117131792.
/create/submit/waypoint/1/1579314117131792/0?backTo=%2Fcreate%2Fsubmit%2Fdistance%2F1%2F1579314117131792

The backTo of backTo={confirmationPage} is lost. So, when we go back from the waypoint page, we arrive at the distance page without the backTo param.
/create/submit/distance/1/1579314117131792

So, we need to keep the backTo by using getActiveRoute.

/create/submit/waypoint/1/1579314117131792/0?backTo=${encode(/create/submit/distance/1/1579314117131792?backTo={confirmationPage})}`

@strepanier03
Copy link
Contributor

@ZhenjaHorbach - The C+ assigned is already actively working on this so I think we should let the assignment trump here.

@ZhenjaHorbach
Copy link
Contributor

@ZhenjaHorbach - The C+ assigned is already actively working on this so I think we should let the assignment trump here.

I agree 😀
Since proposals are already being discussed
Let's leave it as it is

@strepanier03
Copy link
Contributor

Thank you @ZhenjaHorbach - I appreciate the understanding. In most cases we should allow the label to assign so that C+ are given as equal access to jobs as possible. In special cases we will do a manual assignment but that's generally discussed in Slack beforehand and the assignment happens before any automated assignment kicks in.

@melvin-bot melvin-bot bot added the Overdue label Jun 27, 2024
@mananjadhav
Copy link
Collaborator

mananjadhav commented Jun 27, 2024

Thanks for clarification @strepanier03.

Thanks for posting the explanation @bernhardoj. Your proposal looks good to me.

🎀 👀 🎀 C+ reviewed.

@melvin-bot melvin-bot bot removed the Overdue label Jun 27, 2024
Copy link

melvin-bot bot commented Jun 27, 2024

Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Copy link

melvin-bot bot commented Jul 1, 2024

@mananjadhav, @strepanier03, @grgia 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 Jul 1, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 4, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @mananjadhav

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] Header is not displayed after reloading page on waypoint screen [HOLD for payment 2024-07-24] [$250] Header is not displayed after reloading page on waypoint screen Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-07-24. 🎊

For reference, here are some details about the assignees on this issue:

  • @mananjadhav requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Jul 17, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 23, 2024
@strepanier03
Copy link
Contributor

Payment hold expires tomorrow, will revisit then.

@melvin-bot melvin-bot bot removed the Overdue label Jul 24, 2024
@strepanier03
Copy link
Contributor

@mananjadhav - Feel free to do the checklist tomorrow and I'll post the full payment summary. @ZhenjaHorbach - I sent you an offer via Upwork as well.

@CH-RAFAY
Copy link

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.0-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @ZhenjaHorbach Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1718901200855539

Action Performed:

  1. Open App
  2. Tap the FAB -> Submit expense -> Distance
  3. Open any waypoint
  4. Reload the page
  5. Press go back

Expected Result:

Header shouldn't disappear

Actual Result:

after reloading and pressing go back button, the header is not displayed

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

2024-06-20.18.31.35.mov
GBSA4059.1.MP4
View all open jobs on GitHub

Upwork Automation - Do Not Edit
Issue Owner

Dear Expensify Team,

I am Abdul Rafay Chaudhry, an expert in web and mobile development with extensive experience in React Native. I have successfully executed complex projects requiring both frontend and backend development, ensuring high reliability and security standards.

Possible Issues

  1. Compatibility Issues
  2. Performance Optimization
  3. Security Vulnerabilities
  4. State Management Challenges
  5. UI/UX Consistency
  6. Third-Party Library Integration
  7. Testing and Quality Assurance

Example Code Implementation

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';

const ExpenseItem = ({ expense }) => {
    return (
        <View style={styles.expenseItem}>
            <Text style={styles.title}>{expense.title}</Text>
            <Text style={styles.amount}>{expense.amount}</Text>
            <Text style={styles.date}>{expense.date}</Text>
        </View>
    );
};

const styles = StyleSheet.create({
    expenseItem: {
        padding: 10,
        borderBottomWidth: 1,
        borderBottomColor: '#ccc'
    },
    title: {
        fontSize: 18,
        fontWeight: 'bold'
    },
    amount: {
        fontSize: 16,
        color: 'green'
    },
    date: {
        fontSize: 14,
        color: '#888'
    }
});

export default ExpenseItem;

Copy link

melvin-bot bot commented Jul 24, 2024

📣 @CH-RAFAY! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@ZhenjaHorbach
Copy link
Contributor

@mananjadhav - Feel free to do the checklist tomorrow and I'll post the full payment summary. @ZhenjaHorbach - I sent you an offer via Upwork as well.

I think Melvin made a little mistake 😅
I don't have to pay

@bernhardoj
Copy link
Contributor

Requested in ND.

@strepanier03
Copy link
Contributor

@ZhenjaHorbach - Okay, thank you for the heads up. Melvin has been a bit off their game lately 🤔 it feels like.

I'll cancel that in Upwork right away.

@strepanier03
Copy link
Contributor

Payment Summary

@JmillsExpensify - Requests incoming.

@mananjadhav
Copy link
Collaborator

Requested on ND.

Copy link

melvin-bot bot commented Jul 24, 2024

Payment Summary

Upwork Job

BugZero Checklist (@JmillsExpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1805372602824719078/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@JmillsExpensify
Copy link

$250 approved for @mananjadhav

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

8 participants