-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix #17798: Backtick Bug #19218
Fix #17798: Backtick Bug #19218
Conversation
@alex-mechler @mollfpr One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@AngelNBazan Could you complete the screenshots for all platforms? Thanks! |
@AngelNBazan I also notice that the older IOU that already saves the markdown for description still displays the issue in LHN and the expense report thread. Could we at least display the same comment within the comment in |
@mollfpr I have just add the screenshots for all platforms and I also included screenshots of the IOUPreview working correctly with this fix. |
@AngelNBazan Could you address this issue? ![]() |
@mollfpr I have attached some screenshots that show this PR, fixing this issue(#19218 (comment)). The reason that the older IOU displays backticks properly and the IOU preview doesn't is that we are still sending/saving improperly parsed text to the backend. And, in this PR we remove the parsing logic and save/send the plain text to the backend which is why in the screenshots below it displays properly. Line 1394 in 23e5de4
![]() ![]() ![]() |
@AngelNBazan So can we fix that? Or we only able to fix the issue in new IOU? |
@mollfpr Sorry, I'm a bit confused about what you mean by "Or we only able to fix the issue in new IOU", this PR would remove the parsing logic. Removing the parsing logic is how we fix this issue #19218 (comment), as it saves the correct text across everything. So, whenever anything uses the comments/descriptions it accesses the correct text. |
@mollfpr Oh, sorry, I think I understand now. Yes, this PR would only apply to IOUs from now on. Therefore, old IOUs would still display incorrectly. I'm not sure on how we could fix old IOUs as those have already been saved to the backend. |
@AngelNBazan Is it possible to display the exact text on the sidebar and the IOU preview comment? |
@mollfpr Yes, here are screenshots of that. |
Nice! Let's stick with that and keep the original solution too. |
@mollfpr Alright, that sounds good to me. I believe my PR is now ready for review. Could you please take a look at it? Thank you! |
@AngelNBazan I think there's a misunderstanding here. I'm asking for the older IOU since. 😅 |
@mollfpr Sorry for the confusion 😅. Could you please provide more clarification on what you mean by the 'older IOU'? I want to make sure I understand your request correctly. Thank you! |
The screenshot here is has request money before this PR created. In LHN it's and description display So I'm thinking we could fix the incorrect text for old IOUs too, because it's fix in the IOU preview component. |
@mollfpr, I understand now. We actually cannot fix old IOUs because the text has already been saved incorrectly. The reason that it shows correctly in the screenshots is because something similar to this PR was started but not finished: Line 1447 in 228f409
In this case, Line 1413 in 228f409
Line 1417 in 228f409
This PR aims to fix these two lines above and other locations where incorrect text is still being sent. So to summarize, this PR will only fix new IOUs and will have LHN and descriptions display the correct text #19218 (comment). These screenshots were taken of me testing the PR with new IOUs, not old ones. Hope this clears up any misunderstandings. 😄 |
@alex-mechler Are we okay with this? We could decode the text in LHN for the last message or the display name, but if the user tries to leave a comment with & , © , etc, it will be decoded, and I'm afraid someone will see that as a bug. |
Can you elaborate on this? With this PR in place, if you comment with For the scope of this issue, we can ignore pre-existing IOUs, and only worry about ones going forward |
In this PR, the user will see what they send so it's still
Okay then, I'll continue with the review and testing. Thanks for confirming it @alex-mechler! |
@AngelNBazan Do we still need this parsed? Line 1398 in 63f314c
|
@mollfpr No, you're right this does not need to parsed I have just updated the PR. |
@mollfpr, @AngelNBazan I am not sure , but maybe we can cleanup
|
@AngelNBazan Could you resolve the conflicts? I'll complete the review afterward. |
Sure, @mollfpr! I have just resolved the conflicts. Let me know if there's anything else I can help with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay! Just need to revert unnecessary changes on IOUPreview
.
While testing this PR, I reported a bug in the Split bill details page here. |
Reviewer Checklist
Screenshots/VideosWeb19218.Web.movMobile Web - Chrome19218.mWeb.Chrome.movMobile Web - Safari19218.mWeb.Safari.mp4Desktop19218.Desktop.moviOS19218.iOS.mp4Android19218.Android.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tests well 👍
All yours @alex-mechler
@AngelNBazan Code LGTM, and tests well, but you still have unsigned commits here. You need to make this PR have only signed commits before travis will pass |
@mollfpr @alex-mechler, apologies for the inconvenience. I had to recreate the repo to sign all the commits. Here's the new PR: #19868. |
Thanks! |
Details
Fixed backticks (`) display in the comment/description sections of actions such as Send Money, Request Money, and Split Bill by removing the HTML parser that processed the comment text. This change ensures that backticks are correctly displayed (`) instead of being converted into their HTML representation '`'."
Fixed Issues
$ #17798
PROPOSAL: #17798 (comment)
Tests
1.Create an action(Request money, Send money, Split bill)
2. In comment/description section and add backticks(`) to text
3. Verify the correct amount of backticks are displayed, all text in between backticks is present, and backticks are displayed properly and not as html representation('`')
Offline tests
N/a
QA Steps
1.Create an action(Request money, Send money, Split bill)
2. In comment/description section and add backticks(`) to text
3. Verify the correct amount of backticks are displayed, all text in between backticks is present, and backticks are displayed properly and not as html representation('`')
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android