App icon indicating copy to clipboard operation
App copied to clipboard

Feat/track whispers

Open ishpaul777 opened this issue 1 year ago • 9 comments

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/38533 PROPOSAL:

Tests

  • [ ] Verify that no errors appear in the JS console

Offline tests

QA Steps

  • [ ] Verify that no errors appear in the JS console
  1. Click on track expense from FAB and create some tracked expenses. (Manual/Scan/Distance) and follow below steps for every tracked expense.
  2. Verify a actionable whisper shows for every tracked expense.
  3. Click on Nothing for now in actionable whisper, verify the whisper dismisses and hides.
  4. Click on Request someone to pay in another actionable whisper for different tracked expense, verify you are redirected participants selector (P2P only workspace chat will not be visible) and able to complete the request flow. (request field prefilled with existing tracked transaction)
  5. Click on Categorize it in another actionable whisper for different tracked expense, verify you are redirected participants selector (only workspaces visible) and able to complete the request flow. (flow: workspace selector -> category selector -> confirmation page)
  6. Click on "Share it with accountant" in another actionable whisper for different tracked expense, verify you are redirected participants selector (only workspaces visible) and able to complete the request flow. (flow: workspace selector -> confirmation page -> request made-> invte page to invite a member (accountant))

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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

ishpaul777 avatar Mar 20 '24 21:03 ishpaul777

@shubham1206agra 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[bot] avatar Mar 30 '24 22:03 melvin-bot[bot]

Opening PR for preliminary testing, but API is not yet 100% so this needs to be tested offline for now. Also just a heads up, recently this PR https://github.com/Expensify/App/pull/36934 might have created a few bugs for overall request flow that are not related

ishpaul777 avatar Mar 30 '24 22:03 ishpaul777

@shubham1206agra Would you be able to start your review from tomorrow please, we need to ship this before wednesday. 🙏

ishpaul777 avatar Apr 07 '24 22:04 ishpaul777

@ishpaul777 Can you fix the APIs first?

shubham1206agra avatar Apr 08 '24 00:04 shubham1206agra

API's is fixed only thing left is params to pass for edited transaction but that is not handled by backend yet

ishpaul777 avatar Apr 08 '24 10:04 ishpaul777

Screenshot 2024-04-12 at 7 15 35 AM

@ishpaul777 The date field is weirdly formatted.

shubham1206agra avatar Apr 12 '24 01:04 shubham1206agra

Screenshot 2024-04-12 at 3 39 14 PM

Are the parameters seem to be passed in the correct order? The merchant seems to take a weird date

https://github.com/Expensify/App/assets/30609178/087de9b8-c4f3-4fd0-9698-6d8719a30b8d

The invite flow seems to be glitchy - it should close after inviting someone but it stays open

https://github.com/Expensify/App/assets/30609178/ceb83661-c7f5-4963-8fb9-a86be327fcf5

NAB: I only see the actionable whisper after I refresh, is there not an optimistic one created?

These are mostly minor things, but it's overall looking good - I was able to convert a tracked to request a scan / distance which is great!

thienlnam avatar Apr 12 '24 22:04 thienlnam

NAB: I only see the actionable whisper after I refresh, is there not an optimistic one created?

this might be pusher related issue as far as i know we dont create whispers optimistically or did we?

ishpaul777 avatar Apr 12 '24 23:04 ishpaul777

The invite flow seems to be glitchy - it should close after inviting someone but it stays open

okay i could think of one solution for this, we can navigate user to this route r/:reportID/invite/:role role will be accountant here so we can differentiate here in invite page that user is in "share with accountant" flow and close after invite. does that sound good / make sense @thienlnam ?

ishpaul777 avatar Apr 12 '24 23:04 ishpaul777

@shubham1206agra can you please start your review

ishpaul777 avatar Apr 14 '24 18:04 ishpaul777

Already started and asked Jack some questions.

shubham1206agra avatar Apr 14 '24 18:04 shubham1206agra

lmk if there's anything which is not immediate clear in code, hopefully we can ship it by tomorrow, i'll do checklist videos when i got transaltion https://github.com/Expensify/App/pull/38709#discussion_r1563309499 and copy verification https://github.com/Expensify/App/pull/38709#discussion_r1555097689 and https://github.com/Expensify/App/pull/38709#discussion_r1555095394

ishpaul777 avatar Apr 14 '24 18:04 ishpaul777

Screenshot 2024-04-15 at 6 25 57 PM

The request parameters worked ✅

On re-login the amount is negative, but I believe that's something to be resolved in the BE

On a second request to an existing IOU, I get this interesting error / it just seems to replace the existing money request https://github.com/Expensify/App/assets/30609178/cc09db8b-ee4b-45ab-83c6-81577dec8bbd

Categorize seems to work okay besides the infinite loader However, it seems like adding an additional tracked expense on any of these flows just doesn't work for me

Screenshot 2024-04-15 at 6 33 31 PM This invite button looks like it has no padding - it should be like the other invite pages Screenshot 2024-04-15 at 6 34 52 PM

thienlnam avatar Apr 16 '24 01:04 thienlnam

Screenshot 2024-04-16 at 8 45 45 AM

I am seeing total as 0

shubham1206agra avatar Apr 16 '24 03:04 shubham1206agra

I am seeing total as 0

we calculate a set total optimistcally https://github.com/Expensify/App/pull/38709/files#diff-9c07b44e092fd3d975806649be46d76b75a377c16e32ed86597b630a84c290d0R1389 here, it looks like BE does not process it correctly

ishpaul777 avatar Apr 16 '24 10:04 ishpaul777

On a second request to an existing IOU, I get this interesting error / it just seems to replace the existing money request

I cant reproduce this one it seems to work fine

https://github.com/Expensify/App/assets/104348397/1b92efcb-1fa3-4053-aa8f-2679a4bb5b9d

ishpaul777 avatar Apr 16 '24 11:04 ishpaul777

Screenshot 2024-04-16 at 6 30 35 PM

This should not happen ig.

shubham1206agra avatar Apr 16 '24 13:04 shubham1206agra

Reviewer Checklist

  • [x] I have verified the author checklist is complete (all boxes are checked off).
  • [x] I verified the correct issue is linked in the ### Fixed Issues section above
  • [x] I verified testing steps are clear and they cover the changes made in this PR
    • [x] I verified the steps for local testing are in the Tests section
    • [x] I verified the steps for Staging and/or Production testing are in the QA steps section
    • [x] 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)
    • [x] 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)
  • [x] I checked that screenshots or videos are included for tests on all platforms
  • [x] I included screenshots or videos for tests on all platforms
  • [x] I verified tests pass on all platforms & I tested again on:
    • [x] Android: Native
    • [x] Android: mWeb Chrome
    • [x] iOS: Native
    • [x] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [x] MacOS: Desktop
  • [x] 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
  • [x] I verified proper code patterns were followed (see Reviewing the code)
    • [x] 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).
    • [x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • [x] I verified that comments were added to code that is not self explanatory
    • [x] 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.
    • [x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • [x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • [x] 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)
    • [x] 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.
    • [x] I verified the JSDocs style guidelines (in STYLE.md) were followed
  • [x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • [x] I verified that this PR follows the guidelines as stated in the Review Guidelines
  • [x] 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)
  • [x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • [x] 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
  • [x] If a new component is created I verified that:
    • [x] A similar component doesn't exist in the codebase
    • [x] All props are defined accurately and each prop has a /** comment above it */
    • [x] The file is named correctly
    • [x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • [x] The only data being stored in the state is data necessary for rendering and nothing else
    • [x] 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)
    • [x] 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)
    • [x] All JSX used for rendering exists in the render method
    • [x] 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
  • [x] If any new file was added I verified that:
    • [x] 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
  • [x] If a new CSS style is added I verified that:
    • [x] A similar style doesn't already exist
    • [x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • [x] 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.
  • [x] 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)
  • [x] 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.
  • [x] 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.
  • [x] 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:
    • [x] I verified that all the inputs inside a form are aligned with each other.
    • [x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • [x] 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.
  • [x] 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.
  • [x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

shubham1206agra avatar Apr 16 '24 16:04 shubham1206agra

:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube:

Android :robot: iOS :apple:
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/38709/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/38709/index.html
Android iOS
Desktop :computer: Web :spider_web:
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/38709/NewExpensify.dmg https://38709.pr-testing.expensify.com
Desktop Web

:eyes: View the workflow run that generated this build :eyes:

github-actions[bot] avatar Apr 16 '24 17:04 github-actions[bot]

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

OSBotify avatar Apr 16 '24 17:04 OSBotify

🚀 Deployed to staging by https://github.com/thienlnam in version: 1.4.63-0 🚀

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

OSBotify avatar Apr 18 '24 04:04 OSBotify

🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀

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

OSBotify avatar Apr 22 '24 14:04 OSBotify