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

[$250] Provide education/confirmation before creating workspaces in New Workspace flows #51504

Open
danielrvidal opened this issue Oct 25, 2024 · 63 comments
Assignees
Labels
Design External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@danielrvidal
Copy link
Contributor

danielrvidal commented Oct 25, 2024

Proposal: Provide education/confirmation before creating workspaces in New Workspace flows

Problem: When users attempting to submit expenses are inadvertently led to create workspaces, it causes confusion about how to submit an expense to their boss, leading to frustration and a poor user experience.

Solution: Provide better education about what a workspace is and a confirmation screen when creating them in places employees are running into issues. If a user creates a New Workspace in Global Create or Settings > Workspaces > New Workspace, show a confirmation page informing them what it does and asking them to name it.

  • The proposed screens are below.
  • We’ll use the same logic we have today to suggest a workspace name, but allow the user to edit it.
  • After the user clicks Confirm in the screen, they’ll be dropped into their workspace editor, like they are today.

Mobile

image

Web

image

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851416153225764502
  • Upwork Job ID: 1851416153225764502
  • Last Price Increase: 2024-10-30
  • Automatic offers:
    • allgandalf | Reviewer | 104754886
    • Krishna2323 | Contributor | 104754887
Issue OwnerCurrent Issue Owner: @allgandalf
@danielrvidal danielrvidal added Internal Requires API changes or must be handled by Expensify staff Planning Changes still in the thought process labels Oct 25, 2024
@danielrvidal danielrvidal self-assigned this Oct 25, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

Triggered auto assignment to @dubielzyk-expensify (Design), see these Stack Overflow questions for more details.

@dubielzyk-expensify
Copy link
Contributor

Tried to replicate what the request is and it'd probably be something like this:
image

Though I think I prefer something like this if we wanna list the workspaces with links to them:
image

I think ultimately it feels a bit weird to me to mention submitting expenses when they've tapped a New Workspace button, so I kinda wonder if we should be even more generic:
image

cc @Expensify/design for feedback, musings, poems, et al.

@shawnborton
Copy link
Contributor

Yeah, I think I might be with Jon here, how do we know that users are actually hoping to submit an expense when they tap on New Workspace? So that being said, I like the idea of something more generic.

Here's another riff on that where we use workspace avatars and even link the user to the create expense flow:
image

@dubielzyk-expensify
Copy link
Contributor

I quite like that too 😄 I prefer that dialog if we go for the more complex/custom ones.

@dannymcclain
Copy link
Contributor

I like Shawn's riff too.

@danielrvidal
Copy link
Contributor Author

We're still working on the design mocks. @dubielzyk-expensify updated the thread with the proposal so we'll likely be ready to work with contributor tomorrow. We'll leave that thread open until tomorrow for any feedback.

Sorry about requesting both designs @dubielzyk-expensify even though we're only going to do the first one right now.

@dubielzyk-expensify
Copy link
Contributor

Alright. All good. Let's ignore the modal then 👍

@melvin-bot melvin-bot bot added the Monthly KSv2 label Oct 29, 2024
@danielrvidal danielrvidal added External Added to denote the issue can be worked on by a contributor and removed Monthly KSv2 Internal Requires API changes or must be handled by Expensify staff Planning Changes still in the thought process labels Oct 30, 2024
@melvin-bot melvin-bot bot changed the title Provide education/confirmation before creating workspaces in New Workspace flows [$250] Provide education/confirmation before creating workspaces in New Workspace flows Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 30, 2024
@danielrvidal
Copy link
Contributor Author

@allgandalf just an fyi, I have updated the original post so that the finalized proposal and direction we want to go is there. Please let me know if you have any questions!

@nkdengineer
Copy link
Contributor

Proposal

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

Provide education/confirmation before creating workspaces in New Workspace flows

What is the root cause of that problem?

This is a new feature.

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

When we create a new WS from the FAB or Workspace list page, we can navigate to a new confirmed workspace page

  1. Create a confirmed WS page and add the route and screen for this. The UI follow the design in the description of the OP
  2. When we click on new WS button in these case we will navigate to the WS confirm page

onSelected: () => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt()),

onPress={() => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt())}

onCtaPress={() => interceptAnonymousUser(() => App.createWorkspaceWithPolicyDraftAndNavigateToIt())}

  1. In the WS confirm page, the default value of the WS name input is generated by generateDefaultWorkspaceName(policyOwnerEmail) function, the currency is the localCurrencyCode of the current user. We can use CurrencySelectionList to select another currency.

  2. Then when we create a new WS we will call createWorkspaceWithPolicyDraftAndNavigateToIt and pass policyName as the WS name input in confirm page, we need to accept a new param is currency in this function and pass it to createDraftInitialWorkspace function and use it here.

The detail can be done in the PR phrase. I can provide a test branch if we want to test this before moving this forward.

What alternative solutions did you explore? (Optional)

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 30, 2024

Proposal


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

Provide education/confirmation before creating workspaces in New Workspace flows

What is the root cause of that problem?

Feature request

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


  • We have to create several new components and make changes to multiple utils functions.
  • This will also require backend change for creating the new workspace with custom avatar, the API for creating a workspace does not accept a file for avatar.

Code changes:

  • First we need to create a new component for the workspace confirmation page, we can name that WorkspaceConfirmationPage.
  • Then we should create a new component CurrencyPicker, this will be render the CurrencySelectionList inside the modal so for selecting currency, we won't need to create a new page.
  • After creating CurrencyPicker, we will use that with InputWrapper, just like we use ValuePicker.
  • Then we should navigate to WorkspaceConfirmationPage instead of calling createWorkspaceWithPolicyDraftAndNavigateToIt from WorkspacesListPage's empty view and from FloatingActionButtonAndPopover.tsx.
  • We would also need to make changes to utils function like App.createWorkspaceWithPolicyDraftAndNavigateToIt to accept new parameters for policyName, file and currency. CreateWorkspace

TEST BRANCH

What alternative solutions did you explore? (Optional)

Result

Monosnap.screencast.2024-10-30.11-30-19.mp4

@dannymcclain
Copy link
Contributor

One thing I think we need to consider that Krishna's proposal made me realize: I think we should auto-update the avatar when the name field is blurred (or something like that).

It's a bit weird to me that the avatar letter doesn't match the name until the workspace is confirmed. Since this screen is a confirmation, I would expect it to accurately reflect what I'm going to get when I confirm. cc @Expensify/design

@shawnborton
Copy link
Contributor

Oh that's a really great point, I definitely agree with that.

@shawnborton
Copy link
Contributor

I mean it is probably likely that someone would hit the Save button directly while being focused in the name input... so I wonder if we would even consider updating the avatar after a second of no typing or something even if the user was still focused in the name input?

@danielrvidal
Copy link
Contributor Author

Moving this to Daily until we get an answer from our internal team as this is high priority.

@allgandalf
Copy link
Contributor

@grgia i hope this update is enough for you ?

@grgia
Copy link
Contributor

grgia commented Nov 12, 2024

@grgia, the BE endpoint should also accept currency: string; and file: File;. @allgandalf, could you please double-check this as well? Thanks!

@Krishna2323 do we need to return anything in the response?
Also, could you confirm what behavior change we need the API command to make

@grgia grgia self-assigned this Nov 12, 2024
@Krishna2323
Copy link
Contributor

do we need to return anything in the response?
Also, could you confirm what behavior change we need the API command to make

I don't think we need something from the backend. It should just return the policy with the provided file (avatar) and currency.

image

Also, could you confirm what behavior change we need the API command to make

Not sure what do you mean by "behavior change". Could you please explain?

@grgia
Copy link
Contributor

grgia commented Nov 13, 2024

Not sure what do you mean by "behavior change". Could you please explain?

@Krishna2323 you proposed we send currency and file to CreateWorkspace-

I want to confirm so we're all on the same page. Are we setting the policy currency and avatar with currency/file? Then returning that data in the policy response?

@Krishna2323
Copy link
Contributor

I want to confirm so we're all on the same page. Are we setting the policy currency and avatar with currency/file? Then returning that data in the policy response?

Yeah, correct.

@grgia
Copy link
Contributor

grgia commented Nov 13, 2024

Great thank you, Looking into this now 👀

@rafecolton rafecolton removed their assignment Nov 13, 2024
@grgia
Copy link
Contributor

grgia commented Nov 15, 2024

Looking at unblocking this now. A lot of this code exists in Web (and probably shouldn't) and I'd rather not hold this on a refactor. I'll update once I confirm

@grgia grgia removed the Reviewing Has a PR in review label Nov 15, 2024
@allgandalf
Copy link
Contributor

Thanks for the update 🙇

@grgia
Copy link
Contributor

grgia commented Nov 15, 2024

I've got the Auth PR nearly done- working on unit tests now. I have a draft for the PHP changes that I'm working on as well but haven't gotten to test it yet

@grgia
Copy link
Contributor

grgia commented Nov 15, 2024

Auth is passing tests, but I've found an alternate solution in web. Looking at that now. Should be good to go early next week either way

@allgandalf
Copy link
Contributor

Thanks for those updated...

@grgia
Copy link
Contributor

grgia commented Nov 18, 2024

Auth PR is in review, will finalize PHP changes today from the Auth Review

@allgandalf
Copy link
Contributor

@grgia, when can we expect the changes to hit staging ?

@grgia
Copy link
Contributor

grgia commented Nov 20, 2024

Web PR is in final review @allgandalf

@grgia
Copy link
Contributor

grgia commented Nov 21, 2024

@allgandalf the changes are in staging
For the avatar file upload, I referenced the upload avatar flow from ND. I can make an App PR with param updates to help if needed

@allgandalf
Copy link
Contributor

That is great!!, thansk @grgia

I can make an App PR with param updates to help if needed

We can include that in the current PR itself right ?

@Krishna2323 when can you have the PR ready for review ?

@grgia
Copy link
Contributor

grgia commented Nov 22, 2024

Yep all good to include in the PR!

@allgandalf
Copy link
Contributor

@grgia hey, can you take a look at this comment when you find time ;) thanks

@grgia
Copy link
Contributor

grgia commented Nov 25, 2024

Looking 👀

@allgandalf
Copy link
Contributor

allgandalf commented Nov 25, 2024

Update: most probably we should get the PR approved tomorrow

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

9 participants