-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$500] Compose - The list of users in mentions does not disappear when using the Shift+Enter #35518
Comments
Job added to Upwork: https://www.upwork.com/jobs/~015d7b4a51ced33c18 |
Triggered auto assignment to @zanyrenney ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
We think that this bug might be related to #vip-vsb |
ProposalPlease re-state the problem that we are trying to solve in this issue.Compose - The list of users in mentions does not disappear when using the Shift+Enter What is the root cause of that problem?When we have both display name and login and when we check App/src/pages/home/report/ReportActionCompose/SuggestionMention.js Lines 153 to 157 in 995902a
What changes do you think we should make in order to solve the problem?We should update the if check here to return false if we have a empty string at the end, we can modify it like: if ((searchValue && !displayText.toLowerCase().includes(searchValue.toLowerCase())) || searchValue.endsWith(' ')) {return
false;
} Or we can modify the code here: App/src/pages/home/report/ReportActionCompose/SuggestionMention.js Lines 226 to 239 in 995902a
When the prefix contains empty string at the end, will will set only set if (!isCursorBeforeTheMention && isMentionCode(suggestionWord)) {
if (prefix && !prefix.endsWith(' ')) {
const suggestions = getMentionOptions(personalDetails, prefix);
nextState.suggestedMentions = suggestions;
nextState.shouldShowSuggestionMenu = !_.isEmpty(suggestions);
} else {
nextState.shouldShowSuggestionMenu = false;
}
} We can also check like this by using App/src/pages/home/report/ReportActionCompose/SuggestionMention.js Lines 203 to 204 in 995902a
Resultmentions_list_demo.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Compose - The list of users in mentions does not disappear when using the Shift+Enter What is the root cause of that problem?We are not handling App/src/pages/home/report/ReportActionCompose/SuggestionMention.js Lines 110 to 126 in 995902a
What changes do you think we should make in order to solve the problem?Just like how we handled the
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The list of users in mentions does not disappear when using the Shift+Enter keyboard shortcut. What is the root cause of that problem?In here, we're using the Let's say we have this text
( This is not right because the user is on a new line, and that line only, should be considered for mentions, this is consistent with what Slack does. What changes do you think we should make in order to solve the problem?In here, we process the So let's say this text:
(The This can be done by finding the index of the last new line (
What alternative solutions did you explore? (Optional)In here, do not set the
(Besides ResultScreen.Recording.2024-02-01.at.11.28.19.AM.mov |
Will work on review today |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
did you review yet please @abdulrahuman5196 |
bump @abdulrahuman5196 |
Hi, Sorry for the delay reviewing now |
The issue can be reproduced with any mentions like |
@abdulrahuman5196 @zanyrenney this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
hey @abdulrahuman5196 have you been able to look into this in more detail? And review the proposal you think is viable? |
ProposalPlease re-state the problem that we are trying to solve in this issue.When a username with a space is partially typed and followed by Shift + Enter to insert a newline, the mention composer doesn't close as expected. What is the root cause of that problem?The root cause is the regular expression used to detect spaces (including newlines) as part of the mention detection logic. This regex incorrectly includes newlines Lines 1493 to 1495 in fe4aace
What changes do you think we should make in order to solve the problem?Modify the regex so that it matches only spaces and tabs, not newlines, ensuring the mention composer closes correctly upon newline insertion. get SPACE_OR_EMOJI() {
return new RegExp(`([ \\t]+|(?:${this.EMOJI.source})+)`, 'gu');
}, OR we can only check for spaces as currently we do not have the tab character enabled in the composer get SPACE_OR_EMOJI() {
return new RegExp(`( +|(?:${this.EMOJI.source})+)`, 'gu');
} other solutions could be found here as well --> https://stackoverflow.com/questions/3583111/regular-expression-find-spaces-tabs-space-but-not-newlines finally, we need to remove the /n from the matching in case the user types a const replacedWords = _.map(words, (word) => word.replace(/\n@/g, '@'));
const lastWord = _.last(replacedWords);
const secondToLastWord = replacedWords[replacedWords.length - 3]; |
Coming from this issue #36617 please let me know what you think about my proposal @abdulrahuman5196 |
bump @abdulrahuman5196 |
I would still recommend the proposal already approved here #35518 (comment) which seems to be better and effective solution. |
FYI: Just to make sure its visible. |
📣 @abdulrahuman5196 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Waiting on PR |
@abdulrahuman5196 The PR is ready for review. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Doesn't seem to be regression. It was the same case for sometime.
Yes.
@zanyrenney Completed checklist and this issue is on payment due for 7th March. Seems melvin didn't update here. |
@zanyrenney Bump on the above. Seems this issue is pending for 2 weeks. |
I've been OOO since payment was due. I will take a look now. |
@abdulrahuman5196 you ended the contract ? If payment was still due, you've now made it impossible for me to pay through the correct workflow 😅 |
payment summary: @abdulrahuman5196 you have ended the contract so not sure how you wanted / expected me to pay? |
@zanyrenney Sorry, could have ended it by mistake. I applied again - https://www.upwork.com/ab/proposals/1775141076017627137?success |
Using a bonus as payment as easier than restarting a new contract paid @abdulrahuman5196 $500 through Upwork. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.34-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4257656
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause- Internal Team
Slack conversation:
Action Performed:
Expected Result:
When using the Shift+Enter keyboard shortcut, the list of users should disappear or remain above the Compose Box and not overlap it
Actual Result:
The list of users in mentions does not disappear when using the Shift+Enter keyboard shortcut.
Workaround:
Unknow
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6362877_1706734190033.Recording__1240.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: