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:

  1. Navigate to a conversation
  2. Send this message
Cool
Test
Of
New line
  1. 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:

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


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)

Most upvoted comments

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.js and expensify-common

Best Practices 💃🏼

  • No hard-coded regexes
  • No inline styling
  • Follow React Native best practices

Testing Strategy 🧪

  • Unit tests for the underlying modules

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:

Triggered auto assignment to @zanyrenney https://github.com/zanyrenney ( AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Expensify/Expensify.cash/issues/2965#issuecomment-842567054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEMNUWEQDVZVRAEHEHHAFTTOFTGRANCNFSM45BBNLSQ .