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

[$500] IOU - Description and Merchant in IOU preview are displayed in different style #35393

Closed
6 tasks done
kbecciv opened this issue Jan 30, 2024 · 22 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Jan 30, 2024

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: v1.4.33-3
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: Applause- Internal Team
Slack conversation:

Action Performed:

  1. Go to 1:1 DM.
  2. Create two money requests - one with merchant, and another one with only description.
  3. Go to IOU report.

Expected Result:

Merchant and Description will be displayed in IOU preview in the same style.

Actual Result:

Merchant is not bolded and appear grayed out, while the description is bolded in IOU preview.

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

Bug6360790_1706616061774.20240130_123505.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01370109af3b78ad99
  • Upwork Job ID: 1752312317782040576
  • Last Price Increase: 2024-01-30
  • Automatic offers:
    • bernhardoj | Contributor | 0
@kbecciv kbecciv 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 Jan 30, 2024
@melvin-bot melvin-bot bot changed the title IOU - Description and Merchant in IOU preview are displayed in different style [$500] IOU - Description and Merchant in IOU preview are displayed in different style Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

Copy link

melvin-bot bot commented Jan 30, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Jan 30, 2024

We think that this bug might be related to #vip-bills
CC @davidcardoza

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Jan 30, 2024

Proposal

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

IOU - Description and Merchant in IOU preview are displayed in different style

What is the root cause of that problem?

The main problem with issue is that we use different component with different styles

{shouldShowDescription && <RenderHTML html={parser.replace(merchantOrDescription)} />}
{shouldShowMerchant && <Text style={[styles.textLabelSupporting, styles.textNormal]}>{merchantOrDescription}</Text>}

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

To fix this issue we can use the same styles and components for these texts

But there is a bit unclear what we are expected
So before we change styles and components
Design team help needed

But since before we had problem with markdown
HTML component looks beter

What alternative solutions did you explore? (Optional)

NA

@DylanDylann
Copy link
Contributor

DylanDylann commented Jan 30, 2024

Proposal

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

Merchant is not bolded and appear grayed out, while the description is bolded in IOU preview.

What is the root cause of that problem?

{shouldShowDescription && <RenderHTML html={parser.replace(merchantOrDescription)} />}
{shouldShowMerchant && <Text style={[styles.textLabelSupporting, styles.textNormal]}>{merchantOrDescription}</Text>}

we are rendering merchant and description in 2 different way

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

{shouldShowDescription && <RenderHTML html={parser.replace(merchantOrDescription)} />}
{shouldShowMerchant && <Text style={[styles.textLabelSupporting, styles.textNormal]}>{merchantOrDescription}</Text>}

Because in 2 cases, we both render the same value merchantOrDescription. So we should update like that
Option 1:

{(shouldShowDescription || shouldShowMerchant) && <RenderHTML html={parser.replace(merchantOrDescription)} />} 

Option 2:

 {(shouldShowDescription || shouldShowMerchant) && <Text style={[styles.textLabelSupporting, styles.textNormal]}>{merchantOrDescription}</Text>} 

We need to ask the design team to decide which option we should go with

What alternative solutions did you explore? (Optional)

NA

@bernhardoj
Copy link
Contributor

Proposal

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

The text color style between merchant and description is different.

What is the root cause of that problem?

The description is rendered with RenderHTML while the merchant is rendered with text with a style that has a color of textSupporting.

{shouldShowDescription && <RenderHTML html={parser.replace(merchantOrDescription)} />}
{shouldShowMerchant && <Text style={[styles.textLabelSupporting, styles.textNormal]}>{merchantOrDescription}</Text>}

The default style for RenderHTML can be seen below which is different from the merchant text style (the color).

App/src/styles/index.ts

Lines 217 to 220 in 82ae62f

baseFontStyle: {
color: theme.text,
fontSize: variables.fontSizeNormal,
fontFamily: FontUtils.fontFamily.platform.EXP_NEUE,

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

To make them both show the same color, we can wrap the description with <muted-text> tag.

{shouldShowDescription && <RenderHTML html={`<muted-text>${parser.replace(merchantOrDescription)}</muted-text>`} />}

@melvin-bot melvin-bot bot added the Overdue label Feb 1, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

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

@rushatgabhane
Copy link
Member

reviewing

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
@rushatgabhane
Copy link
Member

rushatgabhane commented Feb 6, 2024

I like @bernhardoj's proposal 🎀 👀 🎀
#35393 (comment)

The expected result is - the preview should have color textSupporting and the description should support markdown

Copy link

melvin-bot bot commented Feb 6, 2024

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

@anmurali
Copy link

anmurali commented Feb 8, 2024

@marcochavezf based on #35393 (comment), should we assign the job to @bernhardoj ?

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 8, 2024
@anmurali anmurali removed the Overdue label Feb 8, 2024
@marcochavezf
Copy link
Contributor

Yes, assigning @bernhardoj 🚀 thanks for the review @rushatgabhane, and apologies for the delay

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

melvin-bot bot commented Feb 8, 2024

📣 @bernhardoj 🎉 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 Feb 9, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @rushatgabhane

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

This issue has not been updated in over 15 days. @marcochavezf, @anmurali, @rushatgabhane, @bernhardoj eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@rushatgabhane
Copy link
Member

@anmurali could you please attach payment summary, thanks 🙇

@rushatgabhane
Copy link
Member

payment request here https://staging.new.expensify.com/r/1789662421125982

@JmillsExpensify
Copy link

@anmurali please add a payment summary when you get a chance.

@anmurali
Copy link

anmurali commented Mar 19, 2024

@anmurali
Copy link

@JmillsExpensify added above and paid @bernhardoj. I am closing the issue as it sounds like you already have a ND request for @rushatgabhane and you can check it off here after you process payment for this on ND.

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane based on summary.

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 Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants