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

feat: new onboarding #9066

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
8110114
feat: Updates design for signup page for onboarding (#8942)
nithindavid Mar 4, 2024
b9d177b
feat: Adds steps to show onboarding view after signup (#8966)
nithindavid Mar 4, 2024
00f3133
feat: fallback to empty string if clearbit name is null
scmmishra Mar 4, 2024
059a3d1
Minor merge fixes
nithindavid Mar 4, 2024
12675dc
refactor: setup base modal component
scmmishra Mar 4, 2024
efe7c7e
fix: gradient colors
scmmishra Mar 4, 2024
481c3d7
fix: spacing
scmmishra Mar 4, 2024
6a209c7
fix: button width
scmmishra Mar 4, 2024
98ccb88
fix: input colors
scmmishra Mar 4, 2024
f9b740f
refactor: use simpler validation
scmmishra Mar 4, 2024
8902fbe
fix: font size for text area
scmmishra Mar 4, 2024
a0f0172
fix: founders note
scmmishra Mar 4, 2024
fd480cd
refactor: simplify founders note component
scmmishra Mar 4, 2024
1c5f1be
feat: use display name if available
scmmishra Mar 4, 2024
550490a
feat: remove the need for conditional data prefill
scmmishra Mar 7, 2024
9cdb157
Merge branch 'develop' into feat/onboarding-cw-2667
pranavrajs Mar 7, 2024
f8cd865
chore: add deprecation notice
scmmishra Mar 7, 2024
f0900ae
Merge branch 'feat/onboarding-cw-2667' of github.com:chatwoot/chatwoo…
scmmishra Mar 7, 2024
898376c
test: auth utils
scmmishra Mar 7, 2024
aca3f3d
Revert "test: auth utils"
scmmishra Mar 7, 2024
6c62b9e
test: auth.spec.js
scmmishra Mar 7, 2024
b25fa9d
refactor: fallback on industry
scmmishra Feb 29, 2024
a608a4d
refactor: normalize company size
scmmishra Mar 7, 2024
adf4e13
feat: better industry options
scmmishra Mar 7, 2024
ff3376b
fix: industry value
scmmishra Feb 29, 2024
9d71587
feat: allow webp
scmmishra Feb 29, 2024
01e0569
fix: avatar size
scmmishra Mar 7, 2024
89e8c09
refactor: move options to onboarding helper
scmmishra Mar 7, 2024
e0ffcb5
test: onboarding helper
scmmishra Mar 7, 2024
995fbe7
fix: layout shift
scmmishra Mar 7, 2024
869a869
feat: delete CutoutSVG.vue
scmmishra Mar 7, 2024
f7d8502
fix: signup layout
scmmishra Mar 7, 2024
4110245
fix: remove unused style
scmmishra Mar 7, 2024
a3e4f8a
refactor: use script setup syntax
scmmishra Mar 7, 2024
be3c52d
fix: onboarding layout
scmmishra Mar 7, 2024
104b05b
feat: update modal radius
scmmishra Mar 7, 2024
75a8f60
fix: enter key should toggle email
scmmishra Mar 7, 2024
863f7df
feat: add email validation to invite
scmmishra Mar 7, 2024
36f6187
refactor: better handling of input events
scmmishra Mar 7, 2024
163b25b
refactor: event handling in text area
scmmishra Mar 7, 2024
7d20322
feat: update size limit
scmmishra Mar 7, 2024
35fbc11
Merge branch 'develop' into feat/onboarding-cw-2667
scmmishra Mar 8, 2024
69a139e
feat: handle onboarding
scmmishra Mar 11, 2024
cef28ff
feat: handle redirecturl
scmmishra Mar 11, 2024
23ea5f7
fix: path
scmmishra Mar 11, 2024
bd47c53
fix: url
scmmishra Mar 11, 2024
a527769
feat: remove base url
scmmishra Mar 11, 2024
f1d87f9
fix: remove bg contain
scmmishra Mar 11, 2024
235f5af
feat: add mock adapter
scmmishra Mar 11, 2024
a117589
feat: use phone input
scmmishra Mar 11, 2024
3102cc4
fix: remove mb-4
scmmishra Mar 11, 2024
9cd89b8
Updates assets
nithindavid Mar 11, 2024
da68a49
Merge branch 'develop' into feat/onboarding-cw-2667
muhsin-k Mar 12, 2024
206e631
feat: skip founders note for non-cloud users
scmmishra Mar 13, 2024
abb1d1e
refactor: remove navigateToSavedStep
scmmishra Mar 13, 2024
d910869
feat: translate founders note
scmmishra Mar 13, 2024
6695400
refactor: remove trim
scmmishra Mar 13, 2024
ba8fb73
refactor: use object destructuring
scmmishra Mar 13, 2024
72f99dc
fix: add min height for captcha to avoid layout shift
scmmishra Mar 13, 2024
a93fd1b
fix: spinner size
scmmishra Mar 13, 2024
3c919f4
refactor: use setup syntax
scmmishra Mar 13, 2024
2495ce4
feat: use "free" account title
scmmishra Mar 13, 2024
2ccb224
fix: screen height for onboarding
scmmishra Mar 14, 2024
5bacdbb
fix: bg size
scmmishra Mar 14, 2024
9713ee2
feat: remove gravatar
scmmishra Mar 14, 2024
c9ff7a6
feat: add scheduling link as a config
scmmishra Mar 18, 2024
867f4ed
feat: add onboarding scheduling link
scmmishra Mar 18, 2024
f693864
feat: use correct link
scmmishra Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/controllers/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def set_global_config
'LOGOUT_REDIRECT_LINK',
'DISABLE_USER_PROFILE_UPDATE',
'DEPLOYMENT_ENV',
'CSML_EDITOR_HOST'
'CSML_EDITOR_HOST',
'ONBOARDING_SCHEDULING_LINK'
).merge(app_config)
end

Expand Down
15 changes: 13 additions & 2 deletions app/controllers/devise_overrides/omniauth_callbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ def sign_up_user

create_account_for_user
token = @resource.send(:set_reset_password_token)
frontend_url = ENV.fetch('FRONTEND_URL', nil)
redirect_to "#{frontend_url}/app/auth/password/edit?config=default&reset_password_token=#{token}"
base_url = password_reset_url
onboarding_url = account_onboarding_url(@account)
redirect_to "#{base_url}?config=default&reset_password_token=#{token}&route_url=#{onboarding_url}"
end

def login_page_url(error: nil, email: nil, sso_auth_token: nil)
Expand Down Expand Up @@ -72,4 +73,14 @@ def create_account_for_user
def default_devise_mapping
'user'
end

def account_onboarding_url(account)
"/app/accounts/#{account.id}/start/setup-profile"
end

def password_reset_url
frontend_url = ENV.fetch('FRONTEND_URL', nil)

"#{frontend_url}/app/auth/password/edit"
end
end
12 changes: 6 additions & 6 deletions app/javascript/dashboard/assets/scss/widgets/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ input:focus {
}

// Inputs
input[type='text'],
input[type='number'],
input[type='password'],
input[type='date'],
input[type='email'],
input[type='url'] {
input[type='text']:not(.reset-base),
input[type='number']:not(.reset-base),
input[type='password']:not(.reset-base),
input[type='date']:not(.reset-base),
input[type='email']:not(.reset-base),
input[type='url']:not(.reset-base) {
@apply block box-border w-full transition-colors focus:border-woot-500 dark:focus:border-woot-600 duration-[0.25s] ease-[ease-in-out] h-10 appearance-none mx-0 mt-0 mb-4 p-2 rounded-md text-base font-normal bg-white dark:bg-slate-900 focus:bg-white focus:dark:bg-slate-900 text-slate-900 dark:text-slate-100 border border-solid border-slate-200 dark:border-slate-600;

&[disabled] {
Expand Down
20 changes: 13 additions & 7 deletions app/javascript/dashboard/components/widgets/forms/PhoneInput.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="phone-input--wrap relative">
<div class="relative phone-input--wrap">
<div class="phone-input" :class="{ 'has-error': error }">
<div
class="cursor-pointer py-2 pr-1.5 pl-2 rounded-tl-md rounded-bl-md flex items-center justify-center gap-1.5 bg-slate-25 dark:bg-slate-700 h-10 w-14"
Expand All @@ -13,14 +13,16 @@
</div>
<span
v-if="activeDialCode"
class="flex bg-white dark:bg-slate-900 font-medium text-slate-800 dark:text-slate-100 font-normal text-base leading-normal py-2 pl-2 pr-0"
class="flex py-2 pl-2 pr-0 font-normal leading-normal bg-white dark:bg-slate-900 text-slate-800 dark:text-slate-100"
:class="fontSize"
>
{{ activeDialCode }}
</span>
<input
:value="phoneNumber"
type="tel"
class="phone-input--field"
:class="fontSize"
:placeholder="placeholder"
:readonly="readonly"
:style="styles"
Expand Down Expand Up @@ -49,20 +51,20 @@
}"
@click="onSelectCountry(country)"
>
<span class="text-base mr-1">{{ country.emoji }}</span>
<span class="mr-1 text-base">{{ country.emoji }}</span>

<span
class="max-w-[7.5rem] overflow-hidden text-ellipsis whitespace-nowrap"
>
{{ country.name }}
</span>
<span class="ml-1 text-slate-300 dark:text-slate-300 text-xs">{{
<span class="ml-1 text-xs text-slate-300 dark:text-slate-300">{{
country.dial_code
}}</span>
</div>
<div v-if="filteredCountriesBySearch.length === 0">
<span
class="flex items-center justify-center text-sm text-slate-500 dark:text-slate-300 mt-4"
class="flex items-center justify-center mt-4 text-sm text-slate-500 dark:text-slate-300"
>
No results found
</span>
Expand Down Expand Up @@ -104,6 +106,10 @@ export default {
type: Boolean,
default: false,
},
fontSize: {
type: String,
default: 'text-base',
},
},
data() {
return {
Expand Down Expand Up @@ -254,15 +260,15 @@ export default {
<style scoped lang="scss">
.phone-input--wrap {
.phone-input {
@apply flex items-center dark:bg-slate-900 justify-start mb-4 rounded-md border border-solid border-slate-200 dark:border-slate-600;
@apply flex items-center dark:bg-slate-900 justify-start rounded-md border border-solid border-slate-200 dark:border-slate-600;

&.has-error {
@apply border border-solid border-red-400 dark:border-red-400;
}
}

.phone-input--field {
@apply mb-0 rounded-tl-none rounded-bl-none border-0 w-full dark:bg-slate-900 text-base px-1.5;
@apply mb-0 rounded-tl-none rounded-bl-none border-0 w-full dark:bg-slate-900 px-1.5;

&::placeholder {
@apply font-normal;
Expand Down
94 changes: 93 additions & 1 deletion app/javascript/dashboard/i18n/locale/en/signup.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"REGISTER": {
"TRY_WOOT": "Create an account",
"TRY_WOOT_CLOUD": "Create a free account",
"TITLE": "Register",
"TESTIMONIAL_HEADER": "All it takes is one step to move forward",
"TESTIMONIAL_CONTENT": "You're one step away from engaging your customers, retaining them and finding new ones.",
Expand Down Expand Up @@ -40,5 +41,96 @@
},
"SUBMIT": "Create account",
"HAVE_AN_ACCOUNT": "Already have an account?"
},
"START_ONBOARDING": {
"PROFILE": {
"INTRO": "Welcome, let’s get started.",
"TITLE": "Set up profile",
"BODY": "These are details visible to end users, to make a positive first impression.",
"SUBMIT": {
"BUTTON": "Continue to company setup",
"ERROR": "Error in setting up profile, try again.",
"SUCCESS": "🔥 Lets add your business details"
},
"AVATAR": {
"LABEL": "Avatar",
"PLACEHOLDER": "Upload Profile Image"
},
"FULL_NAME": {
"LABEL": "Full name",
"PLACEHOLDER": "Enter your full name",
"ERROR": "Add a valid full name"
},
"DISPLAY_NAME": {
"LABEL": "Display name (Optional)",
"PLACEHOLDER": "Enter the name you want to display your customers",
"ERROR": "Add a valid display name or leave it blank"
},
"PHONE_NUMBER": {
"LABEL": "Phone number (Optional)",
"PLACEHOLDER": "Enter your phone number"
},
"SIGNATURE": {
"LABEL": "Signature",
"PLACEHOLDER": "Add a signature for your messages. You can set this later in your settings."
}
},
"COMPANY": {
"PAGE_TITLE": "Hello %{userName},\nwe are almost done.",
"TITLE": "Tell us about your company",
"BODY": "In this section, we'll set up the language, timezone, and company size. This information allows us to provide contextually accurate information and suggest relevant features for you.",
"SUBMIT": {
"BUTTON": "Continue to team setup",
"ERROR": "Error in setting up company, try again.",
"SUCCESS": "🚀 Lets invite your team"
},
"COMPANY_NAME": {
"LABEL": "Company name",
"PLACEHOLDER": "Enter your company name",
"ERROR": "Company name is too short."
},
"INDUSTRY": {
"LABEL": "Industry",
"PLACEHOLDER": "Select your industry"
},
"TIMEZONE": {
"LABEL": "Timezone",
"PLACEHOLDER": "What timezone do you work from?"
},
"LOCALE": {
"LABEL": "Language",
"PLACEHOLDER": "Select the language you want to use"
},
"SIZE": {
"LABEL": "Company size",
"PLACEHOLDER": "How many people work at your company?"
}
},
"INVITE_TEAM": {
"TITLE": "Invite your team",
"ADD": "Add",
"LIST_EMPTY": "No members to invite",
"BODY": "Invite your team members to Chatwoot. You can add them later as well.",
"PLACEHOLDER": "robin@chatwoot.com",
"SKIP": "Skip for now",
"EMAIL_ERROR": "Please enter a valid email address",
"SUBMIT": {
"BUTTON": "Send invitations",
"ERROR": "Error while inviting team members, try again.",
"NO_MEMBER_ERROR": "Please add atleast one team member or skip this step",
"SUCCESS": "🪄 Setup complete"
}
},
"FOUNDERS_NOTE": {
"NOTE": {
"HEY": "Hey {name},",
"PARAGRAPH_1": "I'm Pranav, one of the co-founders at Chatwoot. Thanks for checking out Chatwoot. We're eager to understand your needs and expectations.",
"PARAGRAPH_2": "If you are facing trouble using the app or achieving your use case, we want to help you as quickly as possible.",
"PARAGRAPH_3": "Feel free to <a target=\"blank\" href=\"{scheduleLink}\">schedule a call</a> with our team. We are open to your feedback. Talk soon!",
"SIGNATURE": "Pranav, <br />Co-founder & CEO, Chatwoot"
},
"TITLE": "A note from the founder",
"SUBMIT": "Go to dashboard"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
:value="phoneNumber"
:error="isPhoneNumberNotValid"
:placeholder="$t('CONTACT_FORM.FORM.PHONE_NUMBER.PLACEHOLDER')"
class="mb-4"
@input="onPhoneNumberInputChange"
@blur="$v.phoneNumber.$touch"
@setCode="setPhoneCode"
Expand Down
36 changes: 36 additions & 0 deletions app/javascript/dashboard/routes/dashboard/dashboard.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import helpcenterRoutes from './helpcenter/helpcenter.routes';

const AppContainer = () => import('./Dashboard.vue');
const Suspended = () => import('./suspended/Index.vue');
const RouteLayout = () => import('v3/views/onboarding/RouteLayout.vue');
const SetupProfile = () => import('v3/views/onboarding/SetupProfile.vue');
const SetupCompany = () => import('v3/views/onboarding/SetupCompany.vue');
const InviteTeam = () => import('v3/views/onboarding/InviteTeam.vue');
const FoundersNote = () => import('v3/views/onboarding/FoundersNote.vue');

export default {
routes: [
Expand All @@ -31,5 +36,36 @@ export default {
roles: ['administrator', 'agent'],
component: Suspended,
},
{
path: frontendURL('accounts/:accountId/start'),
component: RouteLayout,
roles: ['administrator'],
children: [
{
path: frontendURL('accounts/:accountId/start/setup-profile'),
name: 'onboarding_setup_profile',
component: SetupProfile,
roles: ['administrator'],
},
{
path: frontendURL('accounts/:accountId/start/setup-company'),
name: 'onboarding_setup_company',
component: SetupCompany,
roles: ['administrator'],
},
{
path: frontendURL('accounts/:accountId/start/invite-team'),
name: 'onboarding_invite_team',
component: InviteTeam,
roles: ['administrator'],
},
],
},
{
path: frontendURL('accounts/:accountId/start/founders-note'),
name: 'onboarding_founders_note',
component: FoundersNote,
roles: ['administrator'],
},
],
};