Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

[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 m-natarajan closed 4 months ago

m-natarajan commented 5 months ago

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?

Screenshots/Videos

https://github.com/Expensify/App/assets/38435837/efe243ea-6d4a-4738-844c-9f6fc09c7320

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
melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

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[bot] commented 5 months ago

:wave: 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 commented 5 months ago

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 commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

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

ShridharGoel commented 5 months ago

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:

https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/pages/home/report/SystemChatReportFooterMessage.tsx#L67-L75

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 commented 5 months ago

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, https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/components/Banner.tsx#L74-L78

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, https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/components/Banner.tsx#L99-L105

but in our case, we use custom text content which doesn't have the flex1 style. https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/components/Banner.tsx#L94 https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/pages/home/report/SystemChatReportFooterMessage.tsx#L73

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

Add styles.flex1 style to the content. https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/pages/home/report/SystemChatReportFooterMessage.tsx#L73

Then, make sure to not render the Text component if the text is empty. https://github.com/Expensify/App/blob/66b4072db8ec86a8eed2d6e765a52eae3c9c68d4/src/components/Banner.tsx#L96-L106

{shouldRenderHTML && text ? (
    <RenderHTML html={text} />
) : text && (
    ...
ShridharGoel commented 5 months ago

Proposal

Updated to include optional item.

melvin-bot[bot] commented 5 months ago

πŸ“£ @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 commented 5 months ago

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. https://github.com/Expensify/App/blob/198b47360fa6fa5bfbb81f3fb535a2fa6817e375/src/components/Banner.tsx#L85 https://github.com/Expensify/App/blob/198b47360fa6fa5bfbb81f3fb535a2fa6817e375/src/components/Banner.tsx#L94

From SystemChatReportFooterMessage we pass the content prop, which is a Text component. https://github.com/Expensify/App/blob/198b47360fa6fa5bfbb81f3fb535a2fa6817e375/src/pages/home/report/SystemChatReportFooterMessage.tsx#L73

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

What alternative solutions did you explore? (Optional)

MitchExpensify commented 5 months ago

@shubham1206agra what do you think of these proposals?

melvin-bot[bot] commented 5 months ago

@puneetlath, @MitchExpensify, @shubham1206agra Huh... This is 4 days overdue. Who can take care of this?

MitchExpensify commented 5 months ago

Bump @shubham1206agra, thanks

MitchExpensify commented 5 months ago

Waiting on a review on proposals, Melvin

shubham1206agra commented 5 months ago

I will go ahead with @bernhardoj's proposal since he was the first to give the correct solution.

πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

melvin-bot[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

πŸ“£ @shubham1206agra πŸŽ‰ 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[bot] commented 5 months ago

πŸ“£ @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 πŸ“–

bernhardoj commented 5 months ago

PR is ready

cc: @shubham1206agra

melvin-bot[bot] commented 4 months ago

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

melvin-bot[bot] commented 4 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.84-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-24. :confetti_ball:

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

melvin-bot[bot] commented 4 months ago

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:

MitchExpensify commented 4 months ago

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

melvin-bot[bot] commented 4 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.85-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-06-28. :confetti_ball:

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

melvin-bot[bot] commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

@MitchExpensify Bump on the payment here.

MitchExpensify commented 4 months ago

Paid and contracts ended!