App icon indicating copy to clipboard operation
App copied to clipboard

Give users on a domain the ability to join their colleagues when the company is already using Expensify

Open allroundexperts opened this issue 1 year ago • 60 comments

Details

$ https://github.com/Expensify/App/issues/48189

Fixed Issues

$ https://github.com/Expensify/App/issues/48189 PROPOSAL: https://github.com/Expensify/App/issues/48189#issuecomment-2444852097

Tests

  1. Login using an email that is private (Make sure that another user exists on the same private domain and has several workspaces created)
  2. Verify that an onboarding modal appears, asking to input your name.
  3. Enter your name, and verify that after clicking next, you're prompted to enter the OTP.
  4. Enter the OTP, and verify that after clicking next, you're shown a list of workspaces to join.
  5. Join any workspace, and verify that you're redirected to the workspace page.
  • [x] Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

Same as test steps

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

PR Author Checklist

  • [x] I linked the correct issue in the ### Fixed Issues section above
  • [x] I wrote clear testing steps that cover the changes made in this PR
    • [x] I added steps for local testing in the Tests section
    • [x] I added steps for the expected offline behavior in the Offline steps section
    • [x] I added steps for Staging and/or Production testing in the QA steps section
    • [x] I added steps to cover 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 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).
  • [x] I included screenshots or videos for tests on all platforms
  • [x] I ran the tests on all platforms & verified they passed on:
    • [x] Android: Native
    • [x] Android: mWeb Chrome
    • [x] iOS: Native
    • [x] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [x] MacOS: Desktop
  • [x] 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)
  • [x] I followed proper code patterns (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] 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:
    • [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 followed the guidelines as stated in the Review Guidelines
  • [x] 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)
  • [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] I verified that if a function's arguments changed that all usages have also been updated correctly
  • [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.

Screenshots/Videos

Android: Native

https://github.com/user-attachments/assets/42cb0734-d95d-4526-a338-d1ce15f5bd60

Android: mWeb Chrome

https://github.com/user-attachments/assets/be8c3c0e-42a4-4cc8-9dc9-b9f8a4b74160

iOS: Native

https://github.com/user-attachments/assets/61a786f4-35e8-4e72-b979-48b140fbde4b

iOS: mWeb Safari

https://github.com/user-attachments/assets/a1cb3a08-71bd-4855-939f-d61d9b954f3b

MacOS: Chrome / Safari

https://github.com/user-attachments/assets/38377530-979f-455f-b9ca-25feaa8b4f8e

MacOS: Desktop

https://github.com/user-attachments/assets/2c3a087b-3504-4f84-ad1e-a9c4a852ad2f

allroundexperts avatar Oct 29 '24 17:10 allroundexperts

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Oct 29 '24 17:10 github-actions[bot]

@allroundexperts looks like you need to sign all the commits.

parasharrajat avatar Oct 30 '24 14:10 parasharrajat

Just trying to make the flow work right now. Will do this as soon as I'm done!

allroundexperts avatar Oct 30 '24 14:10 allroundexperts

@parasharrajat 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 Nov 06 '24 22:11 melvin-bot[bot]

Testing...

parasharrajat avatar Nov 07 '24 13:11 parasharrajat

BUG: Onboarding in running in loops when we skip validation step.

https://github.com/user-attachments/assets/ff9298b3-c0ff-4dce-b820-c8e89348cb42

parasharrajat avatar Nov 08 '24 21:11 parasharrajat

BUG: Onboarding in running in loops when we skip validation step.

09.11.2024_02.44.23_REC.mp4

Fixed.

allroundexperts avatar Nov 10 '24 18:11 allroundexperts

How's this one going?

marcaaron avatar Nov 13 '24 19:11 marcaaron

How's this one going?

Addressed all comments. Waiting on the review again.

allroundexperts avatar Nov 13 '24 22:11 allroundexperts

Rechecking..

parasharrajat avatar Nov 15 '24 18:11 parasharrajat

@parasharrajat anything to report back?

danielrvidal avatar Nov 18 '24 18:11 danielrvidal

I will drop the next review in the morning. It was supposed to be today but weekend stretched a bit.

Apologies for the delay.

parasharrajat avatar Nov 18 '24 20:11 parasharrajat

BUG: Pressing back on the Personal details modal, takes the user to the purpose selection screen. Then Pressing next does not take the user through private domain flow.

Steps:

  1. Login.
  2. Press back arrow on the onboarding modal from the personal details step.
  3. Now select a purpose and complete the flow.

parasharrajat avatar Nov 19 '24 13:11 parasharrajat

BUG: Personal details step is shown again to the user after we skip the Private domain flow and click something else as purpose.

Expected: As we already shown the personal details step the user, we should not show that again.

parasharrajat avatar Nov 19 '24 15:11 parasharrajat

BUG: Valdation page throws error after going back it from workspace list page.

Steps:

  1. Add validation code, press enter.
  2. Now go back from workspace page list.
  3. Submit the validation code again via enter key.

Here, Should we allow the user to go back to the validation page again when he has already verified. If so, we should clear the validation field and page state so that you can submit he code again and go to workspace page list.

parasharrajat avatar Nov 20 '24 08:11 parasharrajat

BUG: I can select the workspace on the list.

Screenshot 2024-11-20 at 2 25 58 PM

parasharrajat avatar Nov 20 '24 08:11 parasharrajat

Request: Some of the screens does not have back arrow. Can you please cross check the mockups? https://github.com/Expensify/App/issues/48189#issuecomment-2335191883

parasharrajat avatar Nov 20 '24 08:11 parasharrajat

BUG: This does not work.

Pre-approval not required: Add them to the workspace Drop them in the LHN populate their onboarding/ConciergeDM with the invited member set of tasks

After clicking join, I am landing on workspace page.

parasharrajat avatar Nov 20 '24 09:11 parasharrajat

BUG: Admin of workspace does not get join request when, I click ask to join.

parasharrajat avatar Nov 20 '24 11:11 parasharrajat

BUG: This does not happen.

Pre-approval required: Drop them in the LHN to continue exploring the product Send the actionable message in the #admins room to accept or decline (just like policy join links that require approval) On the workspaces page, show the workspace row they’re pending to be accepted to join with the “[Requested]” badge (just like a policy join request that needs to be approved) If they select New Workspace in the + menu or Workspace page, have a warning just to let them know we’re waiting on their colleagues to still accept the request to join Once accepted, they’ll get an email as they’re added to the workspace and we populate their onboarding/ConciergeDM with the invited member set of tasks.

parasharrajat avatar Nov 20 '24 12:11 parasharrajat

Bump @allroundexperts

parasharrajat avatar Nov 21 '24 06:11 parasharrajat

@allroundexperts any ETA on giving us a response here? Let's start doing daily updates on this one?

marcaaron avatar Nov 21 '24 21:11 marcaaron

@marcaaron I've handled some of the bugs that @parasharrajat has pointed out, but still need some more time to investigate and fix the rest. I'll post another update tomorrow.

allroundexperts avatar Nov 21 '24 23:11 allroundexperts

BUG: Pressing back on the Personal details modal, takes the user to the purpose selection screen. Then Pressing next does not take the user through private domain flow.

Should I not show the back button instead? In the mocks, the personal details section does not have a back button.

allroundexperts avatar Nov 25 '24 08:11 allroundexperts

BUG: Valdation page throws error after going back it from workspace list page.

Steps:

  1. Add validation code, press enter.
  2. Now go back from workspace page list.
  3. Submit the validation code again via enter key.

Here, Should we allow the user to go back to the validation page again when he has already verified. If so, we should clear the validation field and page state so that you can submit he code again and go to workspace page list.

@marcaaron Can we please clarify the expected behaviour here?

allroundexperts avatar Nov 25 '24 08:11 allroundexperts

Should I not show the back button instead? In the mocks, the personal details section does not have a back button

Removing the back button serves what purpose? I can't think of a good reason to remove it, but open to thoughts on it. I'm also not sure which screen is the "personal details section".

Here, Should we allow the user to go back to the validation page again when he has already verified. If so, we should clear the validation field and page state so that you can submit he code again and go to workspace page list.

I think once you are "validated" then we can skip this page entirely, but don't think it's hugely important at this final step that we allow you to go back either. I'd defer to design on that one though. This feels pretty minor. I'd imagine most people wouldn't "go back" at this step so it might be easier to just "prevent going back".

@shawnborton @dubielzyk-expensify might have more complete thoughts on this.

362535567-3a333bda-0421-4218-b358-32311d18ae63

marcaaron avatar Nov 25 '24 23:11 marcaaron

If we're talking about the "What's your name?" screen then I would guess there is no "back" button there. It's just the first screen in the flow.

marcaaron avatar Nov 26 '24 00:11 marcaaron

Agree with the above. These mocks are slightly outdated now. The intent screen is most likely the first step now. Either way, the first step shouldn't have a back button. As for all the other steps after the first step, it would be ideal to have a back button.

If the user has already validated it then yeah I agree that it's redundant to validate again so we can skip that step.

dubielzyk-expensify avatar Nov 26 '24 02:11 dubielzyk-expensify

Read another thread and I think y'all are more right that it doesn't make sense to go back from the validation step once it's complete.

dubielzyk-expensify avatar Nov 26 '24 02:11 dubielzyk-expensify

Yup, I think we're all aligned here. No need to go back to a validate step.

shawnborton avatar Nov 26 '24 12:11 shawnborton