Skip to content
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

Make the members view of rooms and expense chats consistent with groups #47201

Conversation

rayane-djouah
Copy link
Contributor

@rayane-djouah rayane-djouah commented Aug 11, 2024

Details

Fixed Issues

$ #46838
PROPOSAL: #46838 (comment)

Tests

  1. Sign in
  2. Create a new room
  3. Navigate to Details > “Members” of the room
  4. Verify that the list of members is displayed in a table style.
  5. Verify that tapping each user will navigate to a room member page for the user.
  6. Tap the checkbox next to a user different than the current
  7. Verify that the “X selected” button appears with a drop down selector.
  8. Verify that the button is a regular dropdown button and does not use a split button design
  9. Verify that the options show as “Remove members”
  10. Select a User and select “Remove members”
  11. Verify a warning appears and select Cancel
  12. Attempt to remove again and select “Remove”
  13. Verify the user is removed from the room
  14. Verify a message shows in the chat that the user is removed
  15. Tap “Invite member” button
  16. Verify that a list of potential members is shown
  17. Verify that the list is using the same style with the group members invite page
  18. Go back to room members list
  19. Tap the name of a member
  20. Verify that a room member page is displayed
  21. Verify that there is a “Remove from chat” button and a "Profile" menu item
  22. Select “Remove from chat”
  23. Verify a warning appears and dismiss
  24. Select again. Tap “Remove”
  25. Verify we are navigated back to the directory and user is removed.
  26. Using the checkbox select two members.
  27. Use the bulk action to remove them.
  28. On mobile Verify that checkboxes are not displayed and when we long press on a list item the select mode should be enabled.
  29. Verify that the selection mode works correctly on mobile
  30. Verify that clicking on the back button disables the selection mode on mobile.
  31. Verify that the search text input is displayed only when the number of members is 8 or greater
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Screen.Recording.2024-08-13.at.2.22.36.PM.mov
Android: mWeb Chrome
Screen.Recording.2024-08-13.at.2.17.29.PM.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-13.at.14.13.21.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-13.at.14.17.04.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-08-13.at.1.58.53.PM.1.mov
MacOS: Desktop
Screen.Recording.2024-08-13.at.2.25.08.PM.mov

@rayane-djouah rayane-djouah marked this pull request as ready for review August 11, 2024 17:06
@rayane-djouah rayane-djouah requested a review from a team as a code owner August 11, 2024 17:06
@melvin-bot melvin-bot bot requested a review from paultsimura August 11, 2024 17:06
Copy link

melvin-bot bot commented Aug 11, 2024

@paultsimura 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]

@melvin-bot melvin-bot bot removed the request for review from a team August 11, 2024 17:06
@rayane-djouah rayane-djouah marked this pull request as draft August 11, 2024 17:06
@rayane-djouah rayane-djouah changed the title Make the Room Members view of rooms and expense chats consistent with groups Make the members view of rooms and expense chats consistent with groups Aug 11, 2024
@rayane-djouah rayane-djouah marked this pull request as ready for review August 13, 2024 13:28
@rayane-djouah
Copy link
Contributor Author

@paultsimura @Expensify/design PR ready for review

@dannymcclain
Copy link
Contributor

I think this is looking pretty good, but watching the video has brought something else to my attention 🙈

It looks like the Invite flow is using the wrong style list still.

Group Invite (Staging) Room Invite (Staging)
CleanShot 2024-08-13 at 08 45 12@2x CleanShot 2024-08-13 at 08 46 10@2x

Ideally we'd use the same style list select from the Groups screenshot (left). @Expensify/design maybe that becomes a follow up issue though? Since this PR/Issue was really meant to be focused on the members view for rooms.

@paultsimura
Copy link
Contributor

maybe that becomes a follow up issue though?

We could also expand the scope of this issue and raise the bounty if @MariaHCD and @rayane-djouah would agree.

@shawnborton
Copy link
Contributor

Good find Danny. I'm down to do it here with an increased bounty or just as a follow up, whatever the group prefers. But either way, I agree we should definitely solve that inconsistency as well.

This comment has been minimized.

@shawnborton
Copy link
Contributor

This feels pretty good but I think it would be nice to add a little bit of space below the search input and above the table (where Select All starts):
CleanShot 2024-08-13 at 10 35 25@2x

Maybe even just increasing that gap by 12-20px would be helpful.

@shawnborton
Copy link
Contributor

Another thing I noticed is that the multi select button uses an older spit button pattern:
CleanShot 2024-08-13 at 10 39 11@2x

But we actually want those to use just a regular dropdown button, like so (this is from the Workspace Editor > Categories page):
CleanShot 2024-08-13 at 10 37 20@2x

I know that's not necessarily related to the original problem either, but perhaps we could add that in as well if we increase the bounty.

@dannymcclain
Copy link
Contributor

Agree with all of Shawn's callouts! (Going to be hunting down those split buttons for years 😆)

@paultsimura
Copy link
Contributor

Hey @rayane-djouah, I think we got a green light to incorporate more changes in this PR. Please ping me when it's ready for another look 🙏

@dubielzyk-expensify
Copy link
Contributor

Just to confirm, this doesn't apply to workspace chats and report chats? Cause I'm seeing a different members list there

@paultsimura
Copy link
Contributor

@rayane-djouah could you please change point 31 to this?

Verify that the search text input is displayed only when the number of members is 8 or greater

@paultsimura
Copy link
Contributor

@dubielzyk-expensify could you please share the screenshots of what's off? And the steps to reproduce (even vague ones) would be very helpful 🙏

@paultsimura
Copy link
Contributor

paultsimura commented Sep 5, 2024

This one is interesting:

  1. Have a Workspace chat
  2. Invite a new member to this chat
  • As an Admin, navigate to the chat header - members
    • The URL is /members, which opens a Room Members page
image
  • Clicking on the member, it shows a Member Details page with a "Remove from room" button. @shawnborton is it ok to say "room" here?
image
  • As an invited member, navigate to the chat header - members
    • The URL is /participants, which opens a Report Participants page
image

@shawnborton should we show the "member" table header on this page as well?

Copy link
Contributor

@MariaHCD MariaHCD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good overall! Looks like we might have some more design tweaks. I'll re-review once we address those.

src/CONST.ts Outdated
@@ -4104,6 +4107,11 @@ const CONST = {
*/
MAX_SELECTION_LIST_PAGE_LENGTH: 500,

/**
* We only include the members search bar when we hit 8 number of members
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* We only include the members search bar when we hit 8 number of members
* We only include the members search bar when we have 8 or more members

if (!personalDetails?.[accountID]) {
return false;
}
// When offline, we want to count in the pending members with delete action as they are displayed in the list as well
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// When offline, we want to count in the pending members with delete action as they are displayed in the list as well
// When offline, we want to include the pending members with delete action as they are displayed in the list as well

if (!personalDetails?.[accountID]) {
return false;
}
// When offline, we want to count in the pending members with delete action as they are displayed in the list as well
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// When offline, we want to count in the pending members with delete action as they are displayed in the list as well
// When offline, we want to include the pending members with delete action as they are displayed in the list as well

@shawnborton
Copy link
Contributor

should we show the "member" table header on this page as well?

Yes, that makes sense to me. Again, everything here should be as consistent as possible across the various room types.

@shawnborton
Copy link
Contributor

Clicking on the member, it shows a Member Details page with a "Remove from room" button. @shawnborton is it ok to say "room" here?

Hmm, I think so? I could see an argument to just simply say "Remove" or "Remove from chat" but I don't feel strongly. @Expensify/design or @trjExpensify @JmillsExpensify @jamesdeanexpensify any strong preference here?

@shawnborton
Copy link
Contributor

The URL is /participants, which opens a Report Participants page

It would be nice to standardize on just /members but I don't know the technical ramifications for making this change. I'd be happy to punt that for now.

@trjExpensify
Copy link
Contributor

Hmm, I think so? I could see an argument to just simply say "Remove" or "Remove from chat" but I don't feel strongly. @Expensify/design or @trjExpensify @JmillsExpensify @jamesdeanexpensify any strong preference here?

Not really a strong preference, but Remove from chat would work for all "chat types", so I like that. We also have Remove from workspace mirroring that.

@dannymcclain
Copy link
Contributor

Not really a strong preference, but Remove from chat would work for all "chat types", so I like that. We also have Remove from workspace mirroring that.

I like this idea too, but I also don't have a super strong preference.

@shawnborton
Copy link
Contributor

Remove from chat definitely works though I can see where it feels confusing to remove a user from a "chat" when you are actually viewing an expense or report. I don't feel strongly though, I think "Remove from chat" is better than "Remove from room" though as it's a bit more versatile. But I think part of me wants to just use "Remove" for simplicity's sake.

@jamesdeanexpensify
Copy link
Contributor

Yeah wow this is a toughie. I like Remove for simplicity, and Remove from chat for clarity. I do think expense and report "chatting" are going to be a relative new concept we're introducing, so maybe we should push it here actually as the value-add that it is (subtly, with language) by including from chat. I could also go either way, just trying to bring out some more reasoning.

@paultsimura
Copy link
Contributor

@rayane-djouah please address the requested code changes as well as the following:

@rayane-djouah
Copy link
Contributor Author

Updated

Copy link
Contributor

@paultsimura paultsimura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✔️

@melvin-bot melvin-bot bot requested a review from MariaHCD September 9, 2024 11:51
@paultsimura
Copy link
Contributor

paultsimura commented Sep 9, 2024

@shawnborton we've changed the "Remove from room" to "Remove from chat":
image


Also, added the "member" header to non-group member lists:
image

@shawnborton
Copy link
Contributor

Looks good to me! Thanks for making the changes.

@rayane-djouah
Copy link
Contributor Author

@MariaHCD all yours!

Copy link
Contributor

@MariaHCD MariaHCD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@MariaHCD MariaHCD merged commit 1fcba07 into Expensify:main Sep 9, 2024
16 checks passed
@rayane-djouah rayane-djouah deleted the make-room-members-view-consistent-with-groups-and-reports branch September 9, 2024 13:27
@OSBotify
Copy link
Contributor

OSBotify commented Sep 9, 2024

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants