App icon indicating copy to clipboard operation
App copied to clipboard

CRITICAL: [Actionable whisper] [$1000] Launch basic actionable whisper foundation

Open thienlnam opened this issue 1 year ago • 14 comments

We're adding the 'Track Expense' action in this PR. After tracking an expense to your selfDM, there will be a whisper action that provides different options you can take

image

Currently after each tracked transaction, there is another reportAction added which is called ACTIONABLETRACKEXPENSEWHISPER. This will be the actionable whisper.

We already have a similar actionable whisper for inviting people here Screenshot 2024-03-18 at 3 05 11 PM

There are 4 actions that can be taken

Request someone to pay it (Doc)

This will open up straight to the participant selector for the existing transaction. However, in this case it will move the transaction once the request is created as opposed to creating a new one.

image

API command: 'ConvertTrackedExpenseToRequest' Parameters:

  • authToken
  • payerAccountID
  • iouReportID
  • chatReportID
  • transactionID
  • reportActionID
  • createdChatReportActionID
  • createdIOUReportActionID
  • reportPreviewReportActionID

Categorize it (Doc) This creates a workspace (if necessary), then moves it to the open expense report on the workspace chat, and opens the category editor.

image

API command: CategorizeTrackedExpense

  • authToken
  • policyID
  • transactionID
  • reportID
  • reportActionID
  • modifiedExpenseReportActionID
  • announceChatReportID
  • announceCreatedReportActionID
  • adminsChatReportID
  • adminsCreatedReportActionID
  • expenseChatReportID
  • expenseCreatedReportActionID

Share it with my accountant (Doc) This creates a workspace (if necessary), moves it to a report on the workspace chat, and opens the invite flow.

image

API command: ShareTrackedExpense

  • authToken
  • policyID
  • transactionID
  • reportID
  • reportActionID
  • modifiedExpenseReportActionID
  • announceChatReportID
  • announceCreatedReportActionID
  • adminsChatReportID
  • adminsCreatedReportActionID
  • expenseChatReportID
  • expenseCreatedReportActionID

Nothing for now

Hides the actionable whisper

API command: DismissActionableWhisper

  • authToken
  • reportActionID

Note: To get started, you will need to branch off this existing PR. We haven't done full flow testing of the API commands, so there may be some additional BE changes that are required that you might find through working on this PR that we can work on in parallel.

We're also trying to launch this ASAP. Please do NOT pick this up unless you can spend your full attention on this

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015906865d86966bf9
  • Upwork Job ID: 1770146045833195520
  • Last Price Increase: 2024-03-19

thienlnam avatar Mar 18 '24 22:03 thienlnam

Triggered auto assignment to @JmillsExpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.

melvin-bot[bot] avatar Mar 19 '24 17:03 melvin-bot[bot]

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

melvin-bot[bot] avatar Mar 19 '24 17:03 melvin-bot[bot]

Current assignee @ishpaul777 is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Mar 19 '24 17:03 melvin-bot[bot]

Upwork job price has been updated to $1000

melvin-bot[bot] avatar Mar 19 '24 17:03 melvin-bot[bot]

Current assignees @shubham1206agra and @ishpaul777 are eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Mar 19 '24 17:03 melvin-bot[bot]

Proposal

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

The problem we are trying to solve is to implement "actionable whispers" for the Track Expense flow in the Expensify chat interface. After a user tracks an expense to their selfDM chat, we want to show a whisper message with actions the user can take on that expense, such as requesting someone else to pay it, categorizing it, or sharing it with their accountant.

What is the root cause of that problem?

Feature request
After expenses are tracked, users need an easy way to take common next steps and actions on those expenses directly from the chat interface. Without this, users have to navigate to other parts of the app to complete actions like assigning the expense to someone else or categorizing it.

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

To solve this, we should branch off https://github.com/Expensify/App/pull/37282 and make the following changes:

  1. After a user completes the Track Expense flow and the expense shows up in their selfDM chat, display an "actionable whisper" message below the expense with buttons for common actions. The actions and API commands are:

    • Request someone to pay it: Opens participant selector to assign expense. Uses 'ConvertTrackedExpenseToRequest' API command.
    • Categorize it: Creates workspace if needed, moves expense to open report, opens category editor. Uses 'CategorizeTrackedExpense' API command.
    • Share it with my accountant: Creates workspace if needed, moves expense to report, opens invite flow. Uses 'ShareTrackedExpense' API command.
    • Dismiss whisper: Hides the actionable whisper. Uses 'DismissActionableWhisper' API command.
  2. Ensure the new actionable whisper component integrates with the existing Track Expense components and data flow. The tracked expense metadata needs to be passed through to populate the whisper actions.

  3. Add new API commands and parameters for the whisper actions to convert, categorize and share tracked expenses. Backend changes may be needed to fully support the new whisper actions.

  4. Update language translations for the new whisper action text.

  5. Thoroughly test the integration of the whisper with the various Track Expense scenarios - manual entry, distance/mileage, receipt scanning, etc. Ensure the correct tracked expense data displays in the whisper.

brandonhenry avatar Mar 19 '24 18:03 brandonhenry

@brandonhenry I am looking for a detailed proposal a Plan of implementation from technical POV

ishpaul777 avatar Mar 19 '24 20:03 ishpaul777

Actually this is not open for proposal i'll take this one

https://expensify.slack.com/archives/C0671JDRKQW/p1710883067185789?thread_ts=1710872238.124109&cid=C0671JDRKQW

ishpaul777 avatar Mar 19 '24 21:03 ishpaul777

@thienlnam we would need currentuserid in whisperedToAccountIDs to should the "Only visible to you" above the message

Screenshot 2024-03-20 at 7 25 44 PM

ishpaul777 avatar Mar 20 '24 13:03 ishpaul777

@Expensify/design Can the button padding be confirmed in mockup please, the default for button component 12px vertical and 0 horizontal.

Screenshot 2024-03-20 at 7 28 14 PM

ishpaul777 avatar Mar 20 '24 14:03 ishpaul777

@ishpaul777 is this what you're looking for? CleanShot 2024-03-20 at 09 09 32@2x

In Figma, we're using our medium (default) size buttons—they have 16px of left/right padding and a fixed height of 40px.

dannymcclain avatar Mar 20 '24 14:03 dannymcclain

Thanks for clarifying! @dannymcclain

ishpaul777 avatar Mar 20 '24 14:03 ishpaul777

Update:

I have completed Frontend handling for:

  1. Request Someone to pay (Api is not ready yet)

https://github.com/Expensify/App/assets/104348397/909b398f-c2da-4098-bb81-19f643d81507

  1. Basic flow for categorize expense (needs some polish work)

https://github.com/Expensify/App/assets/104348397/914ff86a-60bd-4eac-88b3-526a57f20bae

  1. Nothing for now

https://github.com/Expensify/App/assets/104348397/e8198570-e20c-4788-b1dc-7aee71b0b2c0

Today i'll be completing Categorize expense also handle the flow for "share with accountant"

ishpaul777 avatar Mar 25 '24 08:03 ishpaul777

Actively working through issue.

JmillsExpensify avatar Mar 27 '24 04:03 JmillsExpensify

This issue has not been updated in over 15 days. @JmillsExpensify, @thienlnam, @shubham1206agra, @ishpaul777 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

melvin-bot[bot] avatar Apr 23 '24 18:04 melvin-bot[bot]

Hello @thienlnam, could we please adjust bounty here, it took a bit longer than expected and required more effort than initially expected : )

ishpaul777 avatar Apr 25 '24 18:04 ishpaul777

@JmillsExpensify, @thienlnam, @shubham1206agra, @ishpaul777 Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar May 03 '24 18:05 melvin-bot[bot]

Could you please add what you think is a fair amount and reasoning for it?

thienlnam avatar May 06 '24 21:05 thienlnam

i think $1250 should be fair becuase the track distance expense feature was introduced while the PR was almost ready and it took some more refactoring to have that flow covered

ishpaul777 avatar May 06 '24 21:05 ishpaul777

That seems fair to me 👍

thienlnam avatar May 07 '24 00:05 thienlnam

Upwork job price has been updated to $1250

melvin-bot[bot] avatar May 07 '24 00:05 melvin-bot[bot]

Thank you! @thienlnam : )

ishpaul777 avatar May 07 '24 12:05 ishpaul777

@JmillsExpensify gentle bump for payment : )

ishpaul777 avatar May 13 '24 14:05 ishpaul777

Payment summary:

  • Contributor: @ishpaul777 $1,250
  • Contributor+: @shubham1206agra $1,250

JmillsExpensify avatar May 19 '24 18:05 JmillsExpensify

Offers sent out via Upwork. @shubham1206agra given that this is a new feature, please suggest a set of regression tests to ensure we keep quality high and are testing this for every QA run.

JmillsExpensify avatar May 19 '24 18:05 JmillsExpensify

Offers sent out via Upwork. @shubham1206agra given that this is a new feature, please suggest a set of regression tests to ensure we keep quality high and are testing this for every QA run.

@JmillsExpensify The steps are already provided in the Track Expense doc, so no need to write it here too.

shubham1206agra avatar May 20 '24 01:05 shubham1206agra

@thienlnam Have all the regression tests in the Track Expense doc been added to TestRail yet?

JmillsExpensify avatar May 20 '24 17:05 JmillsExpensify

All Contributors paid out, just wanted to confirm on regression tests for Track Expense before closing this out.

JmillsExpensify avatar May 20 '24 18:05 JmillsExpensify

@JmillsExpensify, @thienlnam, @shubham1206agra, @ishpaul777 Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar May 28 '24 18:05 melvin-bot[bot]

@thienlnam Have all the regression tests in the Track Expense doc been added to TestRail yet?

Yeah, they're being added https://github.com/Expensify/Expensify/issues/399663

thienlnam avatar May 28 '24 21:05 thienlnam