-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[HOLD for payment 2022-05-20][$250] When we enter 4 backticks and send it sends as two empty block, and when switched the chat, it disappears - reported by @mdneyazahmad #7971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @lschurr ( |
Triggered auto assignment to @bondydaa ( |
Not sure if this is a high priority.. adding eng to investigate. |
hmm yeah probably something with the markdown parser, I'd guess this is fine to work on for external |
Triggered auto assignment to @bfitzexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @AndrewGable ( |
proposalThe problem is in My solution, In: Add check for Result after sending the API request: ss2.mp4Another solution for white space only characters inside backtick is to replace matching |
ProposalWhen number of Solution:Do not consider the text as code until it is strictly a single Example: `` will not be consider as Or else the text will be send as - regex: /(\B|_)`(.*?)`(\B|_)(?![^<]*<\/pre>)/g,
+ regex: /(\B|_)(?<!`)`(?!`)(.+)(?<!`)`(?!`)(\B|_)(?![^<]*<\/pre>)/g, |
@Santhosh-Sellavel please take a look at these ^ proposals when you get a chance - thanks! |
@K4tsuki proposal #7971 (comment) @mdneyazahmad proposal also has addresses the issue, but lookbehinds were used in regex. Please post your thoughts here, Thanks! |
Proposal (updated)If I understand correctly, the goal is to address this issue in the front end code by disabling the send button for certain problematic messages containing only backticks and whitespace. Task - Disable send button for problematic backtick sequencesThe situation is a little different from Slack where triple-backticks elicit the creation of a secondary text editor. So on Slack a message containing only triple-backticks and whitespace is not valid. However, other sequences of ticks (e.g. 2 backticks and whitespace) are considered valid. On Expensify, on the other hand, a message containing just 2 backticks and whitespace should not be considered valid, as it causes an error on the back end and some weird message rendering. So a straightforward solution is to update ReportActionCompose.updateComment() so that a comment is considered invalid if it contains only backticks and whitespace. Note that this is more restrictive than Slack. This validation code could go in The quickest way to resolve the issue is by changing this line of code:
This line is executed after any update to the comment text field. And when So instead of
|
@frenkield Can you elaborate more on the fix for this issue. What changes are you proposing? |
Ok thanks, @Santhosh-Sellavel. I'll remove task 2 from the proposal. The issue can be resolved by changing this line of code:
This line is executed after any update to the comment text field. And when So instead of
|
Will review this tomorrow! |
Discussing this one! |
@AndrewGable Thanks! |
📣 @frenkield You have been assigned to this job by @AndrewGable! |
Thanks for assigning me this ticket. I submitted the proposal on Upwork (https://www.upwork.com/jobs/~012ef02def10429641). I'm planning to submit the pull request by Monday, May 2nd. And sorry, I put the wrong delivery date in the Upwork proposal. It should be Monday, May 2nd. |
Cool, thanks! |
Hi All. I created a draft pull request. Can I submit it for final review or do I need to wait for approval? |
You need to submit your PR to get reviewed @frenkield! |
[#7971] Disable send if only backticks/whitespace
@bfitzexpensify Any update on payment? |
Paid out @frenkield - @Santhosh-Sellavel, once you accept the offer here I'll wrap that up too. Same for @mdneyazahmad. |
OK great, all done here! |
I found this GH while researching #13854. It looks like the solution was to disable the sending of the messages based on Slack functionality (@AndrewGable ):
However, I just checked Slack, and it let's me send a message with empty code blocks as well as one and two backticks (any number). So, I think I'm going to look into reverting this change and looking into the backend issues instead |
@tgolen I can't send empty blocks still on slack Screen.Recording.2023-01-03.at.4.17.04.AM.mov |
Ah yes, I was mistaken about the full code blocks, but you can send empty inline code blocks (ie. two backticks) as well as single backticks. |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The sent message disappears.
Actual Result:
Either we should not allow to send empty message or keep it as it is sent.
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.41-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Potentially related to #7965
Screen.Recording.2022-02-17.at.2.15.36.PM.mov
Record_2022-02-21-18-53-48.mp4
Expensify/Expensify Issue URL:
Issue reported by: @mdneyazahmad
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1645088209701899
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: