-
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
fix: Chat - App displays mention suggestion for sometime when we remove spaces before #29957
fix: Chat - App displays mention suggestion for sometime when we remove spaces before #29957
Conversation
@cubuspl42 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] |
Lint issues |
My bad, fixed. |
Hey @cubuspl42, did you have any luck getting this tested/reviewed? |
@@ -233,8 +235,15 @@ function SuggestionMention({ | |||
); | |||
|
|||
useEffect(() => { | |||
if (value.length < previousValue.length) { | |||
// A workaround to not show the suggestions list when the user deletes a character before the mention. | |||
// It is caused by a buggy behavior of the TextInput on iOS. Should be fixed after migration to the Fabric Arc. |
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.
Arc -> Arch (or just "Fabric")
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.
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.
calculateMentionSuggestion(selection.end); | ||
}, [selection, calculateMentionSuggestion]); | ||
}, [selection, value, previousValue, calculateMentionSuggestion]); |
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.
Both value
and previousValue
are necessary, right?
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.
I would omit both values from dependencies, but in that case, we get a lint error – it requires both to be present
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.
Oh, sure. The truth is that we opt-out quite often from that lint... In this case I would go whichever path is less likely to create another regression...
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.
I agree with you @cubuspl42, we should follow the path that is less likely to create another regression.
We are over 1000 commits behind Even if there are no Git conflicts on the textual level, such diversion can:
|
Reviewer Checklist
Screenshots/VideosWebfix-suggestions-remove-space-again-web.mp4Mobile Web - Chromefix-suggestions-remove-space-again-android-web-compressed.mp4Mobile Web - Safarifix-suggestions-remove-space-again-ios-web.mp4DesktopiOSfix-suggestions-remove-space-again-ios.mp4Androidfix-suggestions-remove-space-again-android-compressed.mp4 |
@lakchote This is our second try, as previously, we reverted the changes because of a regression caused by a tricky iOS React Native bug. |
✋ 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/lakchote in version: 1.3.90-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.90-2 🚀
|
🚀 Deployed to staging by https://github.com/lakchote in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
Details
This is a workaround to stop the suggestions list from showing on the removal of symbols before the "@".
The original idea caused a regression, so we have to go with a workaround until the migration to the Fabric Architecture.
Fixed Issues
$ #28170
PROPOSAL: #28170 (comment)
Tests
Same as QA.
Offline tests
Same as QA.
QA Steps
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
web.mp4
Mobile Web - Chrome
mWeb.mp4
Mobile Web - Safari
video_2023-10-02_09-29-41.mp4
Desktop
desktop.mov
iOS
Simulator.Screen.Recording.-.iPhone.15.-.2023-10-19.at.13.16.32.mov
Android
android.mov