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

[$125] Report Fields - Report field list is not grayed out when toggled on or off offline #56172

Open
3 of 8 tasks
IuliiaHerets opened this issue Jan 31, 2025 · 13 comments
Open
3 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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 Overdue

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Jan 31, 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: v9.0.93-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 14.5/ Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Workspace settings > Report fields (enable from More features)
  3. Create a report field with the type List > navigate to the List page.
  4. Go Offline
  5. Toggled on or off.

Expected Result:

List is grayed out when editing the status offline. Same in other place like categories and tags

Actual Result:

List is not grayed out when Toggled on or off the status offline.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6729647_1738338476472.Screen_Recording_2025-01-31_at_6.32.46_in_the_evening.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021886363521787391290
  • Upwork Job ID: 1886363521787391290
  • Last Price Increase: 2025-02-10
Issue OwnerCurrent Issue Owner: @getusha
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

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.

@twilight2294
Copy link
Contributor

twilight2294 commented Jan 31, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-31 18:29:09 UTC.

Proposal

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

Report field list is not grayed out when toggled on or off offline

What is the root cause of that problem?

In updateReportFieldListValueEnabled, we do not add optimistic pending update action:

function updateReportFieldListValueEnabled(policyID: string, reportFieldID: string, valueIndexes: number[], enabled: boolean) {

Then in ReportFieldsListValuesPage we do not have any pendingAction prop for the field values, which causes the items to not recognize the optimistic update state:

const listValuesSections = useMemo(() => {

Then again in the setting page ReportFieldsValueSettingsPage, the toggle is not wrapped with OfflineWithFeedback:

<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween]}>
<Text>{translate('workspace.reportFields.enableValue')}</Text>
<Switch
isOn={!currentValueDisabled}
accessibilityLabel={translate('workspace.reportFields.enableValue')}
onToggle={updateListValueEnabled}

All of this causes the fields to not gray out when toggled on or off

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

  1. We need to add optimistic pending action here:
 valueIndexes.forEach((valueIndex) => {
        updatedReportField.disabledOptions[valueIndex] = !enabled;
        const shouldResetDefaultValue = !enabled && reportField.defaultValue === reportField.values.at(valueIndex);

        if (shouldResetDefaultValue) {
            updatedReportField.defaultValue = '';
        }
        updatedReportField.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE;
    });
  1. Then we need to add pendingAction to data in listValuesSections here.

  2. then finally add OfflineWithFeedback here

If same exists for add and delete, then fix those too

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

N/A offline bug

What alternative solutions did you explore? (Optional)

@VictoriaExpensify
Copy link
Contributor

So, I think we probably should fix this for consistency. But it seems like a pretty low priority because it doesn't really have an impact on the way a customer uses the platform. I'm going to decrease the bounty on this one. If I have misunderstood something to do with the complexity or significance of this issue, please let me know and I can reassess.

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
@VictoriaExpensify VictoriaExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Feb 3, 2025
@melvin-bot melvin-bot bot changed the title Report Fields - Report field list is not grayed out when toggled on or off offline [$250] Report Fields - Report field list is not grayed out when toggled on or off offline Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

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

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

melvin-bot bot commented Feb 3, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
@VictoriaExpensify VictoriaExpensify changed the title [$250] Report Fields - Report field list is not grayed out when toggled on or off offline [$125] Report Fields - Report field list is not grayed out when toggled on or off offline Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

Upwork job price has been updated to $125

@dangrous
Copy link
Contributor

dangrous commented Feb 3, 2025

i can handle internal review on this one when it's ready!

@dangrous
Copy link
Contributor

dangrous commented Feb 5, 2025

@getusha did you have a chance to review the existing proposal? thanks!

@twilight2294
Copy link
Contributor

But it seems like a pretty low priority because it doesn't really have an impact on the way a customer uses the platform.

@VictoriaExpensify I think $250 is fine for this, because if we delete in offline mode there values are not striked off or removed, this causes deleted values to persist / get removed completely, so I think the original $250 is just fine, what do you think ?

@melvin-bot melvin-bot bot added the Overdue label Feb 6, 2025
Copy link

melvin-bot bot commented Feb 7, 2025

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

@getusha
Copy link
Contributor

getusha commented Feb 9, 2025

Reviewing

@melvin-bot melvin-bot bot removed the Overdue label Feb 9, 2025
Copy link

melvin-bot bot commented Feb 10, 2025

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

Copy link

melvin-bot bot commented Feb 13, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Feb 13, 2025
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. Daily KSv2 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 Overdue
Projects
Status: No status
Development

No branches or pull requests

5 participants