Closed lanitochka17 closed 1 week ago
Triggered auto assignment to @joekaufmanexpensify (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.
@joekaufmanexpensify 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-vsp
The room mentioned is rendered as mention inside codeblock in money request description, but not in the chat message.
The regex for room mention currently doesn't prevent to be converted into room mention when inside a code block. When we send a message with a room mention inside a codeblock, you can see it's rendered as a mention. If the room mention doesn't exist, then the BE will return the message without the mention. If the room exists, then the mention stays.
We should prevent the text to be converted into room mention if it's inside a codeblock. We can follow the regex from other mention that is by adding
(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))
to the end of the regex. This will prevent the room mention to be rendered inside a link, code block, and inline code block.
going to review this morning
I can't imagine it's going to be common that many/any customer try and put a multi-line code block as the description for an expense. I'm inclined to say we should do nothing now, and see if any actual customers experience this before deciding to do anything. Closing.
@joekaufmanexpensify the issue also happens when the user sends a multiline code block with a valid room name. I think we should make it consistent with a user/here mention since it doesn't have the issue.
Basically, we need to not allow room mention inside a code block.
Is the example your citing in a regular message, rather than a description of an expense?
Yes, it's a regular message.
Do we think it'll be common that many/anyone will do that? I agree in an ideal world it'd be consistent, but I'm still not sure it's worth prioritizing this right now.
I'm not sure if it's a common thing to do (putting a "hashtag" inside a code block), but I think it's a common expectation that text inside a code block won't be converted to a markdown.
I actually can't reproduce this with regular messages on my end at all
@joekaufmanexpensify did you send the message in a policy room? Room mention only works in a policy room.
https://github.com/Expensify/App/assets/50919443/06435742-08e3-48a2-b012-48312610cd91
@joekaufmanexpensify have you retested it?
Yes, I did. I do see it in a workspace room. But only if you do a multi-line code block where the room name is second. If It's first, the multi-line code block works correctly. I'm still not really convinced this is worth prioritizing, or that many/anyone will experience this. I feel like it might be good to wait and see if there is any customer impact before deciding to prioritize this.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.70-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: N/A Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
mention in multiline code block should be in monospace font and should not be highlighted in expense preview
Actual Result:
In Step 5, #mention in multiline code block is not in monospace font in expense preview in the main chat In Step 7, #mention in multiline code block is highlighted in description row in transaction thread
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/33995ccd-d04f-430c-a46e-5d857d2af17e
View all open jobs on GitHub