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-06-13] [$250] Workflows - Offline indicator is present below the last option instead of page bottom #41326

Closed
4 of 6 tasks
m-natarajan opened this issue Apr 30, 2024 · 26 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 Apr 30, 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: 1.4.68-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: Applause Internal Team
Slack conversation:

Action Performed:

  1. Launch New Expensify app.
  2. Go offline.
  3. Go to Account settings > Workspaces > any workspace.
  4. Go to Workflows.
  5. Tap Submission frequency.

Expected Result:

Offline indicator will be present in the bottom of the page.

Actual Result:

Offline indicator is present below the last option.

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

Add any screenshot/video evidence

Bug6466547_1714481116830.RPReplay_Final1714480895.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b48de547df48461b
  • Upwork Job ID: 1787886904799145984
  • Last Price Increase: 2024-05-07
  • Automatic offers:
    • hoangzinh | Reviewer | 0
    • Krishna2323 | Contributor | 0
Issue OwnerCurrent Issue Owner: @puneetlath / @muttmuure
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 30, 2024
Copy link

melvin-bot bot commented Apr 30, 2024

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

@m-natarajan
Copy link
Author

@muttmuure FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@neonbhai
Copy link
Contributor

neonbhai commented Apr 30, 2024

Proposal

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

Offline indicator is present below the last option instead of page bottom

What is the root cause of that problem?

We don't use the full height of the page in WorkspaceAutoReportingFrequencyPage

We are also missing the ability to scroll the page:

Screen.Recording.2024-04-30.at.7.16.58.PM.mov

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

We will wrap the contents of the page with ScrollView passing the style flexGrow1 to fix both the issues

<ScrollView
    style={styles.pt0}
    contentContainerStyle={[styles.flexGrow1]}
>
    ...
</ScrollView>

Result

This works perfectly:

Screen.Recording.2024-04-30.at.7.16.07.PM.mov

The offline indicator is shown at the bottom and the page is now scrollable.

@allgandalf
Copy link
Contributor

allgandalf commented Apr 30, 2024

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={WorkspaceAutoReportingFrequencyPage.displayName}
>

Proposal

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

Offline indicator is not shown on the bottom of the page

What is the root cause of that problem?

We do not pass the property offlineIndicatorStyle to the ScreenWrapper, hence it takes default value and shows the indicator right after the list ends.

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={WorkspaceAutoReportingFrequencyPage.displayName}
>

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

We need to pass offlineIndicatorStyle={styles.mtAuto} to the Screenwrapper, similar approach was used in this PR as well.

Result

mweb iOS Screenshot 2024-04-30 at 7 40 17 PM

@Krishna2323
Copy link
Contributor

Krishna2323 commented Apr 30, 2024

Proposal

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

Workflows - Offline indicator is present below the last option instead of page bottom

What is the root cause of that problem?

There are several issue on the WorkspaceAutoReportingFrequencyPage which should be solved.

  1. The offline indicator position
  2. Selected option is not focused initially
  3. Keyboard navigation isn't working like other pages, e.g. Language settings page, Theme selection page

The cause of this is using FlatList instead of SelectionList. Because we need to add a sibling component besides the RadioListItem we are using FlatList.

const renderItem = ({item}: {item: WorkspaceAutoReportingFrequencyPageItem}) => (
<>
<RadioListItem
item={item}
onSelectRow={() => onSelectAutoReportingFrequency(item)}
showTooltip={false}
/>
{isMonthlyFrequency && item.keyForList === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.MONTHLY ? monthlyFrequencyDetails() : null}
</>
);

<FlatList
data={autoReportingFrequencyItems}
renderItem={renderItem}
keyExtractor={(item: WorkspaceAutoReportingFrequencyPageItem) => item.text}
/>

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

If we want to solve the offline indicator issue then we can style={styles.flex1} & contentContainerStyle={styles.flex1} to OfflineWithFeedback which wraps the FlatList. Also, we can pass isFocused={item.isSelected} to RadioListItem . This will make the selected option focused.

What alternative solutions did you explore? (Optional)

If we want to solve all the issues which, we can accept a new prop in ListItem type called itemBottom and then inside BaseSelectionList, when rendering item we will render the {item.itemBottom && item.itemBottom} besides ListItem. After that we can use SelectionList instead of FlatList inside WorkspaceAutoReportingFrequencyPage. And in autoReportingFrequencyItems data we will add itemBottom. We will also pass initiallyFocusedOptionKey={policy?.autoReportingFrequency} to SelectionList.

PS: minor changes can be made during the PR phase.

Result main solution

main_offline_indicator_submission_frequency.mp4

Result alternative solution

offline_indicator_submission_frequency.mp4

@Krishna2323
Copy link
Contributor

Proposal Updated

  • Minor edit in main solution
  • Result videos added

@melvin-bot melvin-bot bot added the Overdue label May 2, 2024
Copy link

melvin-bot bot commented May 3, 2024

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

@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@melvin-bot melvin-bot bot changed the title Workflows - Offline indicator is present below the last option instead of page bottom [$250] Workflows - Offline indicator is present below the last option instead of page bottom May 7, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label May 7, 2024
@muttmuure
Copy link
Contributor

@hoangzinh there are some proposals to take a look at

@hoangzinh
Copy link
Contributor

@neonbhai, @GandalfGwaihir, @Krishna2323 Thanks for proposal, everyone.

@Krishna2323 proposal looks good to me. I think we should use SelectionList to fix all issues in that page.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented May 9, 2024

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

@allgandalf
Copy link
Contributor

I think we should use SelectionList to fix all issues in that page.

Just for my info is it always the case that,

okay this is the issue, give solution to it, and then find some more bugs related to the same component and fix those too and your proposal will get priority ? @hoangzinh @stitesExpensify ? 🤔

P.S.: Just to be clear no conflict with the chosen proposal, question Is just for my info !

@hoangzinh
Copy link
Contributor

Not really @GandalfGwaihir. When we select a solution, it is based on multiple factors, also based on each reviewer. For your case, it's because your RCA is not convincing me if we're solving the root cause or just a workaround solution. The question for your RCA is why on other pages, we don't pass offlineIndicatorStyle={styles.mtAuto} to the Screenwrapper but it still works?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented May 9, 2024

📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@stitesExpensify
Copy link
Contributor

Assigned Krishna, I'm going to unassign myself because I am about to go OOO for 2 weeks. @muttmuure can find a replacement by removing and re-adding external

@Krishna2323
Copy link
Contributor

@hoangzinh, PR ready for review.

Copy link

melvin-bot bot commented May 24, 2024

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

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$250] Workflows - Offline indicator is present below the last option instead of page bottom [HOLD for payment 2024-06-13] [$250] Workflows - Offline indicator is present below the last option instead of page bottom Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 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 Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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-06-13. 🎊

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

Copy link

melvin-bot bot commented Jun 6, 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:

  • [@hoangzinh] The PR that introduced the bug has been identified. Link to the PR:
  • [@hoangzinh] 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:
  • [@hoangzinh] 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:
  • [@hoangzinh] Determine if we should create a regression test for this bug.
  • [@hoangzinh] 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.
  • [@muttmuure] 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 Jun 12, 2024
@Krishna2323
Copy link
Contributor

@puneetlath, bump for payments process.

@hoangzinh
Copy link
Contributor

BugZero Checklist:

@melvin-bot melvin-bot bot added the Overdue label Jun 19, 2024
@puneetlath
Copy link
Contributor

@muttmuure is the BZ here. He'll handle payment.

@melvin-bot melvin-bot bot removed the Overdue label Jun 20, 2024
@muttmuure
Copy link
Contributor

Paid

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
None yet
Development

No branches or pull requests

8 participants