App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2024-12-09] [$250] BUG: "Members" section of #admins room doesn't have room name near the top like other rooms

Open jamesdeanexpensify opened this issue 1 year ago β€’ 25 comments

Details

Coming from this convo, I noticed that when you go into any #admins room and click into the Members section, near the top it doesn't show the room name:

image

In any other room, it does:

image

cc @Expensify/design

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021859707716941961146
  • Upwork Job ID: 1859707716941961146
  • Last Price Increase: 2024-11-21
  • Automatic offers:
    • Krishna2323 | Contributor | 105068916
Issue OwnerCurrent Issue Owner: @OfstadC

jamesdeanexpensify avatar Nov 21 '24 20:11 jamesdeanexpensify

Triggered auto assignment to @OfstadC (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.

melvin-bot[bot] avatar Nov 21 '24 20:11 melvin-bot[bot]

Proposal


Please re-state the problem that we are trying to solve in this issue.

BUG: "Members" section of #admins room doesn't have room name near the top like other rooms

What is the root cause of that problem?

  • Subtitle is not passed to HeaderWithBackButton. https://github.com/Expensify/App/blob/93f7874ddc9258d7481b1f2257a80c66c8d283dc/src/pages/ReportParticipantsPage.tsx#L367-L382

What changes do you think we should make in order to solve the problem?


Pass subtitle={StringUtils.lineBreaksToSpaces(ReportUtils.getReportName(report))} to HeaderWithBackButton.

What alternative solutions did you explore? (Optional)

Result

Krishna2323 avatar Nov 21 '24 21:11 Krishna2323

Job added to Upwork: https://www.upwork.com/jobs/~021859707716941961146

melvin-bot[bot] avatar Nov 21 '24 21:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @dukenv0307 (External)

melvin-bot[bot] avatar Nov 21 '24 21:11 melvin-bot[bot]

Edited by proposal-police: This proposal was edited at 2024-11-21 21:15:47 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

BUG: "Members" section of #admins room doesn't have room name near the top like other rooms

What is the root cause of that problem?

We haven't given the report name as subtitle to HeaderWithBackButton https://github.com/Expensify/App/blob/e9e18573960d492a29b2563237024f0dc3c37f85/src/pages/ReportParticipantsPage.tsx#L368

What changes do you think we should make in order to solve the problem?

We can give the report name as the subtitle for default rooms

                    subtitle={ReportUtils.isDefaultRoom(report) ? StringUtils.lineBreaksToSpaces(ReportUtils.getReportName(report)) : undefined}

If we want we can do the same for isGroupChat too

What alternative solutions did you explore? (Optional)

We can optionally apply it to isAdminRoom only if we want (or even isAnnounceRoom) or may be isGroupChat case too but for other case as iou reports expense reports etc... we surely don't want to show the names

FitseTLT avatar Nov 21 '24 21:11 FitseTLT

Edited by proposal-police: This proposal was edited at 2024-11-22 11:11:34 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

"Members" section of #admins room doesn't have room name near the top like other rooms

What is the root cause of that problem?

For the chat room, the member page is in RoomMembersPage and we have a subtitle in the header is the room name here

https://github.com/Expensify/App/blob/686b8b45ca606453e4b8a5f11e2a16e75dd0b15d/src/pages/RoomMembersPage.tsx#L356

For other reports, the member page is in ReportParticipantsPage and we don't pass subtitle prop to HeaderWithBackButton then no report name section is displayed

https://github.com/Expensify/App/blob/686b8b45ca606453e4b8a5f11e2a16e75dd0b15d/src/pages/ReportParticipantsPage.tsx#L367

What changes do you think we should make in order to solve the problem?

The default room exists for all workspaces so I think we can display the subtitle with the workspace name, it's more useful for the user to know

  1. We can get the additional detail like here and because we only want to display it for the default room of the workspace, we can only get the case in ${chatRoomSubtitle}
const chatRoomSubtitle = useMemo(() => ReportUtils.getChatRoomSubtitle(report), [report, policy]);
const additionalRoomDetails = `${translate('threads.in')} ${chatRoomSubtitle}`;

  1. Pass subtitle prop here
subtitle={ReportUtils.isDefaultRoom(report) ? `${StringUtils.lineBreaksToSpaces(ReportUtils.getReportName(report))} ${additionalRoomDetails}` : ''}

https://github.com/Expensify/App/blob/686b8b45ca606453e4b8a5f11e2a16e75dd0b15d/src/pages/ReportParticipantsPage.tsx#L367

Optional: We can do the same for the chat room member page in RoomMembersPage

What alternative solutions did you explore? (Optional)

We can apply the main solution for only special reports that we want like admin, and announce or for report with isChatRoom is true.

We can also apply the main solution for other reports like group chat, ... but we will only display the report name in this case

Result

Screenshot 2024-11-22 at 12 06 45

mkzie2 avatar Nov 22 '24 05:11 mkzie2

@dubielzyk-expensify What do you think about my result above? Display #admin with workspace is more useful for the user to know the workspace of this admin room when visiting the member page.

mkzie2 avatar Nov 22 '24 05:11 mkzie2

That looks pretty good to me πŸ‘ I think the idea is here we want to be consistent and apply it everywhere, not just certain rooms.

shawnborton avatar Nov 22 '24 11:11 shawnborton

If it follows the pattern of all the other rooms, I think it would exclude the workspace name, right?

jamesdeanexpensify avatar Nov 22 '24 16:11 jamesdeanexpensify

If it follows the pattern of all the other rooms, I think it would exclude the workspace name, right?

Yes

FitseTLT avatar Nov 22 '24 16:11 FitseTLT

@shawnborton @jamesdeanexpensify

For the confirmation here

That looks pretty good to me πŸ‘ I think the idea is here we want to be consistent and apply it everywhere, not just certain rooms.

we want to apply this change for other room (group, ...), not just default room (admin, announce)

Another problem: Should we show #admin for all admin rooms? Or #admin in WS?

For the normal room, we're showing the room name (without WS) as a subtitle, and each room has a different name -> that would be fine

Screenshot 2024-11-23 at 00 19 53

But if we do the same for admin rooms, #admin will be shown -> This name is not really useful to me.

dukenv0307 avatar Nov 22 '24 17:11 dukenv0307

Another problem: Should we show #admin for all admin rooms? Or #admin in WS?

I think whatever we do, we should try to be consistent. So I think I would opt to just just show the name of the room as it would be shown in the LHN.

shawnborton avatar Nov 22 '24 17:11 shawnborton

I think whatever we do, we should try to be consistent. So I think I would opt to just just show the name of the room as it would be shown in the LHN

Same. I'm down to start with showing it exactly as it shows in the LHN. And if we find that that's not enough, we can adjust further.

dannymcclain avatar Nov 22 '24 17:11 dannymcclain

Let's go with @Krishna2323's proposal since we should try to be consistent.

  • iou report
Screenshot 2024-11-24 at 14 45 32
  • group chat
Screenshot 2024-11-24 at 14 45 53
  • admin room
Screenshot 2024-11-24 at 14 46 31
  • announce room
Screenshot 2024-11-24 at 14 46 44

πŸŽ€πŸ‘€πŸŽ€ C+ reviewed

dukenv0307 avatar Nov 24 '24 07:11 dukenv0307

Current assignee @marcaaron is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 24 '24 07:11 melvin-bot[bot]

@jamesdeanexpensify @shawnborton please check out the result the reviewer has shown above. I think there is a misunderstanding the purpose of the original OP was to make default rooms consistent with other user created policy rooms. Wasn't it? not for all iou reports and so on.

FitseTLT avatar Nov 24 '24 08:11 FitseTLT

Agree with the people above. I'm not sure I'd bring it to IOUs, but other than that the above looks good to me. Happy to lean on what others think here if we also think we should have it on IOUs. I don't think it's a big deal if we do, then at least it's consistent across the board

dubielzyk-expensify avatar Nov 25 '24 04:11 dubielzyk-expensify

Yeah, I think I lean on just always using it everywhere for the sake of consistency. I don't feel strongly though, but I think I would lean that direction instead of making exceptions for certain room types.

shawnborton avatar Nov 25 '24 13:11 shawnborton

Yeah, I think I lean on just always using it everywhere for the sake of consistency.

+1. I also don't feel strongly, but I don't mind using it everywhere out of consistency. I don't think it does any harm being there.

dannymcclain avatar Nov 25 '24 14:11 dannymcclain

πŸ“£ @Krishna2323 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link 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 πŸ“–

melvin-bot[bot] avatar Nov 26 '24 00:11 melvin-bot[bot]

@dukenv0307 PR ready for review ^

Krishna2323 avatar Nov 26 '24 04:11 Krishna2323

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Dec 02 '24 21:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.69-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/53110

If no regressions arise, payment will be issued on 2024-12-09. :confetti_ball:

For reference, here are some details about the assignees on this issue:

  • @Krishna2323 requires payment automatic offer (Contributor)
  • @dukenv0307 requires payment through NewDot Manual Requests

melvin-bot[bot] avatar Dec 02 '24 21:12 melvin-bot[bot]

@dukenv0307 @OfstadC @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

melvin-bot[bot] avatar Dec 02 '24 21:12 melvin-bot[bot]

@dukenv0307 Please complete checklist before payment date. Thank you πŸ˜ƒ

OfstadC avatar Dec 06 '24 21:12 OfstadC

BugZero Checklist:

  • [x] [Contributor] Classify the bug:
Bug classification

Source of bug:

  • [ ] 1a. Result of the original design (eg. a case wasn't considered)
  • [x] 1b. Mistake during implementation
  • [ ] 1c. Backend bug
  • [ ] 1z. Other:

Where bug was reported:

  • [x] 2a. Reported on production
  • [ ] 2b. Reported on staging (deploy blocker)
  • [ ] 2c. Reported on a PR
  • [ ] 2z. Other:

Who reported the bug:

  • [ ] 3a. Expensify user
  • [ ] 3b. Expensify employee
  • [ ] 3c. Contributor
  • [x] 3d. QA
  • [ ] 3z. Other:
  • [x] [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

    Link to comment: This is new requirement so we don't need offending PR.

  • [x] [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

    Link to discussion: N/A

  • [x] [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes

Regression Test Proposal Template
  • [X] [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue: https://github.com/Expensify/Expensify/issues/451670

Regression Test Proposal

Test:

  1. Go to workspace admins room
  2. Click on header > click on members
  3. Verify subtitle #admins is shown in the header
  4. Go to workspace announce room
  5. Click on header > click on members
  6. Verify subtitle #announce is shown in the header

Do we agree πŸ‘ or πŸ‘Ž

dukenv0307 avatar Dec 07 '24 03:12 dukenv0307

@OfstadC I completed

dukenv0307 avatar Dec 07 '24 03:12 dukenv0307

Payment Summary

  • @Krishna2323 paid $250 via Upwork
  • @dukenv0307 due $250 via manual NewDot Request

OfstadC avatar Dec 09 '24 16:12 OfstadC

$250 approved for @dukenv0307

JmillsExpensify avatar Dec 16 '24 11:12 JmillsExpensify