Closed isagoico closed 3 years ago
Triggered auto assignment to @zanyrenney (AutoAssignerTriage
), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
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 .
Triggered auto assignment to @tgolen (Engineering
), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Looks like a good contributor issue.
Triggered auto assignment to @jliexpensify (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Can confirm this is happening on v1.0.48-0:
Will get this to Upwork.
p.s. Puneet brought up the issue here - https://expensify.slack.com/archives/C01GTK53T8Q/p1621222051218200
I thought maybe we could build this into ExpensiMark
, but since we just need to convert the HTML into plain text + converts line breaks into spaces it can probably be a simple utility function like this but swap out the \n
for a single space character?
Posted to upwork: https://www.upwork.com/jobs/~01335a9f088d223b91
Here is my proposal.
<br>
tags with spaces before converting the HTML markup to text for lastMessageText
in report object creation.
https://github.com/Expensify/Expensify.cash/blob/ff61c1aaf2309ed4fcaf1264ff149acbeb9bfa9b/src/libs/actions/Report.js#L157
TO
const lastMessageText = lodashGet(lastReportAction, ['message', 'html'], '').replace(/(<(br[^>]*)>)/gi, ' ').replace(/(<([^>]+)>)/gi, '');
will just do the trick. This lastMessageText
is further used to create Option for LHN.
.
Message preview should display a space if there is a new line in the message.
https://github.com/Expensify/Expensify.cash/issues/2847
File of concern : Report.js
and expensify-common
Approx 1 week.
That solution looks good @parasharrajat 👍
I'll let @tgolen weigh in though as he is assigned to the PR. I think this is something that would happen in the server eventually if we move to reduce processing logic for API data in the client.
I think this is something that would happen in the server eventually if we move to reduce processing logic for API data in the client.
Then it makes sense
Yep, I think it's OK for now. That logic isn't going anywhere today. If/when it's moved to the server-side then this replacement will come along with the logic.
@tgolen Are you giving me a :green_circle: signal? PR is one-click away?
Yep! 🟢 Click away on your PR!
Thanks @tgolen - I'll go ahead and hire @parasharrajat
Looks like PR is blocked atm, will check again later.
PR approved and deployed 6 hours ago
@jliexpensify which PR? mine is still open.
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.
Contributor paid!
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:
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:
View all open jobs on Upwork
From @puneetlath https://expensify.slack.com/archives/C01GTK53T8Q/p1621222051218200