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 2023-10-09] [$500] IOU - Content in IOU thread and details page has different shade of gray when created offline #26235

Closed
2 of 6 tasks
lanitochka17 opened this issue Aug 29, 2023 · 44 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

@lanitochka17
Copy link

lanitochka17 commented Aug 29, 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!


Action Performed:

  1. Go to staging.new.expensify,com
  2. Go offline
  3. Request money from another use
  4. Click on the IOU preview in 1:1 DM to open IOU report
  5. Click on the IOU preview in IOU report to open IOU details page

Expected Result:

The content in the IOU details page should be the same opacity as the IOU report page which is 50% (not 25% which is happening because we're 50% opacity is being applied twice)

Actual Result:

The content in both IOU report and IOU details page has different shade of gray when created offline.
IOU details page has lighter gray than IOU report

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome
  • MacOS / Desktop

Version Number: 1.3.58-1

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

Notes/Photos/Videos: Any additional supporting documentation

20230829_132043.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018e8fb9fd0bfc8897
  • Upwork Job ID: 1702212936758927360
  • Last Price Increase: 2023-09-14
  • Automatic offers:
    • cubuspl42 | Reviewer | 26770276
    • ginsuma | Contributor | 26770278
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 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

@StevenKKC
Copy link
Contributor

StevenKKC commented Aug 29, 2023

Proposal

Please state again the problem we are trying to solve in this issue.

Content in IOU thread and details page has different shade of gray when created offline.

What is the cause of this issue?

MoneyReportView and MoneyRequestView are wrapped with OfflineWithFeedback.

<OfflineWithFeedback pendingAction={props.action.pendingAction}>
<MoneyReportView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
</OfflineWithFeedback>

<OfflineWithFeedback pendingAction={props.action.pendingAction}>
<MoneyRequestView
report={props.report}
shouldShowHorizontalRule={!props.shouldHideThreadDividerLine}
/>
</OfflineWithFeedback>

And "Amount Cash", "Description", "Date" and "Merchant" in MoneyRequestView are also wrapped with OfflineWithFeedback again.
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.amount') || lodashGet(transaction, 'pendingAction')}>
<MenuItemWithTopDescription
title={formattedTransactionAmount ? formattedTransactionAmount.toString() : ''}
shouldShowTitleIcon={isSettled}
titleIcon={Expensicons.Checkmark}
description={description}
titleStyle={styles.newKansasLarge}
disabled={isSettled || !canEdit}
shouldShowRightIcon={canEdit}
onPress={() => Navigation.navigate(ROUTES.getEditRequestRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.AMOUNT))}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.comment') || lodashGet(transaction, 'pendingAction')}>
<MenuItemWithTopDescription
description={translate('common.description')}
title={transactionDescription}
disabled={isSettled || !canEdit}
shouldShowRightIcon={canEdit}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.getEditRequestRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.DESCRIPTION))}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.created') || lodashGet(transaction, 'pendingAction')}>
<MenuItemWithTopDescription
description={translate('common.date')}
title={transactionDate}
disabled={isSettled || !canEdit}
shouldShowRightIcon={canEdit}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.getEditRequestRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.DATE))}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingFields.merchant') || lodashGet(transaction, 'pendingAction')}>
<MenuItemWithTopDescription
description={isDistanceRequest ? translate('common.distance') : translate('common.merchant')}
title={transactionMerchant}
disabled={isSettled || !canEdit}
shouldShowRightIcon={canEdit}
titleStyle={styles.flex1}
onPress={() => Navigation.navigate(ROUTES.getEditRequestRoute(report.reportID, CONST.EDIT_REQUEST_FIELD.MERCHANT))}
/>
</OfflineWithFeedback>

So MoneyRequestView has more gray than MoneyReportView.

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

We can remove OfflineWithFeedback for "Amount Cash", "Description", "Date" and "Merchant" in MoneyRequestView.

What alternative solutions have you investigated? (Optional)

None.

@ginsuma
Copy link
Contributor

ginsuma commented Aug 29, 2023

Proposal

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

IOU - Content in IOU thread and details page has different shade of gray when created offline

What is the root cause of that problem?

MoneyRequestView content is wrapped by two OfflineWithFeedback here and here.
When creating a request for money in offline mode, both will have opacity. This makes that content has a different grayless level.
TaskView content has the same issue.

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

We should remove OfflineWithFeedback in ReportActionItem here and here.
We also need to wrap the receipt image here into OfflineWithFeedback pendingAction={lodashGet(transaction, 'pendingAction')}.

@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2023
@mallenexpensify
Copy link
Contributor

Was able to reproduce
image
isn't the same as
image

Gonna tag design for quick 👀 to ensure we're following the proper design guidelines since I'm not 100% we want the latter to be similar to the former.

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

Triggered auto assignment to @dannymcclain (Design), see these Stack Overflow questions for more details.

@mallenexpensify mallenexpensify removed the Bug Something is broken. Auto assigns a BugZero manager. label Sep 4, 2023
@mallenexpensify mallenexpensify removed their assignment Sep 4, 2023
@mallenexpensify mallenexpensify added the Bug Something is broken. Auto assigns a BugZero manager. label Sep 4, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 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

@mallenexpensify mallenexpensify self-assigned this Sep 4, 2023
@mallenexpensify
Copy link
Contributor

@sonialiap I'm off this week, can you please keep 👀 on this then I'll snag it back on Monday? Thx

@dannymcclain
Copy link
Contributor

I'm not 100% certain of our rules/guidelines regarding offline styles, but it does seem like the details screen is extra faint. My gut says that those styles should match our regular chat and request offline styles, but I might want @shawnborton to take a look when he has time and give me the rundown of how we handle offline stuff stylistically.

@shawnborton
Copy link
Contributor

That does look quite faint. CC'ing @mountiny again here since you had some experience with these rows for manual requests. Any idea what's happening?

I think the offline pattern for this would be that the rows appear at reduced opacity, but something consistent like 50% for all of them. cc @trjExpensify does that sound right?

@dannymcclain
Copy link
Contributor

@shawnborton Ok that's what I was thinking but wasn't positive. I'm thinking that the details screen is getting an extra declaration of 50% opacity—making it appear at 25% opacity (50% of 50% opacity 😵‍💫).

I did some quick Figma-ing and that details screen looks like a pretty close match to 25%.

image

@trjExpensify
Copy link
Contributor

trjExpensify commented Sep 5, 2023

I think the offline pattern for this would be that the rows appear at reduced opacity, but something consistent like 50% for all of them. cc @trjExpensify does that sound right?

Yeah, that sounds right for pending create as all the data in view is pending to be created (incl. the total in the expanded header area). Also, we should add the OfflineIndicator at the bottom of the request detailed screen beneath the composer when you're offline, like we do in a chat.

@mountiny
Copy link
Contributor

mountiny commented Sep 6, 2023

Yeah I am not sure, I guess this is a combo of two offline wrappers as the transaction as well as the thread is created optimistically, I think if we define how it should look like here, we can export it then

@mallenexpensify
Copy link
Contributor

I did some quick Figma-ing and that details screen looks like a pretty close match to 25%.

@shawnborton are you cool with this?

@shawnborton
Copy link
Contributor

I think what Danny is saying is that it shouldn't be at 25% - and that's happening because we're doing 50% opacity twice.

@shawnborton
Copy link
Contributor

So we should just be using the standard 50% opacity reduction.

@dannymcclain
Copy link
Contributor

I think what Danny is saying is that it shouldn't be at 25% - and that's happening because we're doing 50% opacity twice.
So we should just be using the standard 50% opacity reduction.

Yes—what Shawn said.

@cubuspl42
Copy link
Contributor

cubuspl42 commented Sep 19, 2023

@StevenKKC Thanks for clarification. Well, I didn't notice that in the beginning neither.

Sorry everyone for the confusion. This is my bad in the big part.

After clearing up the situation, I must to change my stand and we should go with @ginsuma

C+ reviewed 🎀 👀 🎀 (again)

@melvin-bot
Copy link

melvin-bot bot commented Sep 19, 2023

Current assignee @stitesExpensify is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

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

melvin-bot bot commented Sep 20, 2023

📣 @cubuspl42 🎉 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

📣 @ginsuma 🎉 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 Sep 20, 2023
@ginsuma
Copy link
Contributor

ginsuma commented Sep 20, 2023

The PR #27830 is ready for review.
cc: @cubuspl42 @stitesExpensify

@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @ginsuma got assigned: 2023-09-20 05:26:52 Z
  • when the PR got merged: 2023-09-26 05:39:13 UTC
  • days elapsed: 4

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] IOU - Content in IOU thread and details page has different shade of gray when created offline [HOLD for payment 2023-10-09] [$500] IOU - Content in IOU thread and details page has different shade of gray when created offline Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 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 2023-10-09. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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:

  • [@cubuspl42] The PR that introduced the bug has been identified. Link to the PR:
  • [@cubuspl42] 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:
  • [@cubuspl42] 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:
  • [@cubuspl42] Determine if we should create a regression test for this bug.
  • [@cubuspl42] 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.
  • [@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@cubuspl42
Copy link
Contributor

cubuspl42 commented Oct 6, 2023

  • The PR that introduced the bug has been identified. Link to the PR:
  • 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:
  • 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:
    • No need for additional discussion
  • Determine if we should create a regression test for this bug.
    • Up to the QA team
  • 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.
    • Be offline.
    • Plus > Request money.
    • Open the IOU details page.
    • Verify that the level of grey is as usual (50%).
    • Be online.
    • Verify that there is no grey in the content.
    • Be offline again.
    • Update the Amount, Description, Date, and Merchant.
    • Verify again that the level of grey is as usual (50%).
    • Be online again.
    • Verify that there is no grey in the content.

@cubuspl42 cubuspl42 mentioned this issue Oct 6, 2023
59 tasks
@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 Daily KSv2 labels Oct 9, 2023
@mallenexpensify
Copy link
Contributor

Issue reporter: Applause
Contributor: @ginsuma paid $500 via Upwork
Contributor+: @cubuspl42 paid $500 via Upwork.

Thanks @cubuspl42 , I created the TestRail GH, we def won't check this on every regression test, maybe monthly?

@cubuspl42
Copy link
Contributor

@mallenexpensify As I shared in the other thread, I don't have a good intuition here! Monthly sounds fine for me

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