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 on #30438] [$500] Logging in with the workspace currency page shows "hmm its not found" #29646

Closed
3 of 6 tasks
m-natarajan opened this issue Oct 16, 2023 · 35 comments
Closed
3 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 16, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.3.84-1
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: @abzokhattab
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697311201107929

Action Performed:

  1. Go to settings > Workspaces
  2. Select a workspace from the list or create a new one
  3. Go Settings
  4. Click on default currency and copy the current url.
  5. Sign in again with the copied URL

Expected Result:

Not found page shouldn't display briefly.

Actual Result:

Not found page display briefly until the app loads

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

Android: Native
Android: mWeb Chrome
Screen.Recording.2023-10-16.at.2.35.49.AM.mov
iOS: Native
iOS: mWeb Safari
RPReplay_Final1697412172.MP4
MacOS: Chrome / Safari
Screen.Recording.2023-10-14.at.10.18.50.PM.mov
Recording.85.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a9f19acaa134409a
  • Upwork Job ID: 1713710726656147456
  • Last Price Increase: 2023-10-23
Issue OwnerCurrent Issue Owner: @mkhutornyi
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title Logging in with the workspace currency page shows "hmm its not found" [$500] Logging in with the workspace currency page shows "hmm its not found" Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

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

@m-natarajan
Copy link
Author

Proposal by @abzokhattab

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

Not found page display briefly when we access the WorkspaceSettingsCurrencyPage via deep link

What is the root cause of that problem?

The not found page is shown whenever the policy is empty

shouldShow={_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy) || PolicyUtils.isPendingDeletePolicy(policy)}

In our case When we access it via deep link, the report needs to load from openApp API. So the not found page displays briefly before the openApp API is complete

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

we should use the withPolicyAndFullscreenLoading instead of the withPolicy hoc, as it will show the loader indicator till the data is ready

withPolicyAndFullscreenLoading,

POC

Screen.Recording.2023-10-14.at.10.37.20.PM.mov

@yh-0218
Copy link
Contributor

yh-0218 commented Oct 16, 2023

Proposal

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

Logging in with the workspace currency page shows "hmm its not found"

What is the root cause of that problem?

shouldShow={_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy) || PolicyUtils.isPendingDeletePolicy(policy)}

We didn't check isLoadingReportData value.
So during loading data(isLoadingReportData = true), we will see Not Found

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

  1. Need to get isLoadingReportData value from withOnyx
isLoadingReportData: {
            key: ONYXKEYS.IS_LOADING_REPORT_DATA,
},

Add to here isLoadingReportData with currencyList

currencyList: {key: ONYXKEYS.CURRENCY_LIST},

2. set propTypes and defaultProps for isLoadingReportData

const defaultProps = {
    personalDetails: {},
    betas: [],
+   isLoadingReportData: true,
    ...policyDefaultProps,
};
const propTypes = {
...
 +  isLoadingReportData: PropTypes.bool,
    ...policyPropTypes,
};
  1. add isLoadingReportData as props value
function WorkspaceSettingsCurrencyPage({currencyList, policy, isLoadingReportData}) {
  1. add isLoadingReportData to show FullPageNotFoundView
shouldShow={((_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy)) && !isLoadingReportData) || PolicyUtils.isPendingDeletePolicy(policy)}

shouldShow={_.isEmpty(policy) || !PolicyUtils.isPolicyAdmin(policy) || PolicyUtils.isPendingDeletePolicy(policy)}

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@twisterdotcom
Copy link
Contributor

@situchan any thoughts on these?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

@twisterdotcom, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@situchan
Copy link
Contributor

reviewing today

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@situchan
Copy link
Contributor

"Not found" issue was fixed in #29842 but this page still has issue.
So it's not automatically scrolled and highlighted on selected currency.
@twisterdotcom can this be fixed here? I think no one will create separate bug report for this.

Screen.Recording.2023-10-24.at.5.57.43.PM.mov

@abzokhattab
Copy link
Contributor

abzokhattab commented Oct 24, 2023

Hey @situchan

the accepted proposal was updated to cover the currency page after this issue was open

image image

The referenced issue was related to the invite page, not the currency page

Please re-state the problem that we are trying to solve in this issue.
Accessing invite members link of a deleted workspace shows the invite page briefly before showing not found page

is that allowed?

@situchan
Copy link
Contributor

@abzokhattab any reason for not allowing that?

@abzokhattab
Copy link
Contributor

abzokhattab commented Oct 24, 2023

  • I mean the proposal was updated after the current issue was added. so the contributor was not aware of the currency page till my issue/proposal was added. you can notice the difference between the last edits is 3 weeks
  • and the mentioned problem/root cause is related to the invitation page Accessing invite members link of a deleted workspace shows the invite page briefly before showing not found page its not related to the currency page, they are two diff issues,

@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2023
@twisterdotcom
Copy link
Contributor

@situchan yes, I still think we can bend it and fix it here. @abzokhattab I don't think there was anything malicious in updating the solution to later include other pages this would resolve for. It's extra detail.

@melvin-bot melvin-bot bot removed the Overdue label Oct 26, 2023
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@abzokhattab
Copy link
Contributor

@twisterdotcom Okay, i just wanted to defend my point of view, but no problem :D lets move forward.

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@mkhutornyi
Copy link
Contributor

Proposal

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

Not scrolled and highlighted to selected currency when first open workspace currency page while currencyList is loading

What is the root cause of that problem?

initiallyFocusedOptionKey is undefined so focusedIndex is set to -1 first time.
After initiallyFocusedOptionKey value is set, there's no logic of updating focusedIndex to the correct value in BaseSelectionList.

Also, SectionList is rendered before loading data and scrollToFocusedIndexOnFirstRender is called on onLayout callback.
So even after updating focusedIndex, no way to call scroll function.

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

  • add useEffect to set focusedIndex when initiallyFocusedOptionKey is changed
useEffect(() => {
    if (firstLayoutRef.current) setFocusedIndex(...)
}, [initiallyFocusedOptionKey])
  • pass showLoadingPlaceholder={true} to SelectionList so that SectionList is rendered only after currencyList is loaded

What alternative solutions did you explore? (Optional)

Show skeleton instead of full screen loading even before loading report data.
For this, we can introduce new isLoading prop in BaseSelectionList similar to BaseOptionsList and pass it true when isLoadingReportData = true and policy is empty
And remove withPolicyAndFullscreenLoading HOC

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

@twisterdotcom @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

@twisterdotcom, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@situchan
Copy link
Contributor

@mkhutornyi's proposal looks good to me.
I think it's better to show skeleton before fetching report and it's consistent with Report screen.
🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

❌ There was an error making the offer to @situchan for the Reviewer role. The BZ member will need to manually hire the contributor.

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

❌ There was an error making the offer to @mkhutornyi for the Contributor role. The BZ member will need to manually hire the contributor.

@melvin-bot
Copy link

melvin-bot bot commented Oct 30, 2023

❌ There was an error making the offer to @abzokhattab for the Reporter role. The BZ member will need to manually hire the contributor.

@mkhutornyi
Copy link
Contributor

There's bug on latest main. I commented on offending PR - #30438 (comment).
I think we should hold until they fix that regression as it blocks testing our fix.

@twisterdotcom twisterdotcom changed the title [$500] Logging in with the workspace currency page shows "hmm its not found" [HOLD on #30438] [$500] Logging in with the workspace currency page shows "hmm its not found" Nov 1, 2023
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

@flodnv, @twisterdotcom, @mkhutornyi, @situchan Huh... This is 4 days overdue. Who can take care of this?

@situchan
Copy link
Contributor

situchan commented Nov 7, 2023

Still holding for #29080

@flodnv
Copy link
Contributor

flodnv commented Nov 7, 2023

Issue not reproducible during KI retests. (Second week)

I missed this... we can't repro this anymore?

@situchan
Copy link
Contributor

situchan commented Nov 7, 2023

@flodnv Here's context
And confirmation: #29646 (comment)

@twisterdotcom
Copy link
Contributor

Let's downgrade this given it's held.

@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Nov 7, 2023
@melvin-bot melvin-bot bot removed the Overdue label Nov 7, 2023
@flodnv
Copy link
Contributor

flodnv commented Nov 22, 2023

Please reopen if it's still reproducible.

@flodnv flodnv closed this as completed Nov 22, 2023
@mkhutornyi
Copy link
Contributor

mkhutornyi commented Nov 24, 2023

Can this be reopened similar to #23658 (comment)?
This bug is still reproducible but we're just waiting for #29080 to fix regression.

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants