Closed kbecciv closed 1 year ago
Triggered auto assignment to @joekaufmanexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)In new task page, share destination doesn't have subtitle text for 1 to 1 DM and group chat
Root cause of the issue is that in our NewTaskPage
, for the shareDestination
object, subtitle
field is empty
And in description we are displaying subtitle of the object here
Now the subtitle field is originating from TaskUtils.getShareDestination
> ReportUtils.getChatRoomSubtitle
And in getChatRoomSubtitle
method we don't have any condition to catch DMs or group chats
And all such reports get caught in this if block
Thus subtitle is empty and we don't see it on share destination menu item
We need an extra if block to catch DMs and we can determine them by checking the report type, report's chatType and participants length before the other if block mentioned above in RCA.
if (isChatReport(report) && getChatType(report) === '' && report.participants && report.participants.length === 1) {
return report.participants[0];
}
This works because DMs don't have a chat type as per our code definitions here
NOTE: In slack conversation, its decided to show no subtitle for group chats, if expected results change later, then we can alter the condition on participants array
None
Task Share somewhere field does not show subtitle text for a non-room chat.
Currently, the subtitle comes from ReportUtils.getChatRoomSubtitle
. As the name suggests, the function will return a subtitle for chat room.
https://github.com/Expensify/App/blob/7ceaf0eae17a671927e2a91d44492845442f4b0f/src/libs/actions/Task.js#L566
The function is useful to show a subtitle in the report header.
If we expect the Share somewhere field to have the same subtitle as it is on the selector page, then we should use the same logic. Maybe we can create a new function, OptionsListUtils.getOptionAlternateText
.
https://github.com/Expensify/App/blob/680dccf863e59fd67057dbfa4dcf5b8fe8052b84/src/libs/OptionsListUtils.js#L498-L510
(this is the selector page)
Reproduced.
Job added to Upwork: https://www.upwork.com/jobs/~014fbeac64e9814e82
Current assignee @joekaufmanexpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Pending review of proposal.
@eVoloshchak Could you take a look at this proposal when you have a sec?
@kbecciv's proposal looks good to me!
πππ C+ reviewed! cc: @joekaufmanexpensify
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
It's actually mine, I'm the reporter and @kbecciv pasted my proposal from slack
@eVoloshchak
Just want to point out that we shouldn't add the condition to getChatRoomSubtitle
. As the name suggests, it's to get the subtitle of a room, otherwise, we will start to see email below the 1:1 chat display name
Nice find @bernhardoj You're right it will create an inconsistency
Although I have one question, why are we not showing subtitle for 1:1 chat dm? Isn't it already inconsistent with other chat reports headers @shawnborton ? If this is expected then we should go with @bernhardoj 's proposal
EDIT: the other proposal will also add subtitle to the group chat which is not the desired case.
We could take the if condition out of getChatRoomSubtitle()
so that it does not affect everywhere it's used and we can apply the condition only in shareDestination file!
Can't update my proposal so mentioned here!!
I dont think we should worry about the chat report headers here, let's just solve the inconsistency in the share destination row.
Waiting for sign off on the proposal from @bondydaa
I'm a little confused now...
I dont think we should worry about the chat report headers here
@shawnborton it sounds like if we with https://github.com/Expensify/App/issues/22296#issuecomment-1622319103 it's going to add the contact method to the chat report header as shown in this comment https://github.com/Expensify/App/issues/22296#issuecomment-1631799399.
Are you saying that is fine or that we should leave chat report headers alone and not change them?
I'm saying we can add the subheader in the share destination but let's not change how we display the report header for a 1:1 DM
okay cool that's what I thought, thanks for clarifying.
Then I don't think we should go with https://github.com/Expensify/App/issues/22296#issuecomment-1622319103 since that would change the report headers for 1:1 DMs, right?
@eVoloshchak are you good with https://github.com/Expensify/App/issues/22296#issuecomment-1623916868 then as I believe it's suggesting it'd only show the contact method in the selector and new task page?
Nice find @bernhardoj You're right it will create an inconsistency
Although I have one question, why are we not showing subtitle for 1:1 chat dm? Isn't it already inconsistent with other chat reports headers @shawnborton ? If this is expected then we should go with @bernhardoj 's proposal
EDIT: the other proposal will also add subtitle to the group chat which is not the desired case.
We could take the if condition out of
getChatRoomSubtitle()
so that it does not affect everywhere it's used and we can apply the condition only in shareDestination file!Can't update my proposal so mentioned here!!
@bondydaa pls see the edit
https://github.com/Expensify/App/issues/22296#issuecomment-1631930344 is what confused me...
so "the other proposal" in that that comment is https://github.com/Expensify/App/issues/22296#issuecomment-1623916868?
Could you create a new proposal that states how we can only fix this for the share destination and not change the report headers?
In new task page, share destination doesn't have subtitle text for 1 to 1 DM and group chat
Root cause of the issue is that in our NewTaskPage
, for the shareDestination
object, subtitle
field is empty
And in description we are displaying subtitle of the object here
Now the subtitle field is originating from TaskUtils.getShareDestination
> ReportUtils.getChatRoomSubtitle
And in getChatRoomSubtitle
method we don't have any condition to catch DMs or group chats
And all such reports get caught in this if block
Thus subtitle is empty and we don't see it on share destination menu item
We need to perform an additional check to catch DMs and we can determine them by checking the report type, report's chatType and participants length.
if (isChatReport(report) && isDM(report) && report.participants && report.participants.length === 1) {
return report.participants[0];
}
But we shall not perform this check in the ReportUtils.getChatRoomSubtitle()
since that method is being used in a lot of places and it will return the subtitle for other places too where we don't need it.
So we can perform this check in TaskUtils.getShareDestination()
which is a util specific for our case. This essentially means the following changes
Replacing the above with
function getShareDestination(reportID, reports, personalDetails) {
const report = lodashGet(reports, `report_${reportID}`, {});
let subtitle = '';
if(ReportUtils.isChatReport(report) && ReportUtils.isDM(report) && report.participants && report.participants.length === 1) {
subtitle = report.participants[0];
}
else subtitle = ReportUtils.getChatRoomSubtitle(report);
return {
icons: ReportUtils.getIcons(report, personalDetails, Expensicons.FallbackAvatar, ReportUtils.isIOUReport(report)),
displayName: ReportUtils.getReportName(report),
subtitle,
};
}
NOTE: In slack conversation, its decided to show no subtitle for group chats, if expected results change later, then we can alter the condition on participants array
None
Here's it @bondydaa @eVoloshchak
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Close to selecting a proposal here.
Awesome thanks for that, seems good to me @eVoloshchak your thoughts?
@eVoloshchak here's my updated proposal https://github.com/Expensify/App/issues/22296#issuecomment-1633898931
Pending review of updated proposal
Same
bumped @eVoloshchak on slack.
The updated proposal looks good to me, let's proceed with the PR!
πππ C+ reviewed!
Current assignee @bondydaa is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
@bondydaa We're all set to assign the contributor here, right?
π£ @eVoloshchak Please request via NewDot manual requests for the Reviewer role ($1000)
π£ @chiragxarora π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
π£ @chiragxarora π An offer has been automatically sent to your Upwork account for the Reporter role π Thanks for contributing to the Expensify app!
PR https://github.com/Expensify/App/pull/23159 is ready for review @eVoloshchak
Pending pr review from @bondydaa
merged
This added the regression https://github.com/Expensify/App/issues/23583, could you guys take a look? Will assign you both to the issue
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.45-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-02. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
@eVoloshchak Could you please complete your portion of the BZ checklist here so we can prep to issue payment in a few days?
Regression Test Proposal
Do we agree π or π
Great, thanks! I'll create a regression test issue now.
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Selected share destination should have subtitle (contact method) shown below the user's display name
Actual Result:
Selected share destination does not have subtitle (contact method) shown below the user's display name for 1:1 DMs.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.36.4 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/8b4d0116-0355-4e29-957f-154e568b8819
Expensify/Expensify Issue URL: Issue reported by: @chiragxarora Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688485210604909
View all open jobs on GitHub
Upwork Automation - Do Not Edit