App icon indicating copy to clipboard operation
App copied to clipboard

[$500] [Remove Free Workspace Creation] Update Welcome Message on NewDot

Open tgolen opened this issue 1 year ago • 25 comments

  • Held on https://github.com/Expensify/App/issues/37149 so that the new notifications are in place on the server
  • Held on https://github.com/Expensify/App/issues/37151 so that all collect policies created in NewDot are accessible in NewDot

Update the workspace.inviteMessage.welcomeNote translation key in en.ts and es.ts to be:

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

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

They also added the message:
[Input message]

Additionally, here is the workspace description:
[Input description]
  • The first line of the message must be proceeded with the "#" so that it utilizes the backend functionality for custom subject lines (eg. the first line of the message gets parsed out and used as the subject for email notifications)
  • The "[Input message]" part of the message template is what currently exists in workspace.inviteMessage.welcomeNote
  • The template will need some new variables:
    • Senders display name and login
    • Workspace description
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b0b03e2c9b6c2e93
  • Upwork Job ID: 1762127177147461632
  • Last Price Increase: 2024-02-26

tgolen avatar Feb 23 '24 16:02 tgolen

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Feb 23 '24 16:02 melvin-bot[bot]

Proposal

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

Update Welcome Message on NewDot

What is the root cause of that problem?

We currently have the current welcomeNote as follows:

https://github.com/Expensify/App/blob/0e5dc98d8b56f5564b7fd46e3028b1afdda1dc89/src/languages/en.ts#L1844-L1845

This is the same for Spanish translation in es.ts.

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

The first line would be #[senders display name] ([senders login]) invited you to Expensify As mentioned # is important as the BE will convert it to the subject header of mail.

Then it would be:

Hi there -

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

They also added the message:

`You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.`

Additionally, here is the workspace description: 

Note: we will pass the parameters Senders display name and login, Workspace description, and workspace name separately

Same would be done for the spanish translation

What alternative solutions did you explore? (Optional)

N/A

eucool avatar Feb 23 '24 18:02 eucool

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

melvin-bot[bot] avatar Feb 26 '24 14:02 melvin-bot[bot]

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

melvin-bot[bot] avatar Feb 26 '24 14:02 melvin-bot[bot]

Proposal

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

Update Welcome Message on NewDot

What is the root cause of that problem?

This is a feature request

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

We need to update the workspace.inviteMessage.welcomeNote key to something like below:

welcomeNote: ({workspaceName, senderDisplayName, senderLogin, workspaceDescription, workspaceLink}: WelcomeNoteParams) => `
#${senderDisplayName} (${senderLogin}) invited you to Expensify
Hi there -

To join "${workspaceName}", [click here](${workspaceLink}) to start tracking your expenses!

They also added the message:
You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.

Additionally, here is the workspace description:
${workspaceDescription}
            `

Then when we use it, we should fill in the proper params for workspaceName, senderDisplayName, senderLogin, workspaceDescription. There're some edge cases like: senderDisplayName, senderLogin, workspaceDescription could be empty, then some parts of the message relating to those need to be omitted. For example, if the workspaceDescription is empty, the Additionally, here is the workspace description: part should not be included. Some minor conditioning logic will need to be added to the template to address these cases.

There could also be cases where the displayName and the login of the sender (current user) are the same, since the user did not set any custom names, in this case we likely should only include the displayName (equal to login) in the template, but this will be subject to the design team's decision. If the displayName is empty, we also should only show ${senderLogin} instead of #${senderDisplayName} (${senderLogin}).

Some further notes:

  • The workspaceLink is likely just our app domain (depending on the environment, for example on prod: https://new.expensify.com/) so the user can quickly click to login. This is the same as in the email sent to the invited user's email. If it's other links (like Workspace chat/settings link) then we'll use that.
  • The senderLogin (with SMS removed and proper phone number formatting) and senderDisplayName can be easily retrieved from the current logged in user's personal details
  • Workspace description will be the description field of the policy. However this field could be HTML, we need to decide how we want for format this to put in the template. I think stripping the HTML in this case should be fine, or we can convert the HTML back to markdown.

These cases can be addressed during the PR.

Similar changes will be needed for the ES translation.

What alternative solutions did you explore? (Optional)

For cases where senderDisplayName, senderLogin, workspaceDescription could be empty

dukenv0307 avatar Feb 26 '24 14:02 dukenv0307

Proposal

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

[Wave 5 - Remove Free Workspace Creation] Update Welcome Message on NewDot

What is the root cause of that problem?

Here, in the file i.e. in en.ts file https://github.com/Expensify/App/blob/9bfe961622d03de5ac8e18652bbb56dda5ed9f60/src/languages/en.ts#L1863-L1864

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

We need to make changes in workspace.inviteMessage.welcomeNote according to the above mentioned i.e. comment

What alternative solutions did you explore? (Optional)

N/A

ghost avatar Feb 26 '24 14:02 ghost

Proposal

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

Update the welcome Message when creating or inviting to workspace

What is the root cause of that problem?

its a feature, right now we are using the welcomeNote like this

welcomeNote: ({workspaceName}: WelcomeNoteParams) =>
    `You have been invited to ${workspaceName || 'a workspace'}! Download the Expensify mobile app at use.expensify.com/download to start tracking your expenses.`,

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

We need to add five params to the translation of the welcomeNote

  1. DisplayName and login of the admin
  2. Workspace name and Workspace invite link
  3. message added on the WorkspaceInviteMessagePage
  4. If Policy.description then show the last line
welcomeNote: ({
    displayName,
    login,
    workspaceName,
    workspaceLink,
    message,
    description,
})  =>  `#[${displayName}] ([${login}]) invited you to Expensify\n\n
            Hi there -\n\n
            
            To join ${workspaceName}, [click here](${workspaceLink}) to start tracking your expenses!\n\n
            
            They also added the message:\n
            ${message}\n\n
            
            ${description ? `Additionally, here is the workspace description:${description}`: ''}`,

What alternative solutions did you explore? (Optional)

none

jayeshmangwani avatar Feb 26 '24 15:02 jayeshmangwani

Proposal updated to clarify the cases

dukenv0307 avatar Feb 26 '24 15:02 dukenv0307

Proposal updated to clarify the cases

dukenv0307 avatar Feb 26 '24 16:02 dukenv0307

reviewing

Edit: actually, this is on hold for 2 issues.

situchan avatar Feb 28 '24 14:02 situchan

Still held on https://github.com/Expensify/App/issues/37151 and https://github.com/Expensify/App/issues/37149

bfitzexpensify avatar Mar 04 '24 01:03 bfitzexpensify

https://github.com/Expensify/App/issues/37151 and https://github.com/Expensify/App/issues/37149 were deployed to prod yesterday, so you can proceed with proposal review @situchan!

bfitzexpensify avatar Mar 06 '24 00:03 bfitzexpensify

@situchan will you be able to complete the proposal review today?

trjExpensify avatar Mar 06 '24 10:03 trjExpensify

yes, please remove HOLD from title.

situchan avatar Mar 06 '24 11:03 situchan

Yep, I've asked to confirm on that in Slack in the project channel here before I do: https://expensify.slack.com/archives/C036QM0SLJK/p1709723299888989

trjExpensify avatar Mar 06 '24 11:03 trjExpensify

I've taken it off HOLD.

tgolen avatar Mar 06 '24 15:03 tgolen

This is feature request but not dib issue. I recommend @dukenv0307 since they provided the most accurate solution than others. Proposal: https://github.com/Expensify/App/issues/37152#issuecomment-1964336610 🎀 👀 🎀 C+ reviewed

situchan avatar Mar 06 '24 15:03 situchan

Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] avatar Mar 06 '24 15:03 melvin-bot[bot]

❌ There was an error making the offer to @situchan for the Reviewer role. The BZ member will need to manually hire the contributor.

melvin-bot[bot] avatar Mar 06 '24 21:03 melvin-bot[bot]

❌ There was an error making the offer to @dukenv0307 for the Contributor role. The BZ member will need to manually hire the contributor.

melvin-bot[bot] avatar Mar 06 '24 21:03 melvin-bot[bot]

@dukenv0307 can we get an ETA on this PR please? Thanks!

trjExpensify avatar Mar 07 '24 22:03 trjExpensify

I'm working on the PR and will open it today. Thanks.

dukenv0307 avatar Mar 08 '24 02:03 dukenv0307

@youssef-lr @bfitzexpensify @situchan @dukenv0307 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

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

@situchan The PR is ready for review.

dukenv0307 avatar Mar 11 '24 02:03 dukenv0307

I can take over this issue as a C+ reviewer because @situchan is OOO in April

DylanDylann avatar Mar 30 '24 05:03 DylanDylann

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

melvin-bot[bot] avatar Apr 01 '24 16:04 melvin-bot[bot]

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

melvin-bot[bot] avatar Apr 01 '24 16:04 melvin-bot[bot]

@situchan is out OOO, reassigning a C+ via the auto-assigner for fairness.

mallenexpensify avatar Apr 01 '24 16:04 mallenexpensify

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

melvin-bot[bot] avatar Apr 01 '24 16:04 melvin-bot[bot]

@youssef-lr, @Gonals, @bfitzexpensify, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

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