Repository navigation
[HOLD for payment 2024-12-19] [$250] Preferences - When changing language, message about removed users is not changed in LHN #52775
Description
Activity
- addedDailyKSv2KSv2BugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Nov 19, 2024 Triggered auto assignment to @stephanieelliott (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Edited by proposal-police: This proposal was edited at 2024-12-04 03:51:21 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Message about removed members of a group in chat preview on LHN, is not updated to the language change.
What is the root cause of that problem?
We already have a case for
REMOVEFROMROOMaction withisInviteOrRemovedActioncheck here.Lines 437 to 439 in 9268594
} else if (ReportActionsUtils.isInviteOrRemovedAction(lastAction)) { const lastActionOriginalMessage = lastAction?.actionName ? ReportActionsUtils.getOriginalMessage(lastAction) : null; const targetAccountIDs = lastActionOriginalMessage?.targetAccountIDs ?? []; But the group chat report doesn't move to this block because this condition here
Line 430 in 9268594
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.private_isArchived) { What changes do you think we should make in order to solve the problem?
We should add a case for a group chat report here
const isGroupChat = ReportUtils.isGroupChat(report) || ReportUtils.isDeprecatedGroupDM(report); if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage || isGroupChat) && !result.private_isArchived) {Line 430 in 9268594
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.private_isArchived) { What alternative solutions did you explore? (Optional)
Edited by proposal-police: This proposal was edited at 2024-11-19 16:29:32 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Preferences - When changing language, message about removed users is not changed in LHN
What is the root cause of that problem?
We are displaying a properly constructed and translated text in
ReportActionItemMessagehere
if (ReportActionsUtils.isMemberChangeAction(action)) {
But we have forgotten to make the same translation in two places by handlingisInviteOrRemovedActioncase specifically- In LHN: Although we are handling the case for
isInviteOrRemovedActionhere
Lines 437 to 438 in 14ca237
} else if (ReportActionsUtils.isInviteOrRemovedAction(lastAction)) { const lastActionOriginalMessage = lastAction?.actionName ? ReportActionsUtils.getOriginalMessage(lastAction) : null;
It will not reach it as we haven't included isGroupChat condition here
Line 430 in 14ca237
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.private_isArchived) { - In chat thread header title: if we create a thread with the removed system action the chat thread report header title will not have the proper translated text matching with the report action itself as we didn't handle the case in getReportName here as we did for other exceptional report action cases
Line 4006 in 14ca237
if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isModifiedExpenseAction(parentReportAction)) {
What changes do you think we should make in order to solve the problem?
- We can add the
isGroupChatcondition in here but I don't think we want to allow group chat reports case to pass through the unwanted code section that we are now avoiding currently for group chats so we should add isGroupChat condition and only for this specific case of isInviteOrRemovedAction here
Line 430 in 14ca237
if ((result.isChatRoom || result.isPolicyExpenseChat || result.isThread || result.isTaskReport || isThreadMessage) && !result.private_isArchived) {
... result.isTaskReport || ((ReportUtils.isGroupChat(report) || ReportUtils.isDeprecatedGroupDM(report)) && ReportActionsUtils.isInviteOrRemovedAction(lastAction)) || isThreadMessage) ...But if we are ok with passing through the code section we will also need to move the code that precedes it with
lastActorDisplayNamefor group chat case from here to here
2. We should handle theisInviteOrRemovedActionin getReportName here
Line 4006 in 14ca237
if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isModifiedExpenseAction(parentReportAction)) { if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isMemberChangeAction(parentReportAction)) { const elemets = ReportActionsUtils.getMemberChangeMessageElements(parentReportAction); const actionMessage = elemets.map((element) => element.content).join(''); return formatReportLastMessageText(actionMessage); }we can also optionally parse
Parser.htmlToTextwhat is returned fromReportActionsUtils.getMemberChangeMessageFragment(action).htmlWhat alternative solutions did you explore? (Optional)
- In LHN: Although we are handling the case for
Tested and confirmed that the language on system messages should update
- addedExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
on Nov 22, 2024 Job added to Upwork: https://www.upwork.com/jobs/~021859794304218279153
- changed the title
[-]Preferences - When changing language, message about removed users is not changed in LHN[/-][+][$250] Preferences - When changing language, message about removed users is not changed in LHN[/+]on Nov 22, 2024 - addedHelp WantedApply this label when an issue is open to proposals by contributorsApply this label when an issue is open to proposals by contributors
on Nov 22, 2024 Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (
External)and handle this case here
Why do we need to handle this case here? If we move
isGroupChattoifblock, it will be false inelseblock. Please correct me if I miss sthI don't think we want to allow group chat reports case to pass through the unwanted code section that we are now avoiding currently for group chats
Can you show me the reason why we are doing that?
@dukenv0307 For group chat, we want to show the
lastActorDisplayNamewith thelastMessageTextthen we need to update the condition handle this case as well for group chat.Another note: Add group chat to this case will be safe because some actions are handled the same with
getLastMessageTextForReportand some other actions don't exist in group chat43 remaining items
@marcochavezf, @stephanieelliott, @dukenv0307, @mkzie2 Eep! 4 days overdue now. Issues have feelings too...
@marcochavezf, @stephanieelliott, @dukenv0307, @mkzie2 Still overdue 6 days?! Let's take care of this!
@marcochavezf, @stephanieelliott, @dukenv0307, @mkzie2 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@marcochavezf, @stephanieelliott, @dukenv0307, @mkzie2 12 days overdue. Walking. Toward. The. Light...
This issue has not been updated in over 14 days. @marcochavezf, @stephanieelliott, @dukenv0307, @mkzie2 eroding to Weekly issue.
Summarizing payment on this issue:
- Contributor: @mkzie2 $250 via Upwork -- PAID
- Contributor+: @dukenv0307 $250 via ND -- please request!
Upwork job is here: https://www.upwork.com/jobs/~021859794304218279153
@stephanieelliott mind updating that summary with the amount please? In the meantime, $250 approved for @dukenv0307.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.64-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: 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/5242214&group_by=cases:section_id&group_order=asc&group_id=229064
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
When changing language to spanish, the system message showing the action of removing group members and the preview of the chat on LHN, should be updated to this change.
Actual Result:
Message about removed members of a group in chat preview on LHN, is not updated to the language change.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6669579_1732026214491.Removed.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @stephanieelliott