LHN - LHN does not display HTML code text on the message preview
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.
- Go to any chat.
- Send this message: <a href=""takia.html"">asd
- 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
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.
@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
We think that this bug might be related to #vip-vsb
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.
@abekkala Eep! 4 days overdue now. Issues have feelings too...
https://expensify.slack.com/archives/C01SKUP7QR0/p1718735202154699
this will be handled by SWM
@abekkala Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Not overdue - SWM will be picking this up
Hi, I'm Bartosz from SWM react-native-live-markdown team! I'll take a look at the problem here later this week! π
@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!
Thanks @BartoszGrajdek
being worked on by SWM - @BartoszGrajdek
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 ππ»
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 ππ»
@abekkala, @BartoszGrajdek Whoops! This issue is 2 days overdue. Let's get this updated quick!
@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, @BartoszGrajdek Whoops! This issue is 2 days overdue. Let's get this updated quick!
@abekkala, @BartoszGrajdek Huh... This is 4 days overdue. Who can take care of this?
@abekkala, @BartoszGrajdek 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
IRT to https://github.com/Expensify/App/issues/43563#issuecomment-2217787074 I've asked in Slack
Job added to Upwork: https://www.upwork.com/jobs/~01658743cd2f344b13
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)
@eVoloshchak can you review the above then add π to assign an engineer, if needed. thx
@eVoloshchak, @abekkala, @BartoszGrajdek Eep! 4 days overdue now. Issues have feelings too...
@eVoloshchakπ above plz.
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
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!
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
PR is ready
cc: @eVoloshchak
@eVoloshchak is there a delay in reviewing this one?