Skip to content

Remove Send money from workspace chats#14987

Merged
luacmartins merged 2 commits intomainfrom
cmartins-rmSendMoneyFromWorkspace
Feb 10, 2023
Merged

Remove Send money from workspace chats#14987
luacmartins merged 2 commits intomainfrom
cmartins-rmSendMoneyFromWorkspace

Conversation

@luacmartins
Copy link
Copy Markdown
Contributor

Details

Remove the Send money option from Workspace chats

Fixed Issues

$ #14865

Tests

  1. Create a workspace + > New workspace
  2. Invite other users to it Settings > Workspace > Manage members > Invite
  3. In the workspace chat with one of the members, tap the + icon in the compose box
  4. Verify that Send money is not an option, but that you can see Add attachment and Request money
  5. Open the 1:1 DM chat with the user and tap the + icon in the composer box
  6. Verify that you see the Add attachment, Request money and Send money options
  7. Open a group chat with at least 3 participants and tap the + icon in the composer box
  8. Verify that you see the Add attachment and Split bill options
  • Verify that no errors appear in the JS console

Offline tests

Same as test steps

QA Steps

Same as test steps

  • 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 / Chrome
    • iOS / native
    • iOS / 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 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 correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • 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 a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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(themeColors.componentBG)
  • 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 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.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
web.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov

@luacmartins luacmartins self-assigned this Feb 9, 2023
@luacmartins luacmartins marked this pull request as ready for review February 9, 2023 14:06
@luacmartins luacmartins requested a review from a team as a code owner February 9, 2023 14:06
@melvin-bot melvin-bot Bot requested review from 0xmiroslav and sketchydroide and removed request for a team February 9, 2023 14:06
@MelvinBot
Copy link
Copy Markdown
Contributor

@0xmiroslav @sketchydroide One of you needs to 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]

@0xmiroslav
Copy link
Copy Markdown
Contributor

I will review in a few hrs

@0xmiroslav
Copy link
Copy Markdown
Contributor

0xmiroslav commented Feb 10, 2023

@luacmartins I was not able to test workspace chat. This video has some weird issues:

bug.mp4
  • Onyx console error after opening workspace chat detail
  • Workspace chat shows after new workspace created and invited others but invited members not showing in workspace members page. And then after logout and re-login, workspace chat disappears from LHN. Not sure how to recover that again.

I think this happens because my account has not policyExpenseChat beta enabled yet. I tested this manually by updating Permissions.js.
Can I have policyExpenseChat beta enabled account for test?

@luacmartins
Copy link
Copy Markdown
Contributor Author

@0xmiroslav I added your account to the beta.
Screenshot 2023-02-10 at 9 21 36 AM

The Onyx error seems unrelated to this PR, but we should address that in a different issue if you can consistently reproduce.

@0xmiroslav
Copy link
Copy Markdown
Contributor

I added your account to the beta.

policyExpenseChat is still not in beta list.

One thing to confirm: after inviting members in Manage members page, they should be automatically added to all chat rooms (#admins, #announce, policy expense room) of that workspace, right?

@luacmartins
Copy link
Copy Markdown
Contributor Author

They should only be added to the #announce room and have an individual workspace chat created between them and the Workspace admin

@0xmiroslav
Copy link
Copy Markdown
Contributor

Ah yes, not #admins but only #announce

have an individual workspace chat created between them and the Workspace admin - this doesn't work for me.

@0xmiroslav
Copy link
Copy Markdown
Contributor

Nvm, I am now able to test using expensifail account QA team is using. Let me fill checklist shortly.

@0xmiroslav
Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (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 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
    • 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 correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • 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
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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(themeColors.componentBG)
  • 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 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
web.mov
Mobile Web - Chrome
mchrome.mov
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mov

Copy link
Copy Markdown
Contributor

@0xmiroslav 0xmiroslav left a comment

Choose a reason for hiding this comment

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

Tested all cases and work as expected

  • Concierge chat
  • #admins, #announce chat
  • Room chat
  • Workspace chat (members: 1, 2, 3+)
  • Group chat (members: 2, 3+)
  • 1:1 chat

@luacmartins luacmartins merged commit a2728b5 into main Feb 10, 2023
@luacmartins luacmartins deleted the cmartins-rmSendMoneyFromWorkspace branch February 10, 2023 16:30
@OSBotify
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
App start TTI 701.097 ms → 724.727 ms (+23.630 ms, +3.4%)
Open Search Page TTI 600.434 ms → 623.299 ms (+22.865 ms, +3.8%)
App start runJsBundle 189.250 ms → 196.406 ms (+7.156 ms, +3.8%)
App start nativeLaunch 19.750 ms → 20.903 ms (+1.153 ms, +5.8%)
App start regularAppStart 0.017 ms → 0.015 ms (-0.002 ms, -11.6%)
Show details
Name Duration
App start TTI Baseline
Mean: 701.097 ms
Stdev: 26.720 ms (3.8%)
Runs: 647.0516050001606 653.7751320004463 670.7733779996634 671.7689290000126 673.7017609998584 674.9420170001686 675.9160749996081 679.1673170002177 685.0528600001708 686.6525800004601 692.45997299999 693.303838999942 693.7694210000336 697.6667860001326 698.2915200004354 699.0230820002034 699.1895660003647 699.983040000312 702.8517829999328 703.0566299995407 704.1619189996272 706.1589179998264 707.22560399957 710.3808059999719 724.3494809996337 724.9441280001774 729.5696700001135 730.8850260004401 742.6503229998052 742.6880719996989 753.1524499999359 760.5448960000649

Current
Mean: 724.727 ms
Stdev: 24.417 ms (3.4%)
Runs: 662.395206999965 691.0369279999286 694.3329579997808 695.6765999998897 696.7936030002311 698.7717270003632 700.5499109998345 705.7908420003951 706.8820340000093 710.1403090003878 710.281302000396 715.4044359996915 720.3774089999497 720.39593099989 721.563329000026 723.661495000124 727.9468520004302 731.4986990001053 735.4450479997322 735.6276679998264 736.0977119999006 745.3927539996803 745.6008179998025 747.2032129997388 753.0835640002042 753.1292129997164 753.4886069996282 754.4496290003881 755.1129280002788 756.7077820003033 761.6915469998494
Open Search Page TTI Baseline
Mean: 600.434 ms
Stdev: 15.744 ms (2.6%)
Runs: 563.718628000468 576.1812740005553 577.26977599971 585.5068359998986 585.8093670001253 587.4390869997442 588.4521889993921 589.3990879999474 589.8134759999812 590.5769040007144 590.6586509998888 593.1183679997921 594.2785639995709 594.3794760005549 597.0904139997438 599.1916100000963 600.2238779999316 601.4861659994349 602.9279379993677 605.5151769993827 606.1957599995658 606.4866949999705 607.4550370005891 607.4663500003517 608.056273999624 608.9677330004051 610.6809080000967 613.7331140004098 615.8246659999713 619.646809999831 623.2454429995269 634.6543380003422 638.8833010001108

Current
Mean: 623.299 ms
Stdev: 19.963 ms (3.2%)
Runs: 585.2060550004244 587.6110020000488 593.0560309998691 598.6272379998118 602.9468999998644 603.8544110003859 605.11014899984 606.8415119992569 608.5356850000098 610.2893479997292 610.4295660005882 615.4139000000432 616.0375169999897 617.8024489991367 618.9506440004334 620.368978000246 621.0245359996334 621.357503999956 626.2212320007384 626.605671999976 626.9922690000385 627.4708660002798 635.4111329996958 636.12268100027 641.9290370000526 642.841878999956 646.1568200001493 651.1002200003713 651.6673580007628 652.3061929997057 652.7436939999461 653.8841970004141 653.9555259998888
App start runJsBundle Baseline
Mean: 189.250 ms
Stdev: 16.397 ms (8.7%)
Runs: 164 165 168 173 173 174 174 177 177 178 179 181 182 183 184 184 185 191 191 193 194 195 195 196 202 206 206 207 213 214 219 233

Current
Mean: 196.406 ms
Stdev: 16.054 ms (8.2%)
Runs: 176 176 179 180 181 181 181 183 183 183 183 186 186 187 188 190 192 194 197 197 208 209 210 210 210 212 212 213 214 224 226 234
App start nativeLaunch Baseline
Mean: 19.750 ms
Stdev: 1.561 ms (7.9%)
Runs: 17 18 18 18 18 18 18 18 18 18 18 19 19 19 20 20 20 20 20 21 21 21 21 21 21 21 21 22 22 22 22 22

Current
Mean: 20.903 ms
Stdev: 2.632 ms (12.6%)
Runs: 18 18 18 18 18 18 18 18 19 19 20 20 20 20 20 21 21 21 21 21 22 22 22 22 22 23 23 24 27 27 27
App start regularAppStart Baseline
Mean: 0.017 ms
Stdev: 0.001 ms (6.4%)
Runs: 0.015502999536693096 0.015544000081717968 0.015706000849604607 0.015828000381588936 0.016193999908864498 0.016439000144600868 0.016439000144600868 0.01696799974888563 0.0170499999076128 0.01708999928086996 0.017172000370919704 0.017333999276161194 0.017374000512063503 0.017455999739468098 0.0176189998164773 0.017659999430179596 0.017780999653041363 0.017903000116348267 0.017903000116348267 0.018025999888777733 0.018066000193357468 0.018187999725341797 0.0183100001886487 0.018350999802350998 0.018472999334335327 0.018472999334335327 0.018717000260949135 0.019123999401926994 0.0204670000821352

Current
Mean: 0.015 ms
Stdev: 0.001 ms (5.0%)
Runs: 0.013957000337541103 0.01403799932450056 0.014078999869525433 0.014689000323414803 0.014689000323414803 0.014770000241696835 0.014891999773681164 0.0148930000141263 0.01505500078201294 0.015177000313997269 0.015217999927699566 0.015217999927699566 0.015300000086426735 0.015544000081717968 0.015544000081717968 0.015625 0.015665999613702297 0.015665999613702297 0.015786999836564064 0.015828999690711498 0.015868999995291233 0.015868999995291233 0.015991000458598137 0.016195000149309635 0.016276000067591667 0.016397999599575996 0.01639800053089857 0.0167239997535944 0.017130999825894833

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.2.70-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

1 similar comment
@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.2.70-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.2.70-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 1.2.70-1 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants