Repository navigation
fix: logic get sign index suggestion mention - #37308
Conversation
|
@mkhutornyi Please 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] |
|
@abdulrahuman5196 all yours |
@mkhutornyi Thanks for the headsup, I can take care of this regression |
| // Detect if the last two words contain a mention (two words are needed to detect a mention with a space in it) | ||
| if (lastWord.startsWith('@')) { | ||
| atSignIndex = leftString.lastIndexOf(lastWord); | ||
| atSignIndex = leftString.lastIndexOf(lastWord) + afterLastBreakLineIndex; |
There was a problem hiding this comment.
@dukenv0307 Won't it have a offset of 1 index because we add 1 to the afterLastBreakLineIndex?
There was a problem hiding this comment.
@dukenv0307 It shouldn't offset atSignIndex right? Because it will offset the index of atSignIndex by 1 wrongly?
There was a problem hiding this comment.
@abdulrahuman5196 The current logic is correct since the leftString is cut off start after the last break line index.
There was a problem hiding this comment.
@dukenv0307 It shouldn't offset atSignIndex right? Because it will offset the index of atSignIndex by 1 wrongly?
I also tested your concern and here is result if we remove the offer 1 from atSignIndex
Screen.Recording.2024-02-28.at.01.12.40.mov
There was a problem hiding this comment.
Got it. Thank you checking.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-28.at.12.14.08.AM.mp4Android: mWeb ChromeScreen.Recording.2024-02-28.at.12.15.51.AM.mp4iOS: NativeScreen.Recording.2024-02-28.at.12.11.12.AM.mp4iOS: mWeb SafariScreen.Recording.2024-02-28.at.12.19.30.AM.mp4MacOS: Chrome / SafariScreen.Recording.2024-02-27.at.11.54.14.PM.mp4MacOS: DesktopScreen.Recording.2024-02-27.at.11.58.05.PM.mp4 |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @youssef-lr / @puneetlath
🎀 👀 🎀
C+ Reviewed
fix: logic get sign index suggestion mention (cherry picked from commit 12d55fb)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/puneetlath in version: 1.4.44-6 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
Details
Fixed Issues
$ #37250
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios-mweb.mov
iOS: mWeb Safari
ios-.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov