-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Last visible message text, expensify-common update #19237
Last visible message text, expensify-common update #19237
Conversation
@youssef-lr @s77rt 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] |
Co-authored-by: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com>
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromemweb-chrome.mp4Mobile Web - Safarimweb-safari.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
@alitoshmatov For Offline and QA tests please remove the steps and just write "same as Tests" |
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! 🚀
cc @youssef-lr
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 tested well!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/youssef-lr in version: 1.3.17-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.17-5 🚀
|
I believe this PR may have caused the bug - #19789. Am I wrong? |
@therealsujitk Can you please elaborate? If we revert this PR would the issue get fixed? I checked the linked issue and the proposals that revolve around decoding a plain text are likely to be correct. We should never decode a plain text.
|
Yes, it would fix the issue. This PR unescapes the result before returning it which wasn't done before, I believe after doing so it was not checked for the other occurrences of I've suggested removing |
I think just removing the htmlDecode is enough. We should keep the use of unescape because for the |
I've also created a PR - Expensify/expensify-common#543 to change |
Please do not create PRs before getting assigned |
Sorry, but I thought it was alright since it was not in this repository. And I got the OK on slack, plus I was assigned to #19539 - an issue we initially thought had the same root cause. |
As we have discussed it previously, we have a lot of confusion around |
It's okay but you were assigned for this proposal and not for E/Common. Either way I would prefer to keep the unescape function as is and just remove the htmlDecode parts that target raw text. Isn't that enough? |
Alright, I'll wait to be assigned to it next time. However the only reason I went forward with the PR is because I was given the OK in this slack discussion.
Unfortunately not, unescaping some html entities such as |
I think this is the expected behaviour. |
Sorry I might have mistyped, it shows |
Oh I see, but where is this coming from? spaces should not be encoded that way |
I logged it to see what was going on, and these were the results. So it looks like function addActions(reportID, text = '', file) {
let reportCommentText = '';
let reportCommentAction;
let attachmentAction;
let commandName = 'AddComment';
if (text) {
const reportComment = ReportUtils.buildOptimisticAddCommentReportAction(text);
reportCommentAction = reportComment.reportAction;
reportCommentText = reportComment.commentText;
console.log(text);
console.log(_.escape(text));
console.log(_.unescape(_.escape(text)));
console.log(reportCommentAction.message[0].html);
console.log(reportCommentAction.message[0].text);
}
... Source code - https://github.com/Expensify/expensify-common/blob/925e62744f784a92c3ad8947aabfc21c93bec221/lib/ExpensiMark.js#L23-L39 It looks like the best option is to use |
Leaving a note for the checklist: This PR caused a regression #19789. After fixing the E/Common |
Details
Updated to use new version of
expensify-common
.Changed
getLastVisibleMessage
function to use text instead of htmlFixed Issues
$ #17658
PROPOSAL: #17658 (comment)
Tests
&
)Offline tests
Same as Tests
QA Steps
Same as Tests
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
17658-web.mov
Mobile Web - Chrome
17658-mWeb.mp4
Mobile Web - Safari
17658-safari.mp4
Desktop
17658-desktop.mov
iOS
17658-ios.mp4
Android
17658-android.mp4