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-28] [HOLD for payment 2024-06-24] [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box #43115

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 5, 2024 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Jun 5, 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!


issue reproducible when validating #41290
Version Number: 1.4.79-6
Reproducible in staging?: y
Reproducible in production?: no, (the chat is not displayed to check)
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. Open the app and log in with a new account
  2. Select Manage my teams expenses on onboarding modal
  3. Complete the onboarding flow
  4. Tap the search icon
  5. Open Expensify chat

Expected Result:

The message "Chat with your specialist in #admins for help" is displayed in the box

Actual Result:

The message flows out of the box. Changing device font size might help reproduce the issue.

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

Bug6502358_1717568748135.IMG_7314.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01572a633b7213a3b7
  • Upwork Job ID: 1798353544964635137
  • Last Price Increase: 2024-06-05
  • Automatic offers:
    • shubham1206agra | Reviewer | 102686779
    • bernhardoj | Contributor | 102686780
Issue OwnerCurrent Issue Owner: @MitchExpensify / @MitchExpensify
Issue OwnerCurrent Issue Owner: @puneetlath / @MitchExpensify
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jun 5, 2024
Copy link

melvin-bot bot commented Jun 5, 2024

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

Copy link

melvin-bot bot commented Jun 5, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jun 5, 2024
Copy link
Contributor

github-actions bot commented Jun 5, 2024

👋 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.

@m-natarajan
Copy link
Author

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

@puneetlath puneetlath removed the DeployBlocker Indicates it should block deploying the API label Jun 5, 2024
@puneetlath
Copy link
Contributor

I don't think it needs to block the deploy, but let's fix it.

@puneetlath puneetlath added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jun 5, 2024
@melvin-bot melvin-bot bot changed the title iOS - System chat - Chat with your setup specialist message not aligned and gets out of box [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box Jun 5, 2024
Copy link

melvin-bot bot commented Jun 5, 2024

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

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

melvin-bot bot commented Jun 5, 2024

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

@ShridharGoel
Copy link
Contributor

ShridharGoel commented Jun 5, 2024

Proposal

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

System chat - Chat with your setup specialist message not aligned and gets out of box

What is the root cause of that problem?

There is no padding in the below text which is passed as content to Banner:

return (
<Banner
containerStyles={[styles.archivedReportFooter]}
shouldShowIcon
icon={Expensicons.Lightbulb}
content={<Text suppressHighlighting>{content}</Text>}
/>
);

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

Add some horizontal padding below:

content={<Text style={[styles.pr4]}
                           suppressHighlighting>{content}</Text>}

Padding details need to be discussed with design team.

Optional:

Update this to the below to show text only if it is defined:

{(() => {
    if (!text) {
        return null;
    }
    if (shouldRenderHTML) {
        return <RenderHTML html={text} />;
    }
    return (
        <Text
            style={[styles.flex1, styles.flexWrap, textStyles]}
            onPress={onPress}
            suppressHighlighting
        >
            {text}
        </Text>
    );
})()}

@bernhardoj
Copy link
Contributor

Proposal

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

The report system chat footer gets out of the box.

What is the root cause of that problem?

The container itself already sets a padding,

<View
style={[
styles.flexRow,
styles.alignItemsCenter,
styles.p5,

but the text content still overflows the banner/box. If we look at the banner text, we apply a flex1 style that should fix this issue,

<Text
style={[styles.flex1, styles.flexWrap, textStyles]}
onPress={onPress}
suppressHighlighting
>
{text}
</Text>

but in our case, we use custom text content which doesn't have the flex1 style.

{content && content}

content={<Text suppressHighlighting>{content}</Text>}

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

Add styles.flex1 style to the content.

content={<Text suppressHighlighting>{content}</Text>}

Then, make sure to not render the Text component if the text is empty.

{shouldRenderHTML && text ? (
<RenderHTML html={text} />
) : (
<Text
style={[styles.flex1, styles.flexWrap, textStyles]}
onPress={onPress}
suppressHighlighting
>
{text}
</Text>
)}

{shouldRenderHTML && text ? (
    <RenderHTML html={text} />
) : text && (
    ...

@ShridharGoel
Copy link
Contributor

Proposal

Updated to include optional item.

Copy link

melvin-bot bot commented Jun 5, 2024

📣 @ssswhite0707! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Krishna2323
Copy link
Contributor

Proposal

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

iOS - System chat - Chat with your setup specialist message not aligned and gets out of box

What is the root cause of that problem?

This is a known issue in react native and is caused by using flexRow on parent view of a Text element.

<View style={[styles.flexRow, styles.flex1, styles.mw100, styles.alignItemsCenter]}>

{content && content}

From SystemChatReportFooterMessage we pass the content prop, which is a Text component.

content={<Text suppressHighlighting>{content}</Text>}

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

  • Inside Banner.tsx we need to wrap the content coming from the prop in a View which has flex1 style applied. Also make sure to not render the view when content is not present.
{content && <View style={styles.flex1}>{content}</View>}
  • Do not render RenderHTML or Text when text is not present.
{text &&
    (shouldRenderHTML ? (
        <RenderHTML html={text} />
    ) : (
        <Text
            style={[styles.flex1, styles.flexWrap, textStyles]}
            onPress={onPress}
            suppressHighlighting
        >
            {text}
        </Text>
    ))}

What alternative solutions did you explore? (Optional)

@bernhardoj
Copy link
Contributor

PR is ready

cc: @shubham1206agra

@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 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box [HOLD for payment 2024-06-24] [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box Jun 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

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

Copy link

melvin-bot bot commented Jun 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.84-3 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-24. 🎊

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

Copy link

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

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

@MitchExpensify
Copy link
Contributor

Reminder set to pay - Do we need BZ steps here @shubham1206agra ?

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jun 21, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-06-24] [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box [HOLD for payment 2024-06-28] [HOLD for payment 2024-06-24] [$250] iOS - System chat - Chat with your setup specialist message not aligned and gets out of box Jun 21, 2024
Copy link

melvin-bot bot commented Jun 21, 2024

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

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

Copy link

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

  • [@shubham1206agra] The PR that introduced the bug has been identified. Link to the PR:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] 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:
  • [@shubham1206agra] Determine if we should create a regression test for this bug.
  • [@shubham1206agra] 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.
  • [@MitchExpensify] 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 24, 2024
@puneetlath puneetlath added Weekly KSv2 and removed Daily KSv2 labels Jun 26, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jun 26, 2024
@shubham1206agra
Copy link
Contributor

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:

@shubham1206agra
Copy link
Contributor

@MitchExpensify Bump on the payment here.

@MitchExpensify
Copy link
Contributor

Paid and contracts ended!

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

No branches or pull requests

8 participants
@puneetlath @ShridharGoel @MitchExpensify @m-natarajan @bernhardoj @shubham1206agra @Krishna2323 and others