App icon indicating copy to clipboard operation
App copied to clipboard

LHN - LHN does not display HTML code text on the message preview

Open m-natarajan opened this issue 1 year ago β€’ 15 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.82-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4620777 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:

Pre-requisite: the user must be logged in.

  1. Go to any chat.
  2. Send this message: <a href=""takia.html"">asd
  3. Verify that LHN message preview only displays "asd" and not the entire message.

Expected Result:

The entire message should be displayed on the message preview on LHN.

Actual Result:

The HTML code text is not displayed on the message preview on LHN, only the text that the code contains.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [x] iOS: Native
  • [ ] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Bug6510214_1718164484854!image

View all open jobs on GitHub

m-natarajan avatar Jun 12 '24 12:06 m-natarajan

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

melvin-bot[bot] avatar Jun 12 '24 12:06 melvin-bot[bot]

@abekkala 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

m-natarajan avatar Jun 12 '24 12:06 m-natarajan

We think that this bug might be related to #vip-vsb

m-natarajan avatar Jun 12 '24 12:06 m-natarajan

Proposal

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

LHN last message doesn't show HTML code written in plain text.

What is the root cause of that problem?

This happens after https://github.com/Expensify/App/pull/40845 is merged. In that PR, we are converting HTML to text, so the HTML code is removed but you can still see the text inside the HTML tag. https://github.com/Expensify/App/blob/b70b136c0c30c4948798888ff1722dceba96d0e6/src/components/LHNOptionsList/OptionRowLHN.tsx#L243

It's to solve this issue where the last message text of the workspace #admins chat contains an HTML tag. It was a BE issue because the last message text shouldn't include any HTML tag. The one that includes the HTML tag is the last message HTML.

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

Revert the change from https://github.com/Expensify/App/pull/40845.

I can't repro the BE issue anymore, if anyone can repro it, then it should be fixed on the BE first.

bernhardoj avatar Jun 12 '24 13:06 bernhardoj

@abekkala Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Jun 17 '24 18:06 melvin-bot[bot]

https://expensify.slack.com/archives/C01SKUP7QR0/p1718735202154699

abekkala avatar Jun 18 '24 18:06 abekkala

this will be handled by SWM

abekkala avatar Jun 21 '24 11:06 abekkala

@abekkala Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Jun 24 '24 18:06 melvin-bot[bot]

Not overdue - SWM will be picking this up

abekkala avatar Jun 24 '24 18:06 abekkala

Hi, I'm Bartosz from SWM react-native-live-markdown team! I'll take a look at the problem here later this week! πŸ‘€

BartoszGrajdek avatar Jun 26 '24 09:06 BartoszGrajdek

@abekkala this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Jun 26 '24 18:06 melvin-bot[bot]

Thanks @BartoszGrajdek

abekkala avatar Jun 26 '24 18:06 abekkala

being worked on by SWM - @BartoszGrajdek

abekkala avatar Jul 02 '24 13:07 abekkala

Hi! I'm going OOO 4.07-7.07. At the beginning of next week, we'll check if there's anyone available to handle it @ SWM, we may have some more people available to work on this.

I was busy handling issues with a higher priority in recent days, so sorry for the delay here πŸ™πŸ»

BartoszGrajdek avatar Jul 03 '24 19:07 BartoszGrajdek

I've looked into this issue and it seems like @bernhardoj fix is working just fine - it's also the easiest one IMO. I didn't manage to reproduce the backend issue from https://github.com/Expensify/App/issues/40348. However, it doesn't mean that won't happen again - maybe in a different scenario.

Not sure how we want to proceed here. Personally, I think we can just go with @bernhardoj solution because ultimately things like these should be handled by the backend, but maybe the parser.htmlToText is desired as a safety net.

Let me know what you think! @abekkala πŸ™ŒπŸ»

BartoszGrajdek avatar Jul 09 '24 13:07 BartoszGrajdek

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

melvin-bot[bot] avatar Jul 12 '24 18:07 melvin-bot[bot]

@BartoszGrajdek Ok, we can proceed with the fix proposed by @bernhardoj We can get an internal engineer to weigh in on

maybe the parser.htmlToText is desired as a safety net.

abekkala avatar Jul 12 '24 20:07 abekkala

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

melvin-bot[bot] avatar Jul 16 '24 18:07 melvin-bot[bot]

@abekkala, @BartoszGrajdek Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Jul 18 '24 18:07 melvin-bot[bot]

@abekkala, @BartoszGrajdek 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

melvin-bot[bot] avatar Jul 22 '24 18:07 melvin-bot[bot]

IRT to https://github.com/Expensify/App/issues/43563#issuecomment-2217787074 I've asked in Slack

abekkala avatar Jul 24 '24 15:07 abekkala

Job added to Upwork: https://www.upwork.com/jobs/~01658743cd2f344b13

melvin-bot[bot] avatar Jul 24 '24 16:07 melvin-bot[bot]

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

melvin-bot[bot] avatar Jul 24 '24 16:07 melvin-bot[bot]

@eVoloshchak can you review the above then add πŸŽ€ to assign an engineer, if needed. thx

mallenexpensify avatar Jul 24 '24 16:07 mallenexpensify

@eVoloshchak, @abekkala, @BartoszGrajdek Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Jul 29 '24 18:07 melvin-bot[bot]

@eVoloshchakπŸ‘€ above plz.

mallenexpensify avatar Jul 29 '24 23:07 mallenexpensify

I agree with @bernhardoj's proposal, we should remove the conversion. This ends up creating an inconsistency between how message is presented in LHN and in the actual chat window Screenshot 2024-07-30 at 20 05 52

We have to add test steps to make sure we aren't breaking both https://github.com/Expensify/App/issues/40348 and https://github.com/Expensify/App/issues/41141

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

eVoloshchak avatar Jul 30 '24 18:07 eVoloshchak

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

melvin-bot[bot] avatar Jul 30 '24 18:07 melvin-bot[bot]

PR is ready

cc: @eVoloshchak

bernhardoj avatar Aug 01 '24 05:08 bernhardoj

@eVoloshchak is there a delay in reviewing this one?

abekkala avatar Aug 20 '24 13:08 abekkala