Skip to content

[Due for payment 2025-04-14] [$250] iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom #58931

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

Closed
6 of 8 tasks
mitarachim opened this issue Mar 22, 2025 · 31 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@mitarachim
Copy link

mitarachim commented Mar 22, 2025

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.1.17-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Rules feature is enabled.
  1. Launch ND or hybrid app.
  2. Go to workspace settings > Rules.
  3. Go to Prohibited expenses.
  4. Go offline.

Expected Result:

Offline indicator will be at the page bottom.

Actual Result:

Offline indicator is below the content.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6778631_1742599253368.ScreenRecording_03-22-2025_07-16-58_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021904049457294436538
  • Upwork Job ID: 1904049457294436538
  • Last Price Increase: 2025-03-24
  • Automatic offers:
    • linhvovan29546 | Contributor | 106747818
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @stephanieelliott
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Mar 22, 2025
Copy link

melvin-bot bot commented Mar 22, 2025

Triggered auto assignment to @stephanieelliott (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 Mar 22, 2025

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

Copy link

melvin-bot bot commented Mar 22, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 22, 2025
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.

@daledah
Copy link
Contributor

daledah commented Mar 22, 2025

Proposal

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

Offline indicator is below the content.

What is the root cause of that problem?

We don't style RulesProhibitedDefaultPage component correctly

<Text style={[styles.flexRow, styles.alignItemsCenter, styles.mt3, styles.mh5, styles.mb5]}>
<Text style={[styles.textNormal, styles.colorMuted]}>{translate('workspace.rules.individualExpenseRules.prohibitedDefaultDescription')}</Text>
</Text>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.mt3, styles.mh5, styles.mb5]}>
<Text>{translate('workspace.rules.individualExpenseRules.adultEntertainment')}</Text>
<Switch
isOn={policy?.prohibitedExpenses?.adultEntertainment ?? false}
accessibilityLabel={translate('workspace.rules.individualExpenseRules.adultEntertainment')}
onToggle={() => {
const prohibitedExpenses: ProhibitedExpenses = {
...policy?.prohibitedExpenses,
adultEntertainment: !policy?.prohibitedExpenses?.adultEntertainment,
};
setPolicyProhibitedExpenses(policyID, prohibitedExpenses);
}}
/>
</View>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.mt3, styles.mh5, styles.mb5]}>
<Text>{translate('workspace.rules.individualExpenseRules.alcohol')}</Text>
<Switch
isOn={policy?.prohibitedExpenses?.alcohol ?? false}
accessibilityLabel={translate('workspace.rules.individualExpenseRules.alcohol')}
onToggle={() => {
const prohibitedExpenses: ProhibitedExpenses = {
...policy?.prohibitedExpenses,
alcohol: !policy?.prohibitedExpenses?.alcohol,
};
setPolicyProhibitedExpenses(policyID, prohibitedExpenses);
}}
/>
</View>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.mt3, styles.mh5, styles.mb5]}>
<Text>{translate('workspace.rules.individualExpenseRules.gambling')}</Text>
<Switch
isOn={policy?.prohibitedExpenses?.gambling ?? false}
accessibilityLabel={translate('workspace.rules.individualExpenseRules.gambling')}
onToggle={() => {
const prohibitedExpenses: ProhibitedExpenses = {
...policy?.prohibitedExpenses,
gambling: !policy?.prohibitedExpenses?.gambling,
};
setPolicyProhibitedExpenses(policyID, prohibitedExpenses);
}}
/>
</View>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.mt3, styles.mh5, styles.mb5]}>
<Text>{translate('workspace.rules.individualExpenseRules.hotelIncidentals')}</Text>
<Switch
isOn={policy?.prohibitedExpenses?.hotelIncidentals ?? false}
accessibilityLabel={translate('workspace.rules.individualExpenseRules.hotelIncidentals')}
onToggle={() => {
const prohibitedExpenses: ProhibitedExpenses = {
...policy?.prohibitedExpenses,
hotelIncidentals: !policy?.prohibitedExpenses?.hotelIncidentals,
};
setPolicyProhibitedExpenses(policyID, prohibitedExpenses);
}}
/>
</View>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.justifyContentBetween, styles.mt3, styles.mh5, styles.mb5]}>
<Text>{translate('workspace.rules.individualExpenseRules.tobacco')}</Text>
<Switch
isOn={policy?.prohibitedExpenses?.tobacco ?? false}
accessibilityLabel={translate('workspace.rules.individualExpenseRules.tobacco')}
onToggle={() => {
const prohibitedExpenses: ProhibitedExpenses = {
...policy?.prohibitedExpenses,
tobacco: !policy?.prohibitedExpenses?.tobacco,
};
setPolicyProhibitedExpenses(policyID, prohibitedExpenses);
}}
/>
</View>

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

We should wrap this component in a View with style.flex1 like we did

Image

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@layacat
Copy link
Contributor

layacat commented Mar 22, 2025

Regression from #56550

@robertjchen robertjchen added External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Mar 24, 2025
@melvin-bot melvin-bot bot added the Overdue label Mar 24, 2025
@melvin-bot melvin-bot bot changed the title iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom [$250] iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom Mar 24, 2025
Copy link

melvin-bot bot commented Mar 24, 2025

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

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

melvin-bot bot commented Mar 24, 2025

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

@robertjchen robertjchen added Daily KSv2 and removed Hourly KSv2 labels Mar 24, 2025
@melvin-bot melvin-bot bot removed the Overdue label Mar 24, 2025
@linhvovan29546
Copy link
Contributor

Proposal

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

iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom

What is the root cause of that problem?

This issue is a regression from #56550. We introduced a new page (Prohibited Expenses) but missed testing it in offline mode.

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

We should replace includeSafeAreaPaddingBottom={false} with enableEdgeToEdgeBottomSafeAreaPadding.

<ScreenWrapper
includeSafeAreaPaddingBottom={false}

            <ScreenWrapper
                enableEdgeToEdgeBottomSafeAreaPadding
                shouldEnableMaxHeight
                testID={RulesProhibitedDefaultPage.displayName}
            >

Then, optionally, we can wrap the content inside a ScrollView and apply addBottomSafeAreaPadding to maintain edge-to-edge behavior:

<Text style={[styles.flexRow, styles.alignItemsCenter, styles.mt3, styles.mh5, styles.mb5]}>

   <ScrollView addBottomSafeAreaPadding>
                <Text style={[styles.flexRow, styles.alignItemsCenter, styles.mt3, styles.mh5, styles.mb5]}>
                    <Text style={[styles.textNormal, styles.colorMuted]}>{translate('workspace.rules.individualExpenseRules.prohibitedDefaultDescription')}</Text>
                </Text>
...Other content
</ScrollView>

Note

The reason I suggest this solution is that we have started implementing edge-to-edge bottom

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

No, UI bug

What alternative solutions did you explore? (Optional)

N/A

@stephanieelliott
Copy link
Contributor

Hey @getusha we have a couple proposals here, can you please review?

Copy link

melvin-bot bot commented Mar 31, 2025

@robertjchen, @stephanieelliott, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!

@getusha
Copy link
Contributor

getusha commented Mar 31, 2025

Waiting for assignment.

@melvin-bot melvin-bot bot removed the Overdue label Mar 31, 2025
@stephanieelliott
Copy link
Contributor

Hey @robertjchen can you check out the proposal here?

@robertjchen
Copy link
Contributor

Perfect, thanks for the update! We'll go with @linhvovan29546

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 1, 2025
Copy link

melvin-bot bot commented Apr 1, 2025

📣 @linhvovan29546 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 2, 2025
@linhvovan29546
Copy link
Contributor

The PR is ready for review!
cc @getusha

@stephanieelliott
Copy link
Contributor

PR hit staging earlier today

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 7, 2025
@melvin-bot melvin-bot bot changed the title [$250] iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom [Due for payment 2025-04-14] [$250] iOS - Rules - Prohibited expenses - Offline indicator is not at the page bottom Apr 7, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 7, 2025
Copy link

melvin-bot bot commented Apr 7, 2025

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

Copy link

melvin-bot bot commented Apr 7, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.23-7 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 2025-04-14. 🎊

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

Copy link

melvin-bot bot commented Apr 7, 2025

@getusha @stephanieelliott @getusha The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Apr 14, 2025
Copy link

melvin-bot bot commented Apr 17, 2025

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

@stephanieelliott
Copy link
Contributor

Summarizing payment on this issue:

Upwork job is here: https://www.upwork.com/jobs/~021904049457294436538

@garrettmknight
Copy link
Contributor

$250 approved for @getusha

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

No branches or pull requests

8 participants