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

[Awaiting checklist completion][$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview #40348

Closed
5 of 6 tasks
izarutskaya opened this issue Apr 17, 2024 · 31 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Apr 17, 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: 1.4.61.8
Reproducible in staging?: Y
Reproducible in production?: Y
Found when executing PR : https://github.com/Expensify/Expensify/issues/380529
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Log in with a new Gmail account
  2. Create a workspace
  3. Navigate to the LHN

Expected Result:

HTML tags shouldn't be visible.

Actual Result:

HTML "

" tag can be seen on the #admins room LHN preview. It's not visible in the room.

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

Bug6451424_1713287386029!Capture (1)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b3428578236ce20d
  • Upwork Job ID: 1780883160992833536
  • Last Price Increase: 2024-04-18
  • Automatic offers:
    • GandalfGwaihir | Contributor | 0
Issue OwnerCurrent Issue Owner: @allroundexperts
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 17, 2024
Copy link

melvin-bot bot commented Apr 17, 2024

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

@izarutskaya
Copy link
Author

@twisterdotcom 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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@twisterdotcom
Copy link
Contributor

Pretty sure this is a dupe

@allgandalf
Copy link
Contributor

allgandalf commented Apr 17, 2024

Proposal

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

LHN option list content is not rendered properly and we see the html tags in report message

What is the root cause of that problem?

The API responds us HTML text when we receive OpenReport:
Screenshot 2024-04-17 at 7 03 55 PM
This is necessary because we render this HTML in main report screen, but we do not convert this to normal text when we display the message in LHN:

{optionItem.alternateText ? (
<Text
style={alternateTextStyle}
numberOfLines={1}
accessibilityLabel={translate('accessibilityHints.lastChatMessagePreview')}
>
{optionItem.alternateText}
</Text>
) : null}

This results in us seeing the content with HTML tags

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

We need to convert this message to normal text first before being display, we can use htmlToText util from Expensify-common below:

{optionItem.alternateText}

{optionItem.alternateText ? (
                                        <Text
                                            style={alternateTextStyle}
                                            numberOfLines={1}
                                            accessibilityLabel={translate('accessibilityHints.lastChatMessagePreview')}
                                        >
                                            {parser.htmlToText(optionItem.alternateText)}
                                        </Text>
                                    ) : null}

We should also remove the styles.pre from alternateTextStyle as we no longer need paragraph whitespaces to be shows for the LHN text:

const alternateTextStyle = isInFocusMode
? [textStyle, styles.optionAlternateText, styles.pre, styles.textLabelSupporting, styles.optionAlternateTextCompact, styles.ml2, style]
: [textStyle, styles.optionAlternateText, styles.pre, styles.textLabelSupporting, style];

Result

Result Video
Screen.Recording.2024-04-17.at.7.10.48.PM.mov

@allgandalf
Copy link
Contributor

Pretty sure this is a dupe

Can you please post the dupe if you find it, I will also search for it @twisterdotcom

@twisterdotcom
Copy link
Contributor

Yes, sorry, being pulled into something else but will look again in a bit. I opened this tab, said that, searched and immediately got distracted, my bad.

@allgandalf
Copy link
Contributor

haha, no worries

@allgandalf
Copy link
Contributor

No luck finding the dupe :), Are you sure that you saw this issue before @twisterdotcom ?

@twisterdotcom
Copy link
Contributor

So, here are the issues I think I was thinking about:

https://github.com/Expensify/Web-Expensify/pull/37784
#20590

Basically, I think that we show HTML in the LHN is expected, given @puneetlath closed the last issue I see for this above.

Going to get a C+ involved for their take too, because I agree this would be nice to clean up though if you can do it.

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

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

@melvin-bot melvin-bot bot changed the title LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview [$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview Apr 18, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

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

@allgandalf
Copy link
Contributor

Basically, I think that we show HTML in the LHN is expected, given @puneetlath closed the last issue I see for this above.

I read the issue, that was related BE sending wrong messages, over here BE does send the right message but we do not parse it correctly :), would like to hear if @ntdiary agrees with me too ;)

@allroundexperts
Copy link
Contributor

Taking over!

@ntdiary ntdiary removed their assignment Apr 18, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 18, 2024
@twisterdotcom twisterdotcom added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 18, 2024
@allroundexperts
Copy link
Contributor

I think given we want to support HTML in LHN, we can go forward with @GandalfGwaihir's proposal as its simple enough and makes sense.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 18, 2024

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

@allgandalf
Copy link
Contributor

friendly bump to @tylerkaraszewski for assignment

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 2, 2024
@melvin-bot melvin-bot bot changed the title [$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview [HOLD for payment 2024-05-09] [$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview May 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 2, 2024
Copy link

melvin-bot bot commented May 2, 2024

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

Copy link

melvin-bot bot commented May 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.69-2 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-05-09. 🎊

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

Copy link

melvin-bot bot commented May 2, 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:

  • [@allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts] 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:
  • [@allroundexperts] 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:
  • [@allroundexperts] Determine if we should create a regression test for this bug.
  • [@allroundexperts] 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.
  • [@twisterdotcom] 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 May 8, 2024
@tylerkaraszewski
Copy link
Contributor

@allroundexperts ?

Copy link

melvin-bot bot commented May 13, 2024

@tylerkaraszewski, @twisterdotcom, @allroundexperts, @GandalfGwaihir Eep! 4 days overdue now. Issues have feelings too...

@tylerkaraszewski
Copy link
Contributor

melvin, I told you to go away.

@allgandalf
Copy link
Contributor

@twisterdotcom , can you pay this please :)

@twisterdotcom
Copy link
Contributor

Thanks so much for the patience here folks. Always crazy coming back from a week out.

Payment Summary:

  • @allroundexperts paid $250 via NewDot Manual Requests (C+)
  • @GandalfGwaihir paid $250 here (Contributor)

@melvin-bot melvin-bot bot removed the Overdue label May 14, 2024
@twisterdotcom
Copy link
Contributor

@allroundexperts we just need the regression steps here.

@twisterdotcom twisterdotcom added Weekly KSv2 and removed Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 labels May 14, 2024
@twisterdotcom twisterdotcom changed the title [HOLD for payment 2024-05-09] [$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview [Awaiting checklist completion][$250] LHN - HTML "<h1>" tag can be seen on the #admins room LHN preview May 14, 2024
@allroundexperts
Copy link
Contributor

Checklist

  1. I was not able to find the exact PR. I think that something changed on the backend which caused this.
  2. N/A
  3. N/A
  4. A regression test would be helpful. The test steps given in the OP look good enough to me.

@JmillsExpensify
Copy link

$250 approved for @allroundexperts

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 Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants