Skip to content

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

Closed

Description

@izarutskaya

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 17, 2024
  2. melvin-bot commented on Apr 17, 2024

    @melvin-bot

    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.

  3. izarutskaya commented on Apr 17, 2024

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

  4. izarutskaya commented on Apr 17, 2024

    @izarutskaya
    Author

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

  5. twisterdotcom commented on Apr 17, 2024

    @twisterdotcom
    Contributor

    Pretty sure this is a dupe

  6. allgandalf commented on Apr 17, 2024

    @allgandalf
    Contributor

    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
  7. allgandalf commented on Apr 17, 2024

    @allgandalf
    Contributor

    Pretty sure this is a dupe

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

  8. twisterdotcom commented on Apr 17, 2024

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

  9. allgandalf commented on Apr 17, 2024

    @allgandalf
    Contributor

    haha, no worries

  10. allgandalf commented on Apr 18, 2024

    @allgandalf
    Contributor

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

  11. twisterdotcom commented on Apr 18, 2024

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

  12. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 18, 2024
  13. melvin-bot commented on Apr 18, 2024

    @melvin-bot
  14. 36 remaining items

  15. melvin-bot commented on May 13, 2024

    @melvin-bot

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

  16. tylerkaraszewski commented on May 13, 2024

    @tylerkaraszewski
    Contributor

    melvin, I told you to go away.

  17. allgandalf commented on May 14, 2024

    @allgandalf
    Contributor

    @twisterdotcom , can you pay this please :)

  18. twisterdotcom commented on May 14, 2024

    @twisterdotcom
    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)
  19. twisterdotcom commented on May 14, 2024

    @twisterdotcom
    Contributor

    @allroundexperts we just need the regression steps here.

  20. added and removed
    Awaiting PaymentAuto-added when associated PR is deployed to production
    on May 14, 2024
  21. 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[/+] on May 14, 2024
  22. allroundexperts commented on May 14, 2024

    @allroundexperts
    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.
  23. JmillsExpensify commented on Jun 28, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @allroundexperts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions