App: LHN - Message preview doesn't treat new line as space
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Expected Result:
Message preview should display a space if there is a new line in the message.
Actual Result:
Message preview doesn’t treat new line as space
Action Performed:
- Navigate to a conversation
- Send this message
Cool
Test
Of
New line
- Check the message preview in the LHN
Workaround:
No need, visual issue.
Platform:
Where is this issue occurring?
Web ✔️ iOS Android Desktop App Mobile Web
Version Number: 1.0.47-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Expensify/Expensify Issue URL:
From @puneetlath https://expensify.slack.com/archives/C01GTK53T8Q/p1621222051218200
LHN doesn’t treat new line as a space. Notice how in the LHN image there is no space between “Hello!” and the sentence before it. But in the actual message, it is on its own line. We should treat that new line as a space when showing the text in the LHN.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 22 (18 by maintainers)
Sorry for the confusion @parasharrajat - I was referring to this one: https://github.com/Expensify/Web-Expensify/pull/31071
It looks like that PR has been deployed, and should have a flow-on effect for your PR to be unblocked soon.
Thanks @tgolen - I’ll go ahead and hire @parasharrajat
This is very much related to #2847
Proposal 📄
Message preview should display a space if there is a new line in the message.
Investigation 🕵🏻♂️
https://github.com/Expensify/Expensify.cash/issues/2847
Approach 👨🏼💻
File of concern :
Report.jsandexpensify-commonBest Practices 💃🏼
Testing Strategy 🧪
Expected Delivery Time 📦
Approx 1 week.
Previous Experience 🙅🏼♂️
This might overlap with the discussion elsewhere about getting rid of the “text” version of the message stored in the reportAction, and just generating a stripped version of the HTML “on demand”. During this stripping process, we can just ignore newlines.
On Mon, May 17, 2021 at 9:13 AM MelvinBot @.***> wrote: