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

Update welcome note #38023

Merged
merged 19 commits into from
Apr 15, 2024
Merged

Update welcome note #38023

merged 19 commits into from
Apr 15, 2024

Conversation

dukenv0307
Copy link
Contributor

@dukenv0307 dukenv0307 commented Mar 10, 2024

Details

Fixed Issues

$ #37152
PROPOSAL: #37152 (comment)

Tests

  1. Go to WS settings
  2. Click button 'Invite member'
  3. Choose a contact and click button Next
  4. Verify that: Welcome message has a new format.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  1. Go to WS settings
  2. Click button 'Invite member'
  3. Choose a contact and click button Next
  4. Verify that: Welcome message has a new format.
  • 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: 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 form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label 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.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
mail-en
web-es.mov
mail-es
MacOS: Desktop
desktop.mov

@dukenv0307 dukenv0307 marked this pull request as ready for review March 10, 2024 15:43
@dukenv0307 dukenv0307 requested a review from a team as a code owner March 10, 2024 15:43
@melvin-bot melvin-bot bot requested review from situchan and removed request for a team March 10, 2024 15:44
Copy link

melvin-bot bot commented Mar 10, 2024

@situchan 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]

@trjExpensify
Copy link
Contributor

@situchan can you give us an ETA on reviewing this PR please?

@situchan
Copy link
Contributor

@situchan can you give us an ETA on reviewing this PR please?

ETA end of day

Copy link
Contributor

@situchan situchan left a comment

Choose a reason for hiding this comment

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

@dukenv0307 Spanish copy is missing. Please request on slack

@situchan
Copy link
Contributor

And at least one platform screenshot with Spanish tested. And also screenshot of invite email

@danielrvidal
Copy link
Contributor

@situchan we don't actually need for the welcome messages if they are being sent from Concierge/a guide, etc.

@dukenv0307 if you need other screens translated, you can ask me and I'll get them.

@dukenv0307
Copy link
Contributor Author

And at least one platform screenshot with Spanish tested. And also screenshot of invite email

@situchan @danielrvidal I just updated Spanish and updated the screenshot in MacOS: Chrome / Safari platform, please check it when you get a chance.

@trjExpensify
Copy link
Contributor

Sorry @dukenv0307, I think you might have misunderstood Daniel. Messages in the product that come from "Expensify" in a support capacity like Concierge, an account manager or a setup specialist etc are not translated into Spanish because we don't provide support in Spanish.

@situchan
Copy link
Contributor

situchan commented Mar 13, 2024

@trjExpensify we have Spanish message in production. So now this should be unlocalized?

App/src/languages/es.ts

Lines 2003 to 2004 in 0cb701c

welcomeNote: ({workspaceName}: WelcomeNoteParams) =>
`¡Has sido invitado a ${workspaceName}! Descargue la aplicación móvil Expensify en use.expensify.com/download para comenzar a rastrear sus gastos.`,

Screenshot 2024-03-14 at 1 02 37 AM

@trjExpensify
Copy link
Contributor

Cool, chatted to some peeps internally here (ref for Expensifiers) and we'd like to remove that translation on the welcomeNote message, please. CC: @iwiznia

@danielrvidal
Copy link
Contributor

@dukenv0307 do you mind showing what the email looks like when:

  • The workspace description is: This is the workspace description.
  • The invite message is: This is the invite message.

This screenshot looks to be incorrect, but I think it's because you are inputting information into the invite message:
image

This is what the email should be:

Subject: [First Name] [Last Name] ([email@user.com]) invited you to Expensify

Hi there -

To join "[workspace name]", [click here](link) to start tracking your expenses!

They also added the message:
[Input invitationmessage]

Additionally, here is the workspace description:
[Input workspace description]

And the bottom two lines (for invitation/workspace description) are dependent on 1) if they are present and 2) what the text of those inputs are.

If you don't mind showing a mock-up/video up what it looks like with the suggestions above I can definitively tell you if there is an issue in the coding or if it was just because of what was input in the invitation message.

@danielrvidal
Copy link
Contributor

danielrvidal commented Mar 14, 2024

Maybe to add a bit more information, here is what I would expect the message to look like and then I have defined what is driving some of the pieces. Please let me know if there is any questions.
image

  • Daniel Vidal in the subject line is my First/Last name
  • Bob's Donut's is the workspace name.
  • click here is linked to the workspace chat they were invited to (the URL for which is unique as every member gets a workspace chat created on invite to a workspace).
  • "This is the invite message" is the invite message they input when inviting the user to the workspace.
  • "This is the workspace description" is the workspace description.

@dukenv0307
Copy link
Contributor Author

@danielrvidal this is my error, thank you for your explanation. I will update the PR soon.

@dukenv0307
Copy link
Contributor Author

@situchan @trjExpensify If we decide to remove welcomeNote, should we remove all welcomeNotes from the en and es files and then move welcomeNote to the const file?

@dukenv0307
Copy link
Contributor Author

To join "[workspace name]", click here to start tracking your expenses!

@danielrvidal can you give me some link examples or link formats here?

@dukenv0307
Copy link
Contributor Author

Screenshot 2024-03-14 at 17 37 38
@danielrvidal @situchan subject mail in here, I think BE will fix it?

@situchan
Copy link
Contributor

@situchan @trjExpensify If we decide to remove welcomeNote, should we remove all welcomeNotes from the en and es files and then move welcomeNote to the const file?

I don't mind putting this directly in view component like copy on onboarding modal

Maybe it would be good to group concierge messages all together but out of scope

@danielrvidal
Copy link
Contributor

@dukenv0307 here is an example of a workspace chat link: https://new.expensify.com/r/4656517140007919

It would just direct me to my workspace chat:
image

Obviously for a new user, theirs would not be populated with any requests yet but it would drop them into their workspace chat.

@danielrvidal
Copy link
Contributor

@situchan @dukenv0307 any update on this one? Let me know if you need anything else.

@dukenv0307
Copy link
Contributor Author

@danielrvidal #38023 (comment) Can you verify my question here here?

@danielrvidal
Copy link
Contributor

subject mail in here, I think BE will fix it?

Sorry, what is BE in this reference? I'll be sure to get it answered asap.

@trjExpensify
Copy link
Contributor

@danielrvidal I think @dukenv0307 is asking if we're getting the intended subject line for this message from the backend or not?

#[senders display name] ([senders login]) invited you to Expensify

@rayane-djouah
Copy link
Contributor

Concierge message is correct and working as expected; the issue is with the email.

image

@trjExpensify
Copy link
Contributor

Haha, I'm so confused. @Gonals can you list your numbered steps to successfully achieve this using Duke's code?

@Gonals
Copy link
Contributor

Gonals commented Apr 12, 2024

  • The existing user is receiving this email (which doesn't meet the needed format):

Yep, that is the email expected for existing users.

It is really weird you are not getting the email for new users, though, as I seem to get it without any issues. You are not getting it regardless of the contents of the message and/or name of the workspace? I'm trying to figure out if any special characters may be causing issues

@Gonals
Copy link
Contributor

Gonals commented Apr 12, 2024

Haha, I'm so confused. @Gonals can you list your numbered steps to successfully achieve this using Duke's code?

Sure, but there's nothing special 😅 :

  1. Log into NewDot
  2. Create a new workspace
  3. Go to Members
  4. Invite an email address that does NOT have an Expensify account
  5. That's it

@trjExpensify
Copy link
Contributor

@dukenv0307 @rayane-djouah can you follow those steps exactly, please? Let's get videos of going through that whole flow to verify that's we're all on the same page. Thanks!

@dukenv0307
Copy link
Contributor Author

@trjExpensify My step here, I only receive the email about welcome to Expensify for new account.

welcomeNote-1.mov

@Gonals
Copy link
Contributor

Gonals commented Apr 12, 2024

@dukenv0307, after a bunch of testing, we have seen some inconsistent behavior on the staging backend when sending custom subject emails. I got them fine, Tom got them in some domains, and not in others...

At this point, we are unsure of the cause, but it is unrelated to this issue, so we can move ahead with it, as it tests well for me.

@situchan, can you check if it works for you too/approve and we go ahead and merge this?

Alternatively, if you have access to emails in other domains, you can try inviting those 🤷

@rayane-djouah
Copy link
Contributor

@Gonals, I tried with several temporary email providers to test different domains, and I removed any special characters from the workspace name, but I'm not receiving the email regardless of the contents of the message and/or name of the workspace.

Recording.2024-04-12.151208.mp4

@rayane-djouah
Copy link
Contributor

  1. Go to WS settings
  2. Click button 'Invite member'
  3. Choose a contact and click button Next
  4. Verify that: Welcome message has a new format.

@dukenv0307, as we are now adding the email subject only in this PR, and we didn't change the default welcome message, lets update the test steps in the author checklist. Thanks!

@rayane-djouah
Copy link
Contributor

@dukenv0307, after a bunch of testing, we have seen some inconsistent behavior on the staging backend when sending custom subject emails. I got them fine, Tom got them in some domains, and not in others...

At this point, we are unsure of the cause, but it is unrelated to this issue, so we can move ahead with it, as it tests well for me.

@situchan, can you check if it works for you too/approve and we go ahead and merge this?

Alternatively, if you have access to emails in other domains, you can try inviting those 🤷

@Gonals, the code is LGTM, but I'm not able to test it. LMK if I should skip testing and approve anyway. in this case, we should add [No QA] to skip QA testing also.

@Gonals
Copy link
Contributor

Gonals commented Apr 15, 2024

@dukenv0307, after a bunch of testing, we have seen some inconsistent behavior on the staging backend when sending custom subject emails. I got them fine, Tom got them in some domains, and not in others...
At this point, we are unsure of the cause, but it is unrelated to this issue, so we can move ahead with it, as it tests well for me.
@situchan, can you check if it works for you too/approve and we go ahead and merge this?
Alternatively, if you have access to emails in other domains, you can try inviting those 🤷

@Gonals, the code is LGTM, but I'm not able to test it. LMK if I should skip testing and approve anyway. in this case, we should add [No QA] to skip QA testing also.

Let's just go ahead and approve this. I can QA it, so no need for the [No QA] label

@melvin-bot melvin-bot bot requested a review from Gonals April 15, 2024 13:25
@Gonals
Copy link
Contributor

Gonals commented Apr 15, 2024

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: mWeb Chrome
    • iOS: Native
    • iOS: mWeb 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 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
    • 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 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(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.
  • 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

@Expensify Expensify deleted a comment from situchan Apr 15, 2024
@Gonals Gonals merged commit 217b67b into Expensify:main Apr 15, 2024
16 checks passed
@rayane-djouah
Copy link
Contributor

@Gonals, Could you please add InternalQa label here? Also, please assign me in the linked issue. Thank you!

@OSBotify
Copy link
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.

@OSBotify
Copy link
Contributor

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

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

@lanitochka17
Copy link

This PR is failing because of issue #40445

The issue is reproducible in: all environments

Bug6453359_1713429052596.Screen_Recording_2024-04-18_at_11.26.01_in_the_morning.1.mp4

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Apr 18, 2024

@lanitochka17 this PR require a internal QA, @Gonals will QA it, see #38023 (comment)

@OSBotify
Copy link
Contributor

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

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

@danielrvidal
Copy link
Contributor

@Gonals @dukenv0307 I tried to generate invite emails in the new format and couldn't get them to work. Are you able to get it to work?

  1. Created a workspace as a new user danrvidal+onboardtest8@gmail.com
  2. Invited danrvidal+onboardtest9@gmail.com
  3. I never got an invite message

Could we diagnose what is happening ASAP? If we're not sending invite emails for anyone being added, that is not great, and we should prioritize a fix ASAP.

Here is a video of my flow:
https://github.com/Expensify/App/assets/2364487/a38dc470-7e39-4cb5-9120-28c29d9abd91

@dukenv0307
Copy link
Contributor Author

@danielrvidal Base on @Gonals 's comment here #38023 (comment) I can't test this. @Gonals Can you please take a look at this comment above? Thanks.

@danielrvidal
Copy link
Contributor

Hey @dukenv0307, it looks like me not getting the email was from another issue, so this is all good. Thank you!

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.

9 participants