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

5623 add an inviteteam onboarding step #5769

Merged
merged 39 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
00ac7ca
Replace title property
martmull Jun 5, 2024
0910d0d
WIP: Add InviteTeam page
martmull Jun 5, 2024
cce1556
Add separator line text component
martmull Jun 6, 2024
17548e6
Add actionLink to inviteTeam
martmull Jun 6, 2024
bf827e6
Add finish button
martmull Jun 6, 2024
2fddb82
Add new workspace State
martmull Jun 6, 2024
288accd
Update typeorm version to fix issue with index
martmull Jun 6, 2024
f69dfdf
Update SyncEmail step
martmull Jun 7, 2024
5bcc8c2
Update getCurrentUserQuery refetch policy
martmull Jun 7, 2024
bd6310c
Update email sanitization
martmull Jun 7, 2024
e7f8a49
Fix tests
martmull Jun 7, 2024
3259942
Disable invite team onboarding step when workspaceMember count > 1
martmull Jun 7, 2024
46acb7d
Fix tests
martmull Jun 7, 2024
c49ab80
Improve keyValuePair typing
martmull Jun 7, 2024
2344187
Remove workspace-state module
martmull Jun 7, 2024
a330eb1
Add onboardingStep value
martmull Jun 7, 2024
108cd43
Remove skip key values
martmull Jun 7, 2024
99910f3
Stop refetching currentUser only for workspace state
martmull Jun 7, 2024
3304333
Add an onboarding resolver
martmull Jun 10, 2024
096c51e
Fix hook
martmull Jun 10, 2024
342a65c
Fix skip inviteTeam
martmull Jun 10, 2024
1c35569
Add tests
martmull Jun 10, 2024
5ed4517
Remove useless stuff
martmull Jun 10, 2024
9fbba47
Fix wrong default layout display
martmull Jun 10, 2024
12bad71
Remove useless stuff
martmull Jun 10, 2024
2b6cad9
Fix tests
martmull Jun 10, 2024
32c8e8a
Fix ci
martmull Jun 10, 2024
9c7b501
Code review return
martmull Jun 10, 2024
27a0469
Split complex method
martmull Jun 10, 2024
3395a94
Organize files
martmull Jun 10, 2024
5de74e5
Fix storybook tests
martmull Jun 10, 2024
b76547c
Fix naming typo
martmull Jun 10, 2024
09be4b2
Code review: rename dto
martmull Jun 12, 2024
103da7d
Code review: use Light button
martmull Jun 12, 2024
0a44528
Code review: remove useEffect
martmull Jun 12, 2024
a3fdf8e
Add key enter action and focus first input
martmull Jun 12, 2024
3579592
Code review: Use Animated component
martmull Jun 12, 2024
c6fc433
Fix lint
martmull Jun 12, 2024
6eae0dd
Code review returns: Move key-value-pair-type definition from key val…
martmull Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"tslib": "^2.3.0",
"tsup": "^8.0.1",
"type-fest": "4.10.1",
"typeorm": "^0.3.17",
"typeorm": "^0.3.20",
"use-context-selector": "^2.0.0",
"use-debounce": "^10.0.0",
"uuid": "^9.0.0",
Expand Down
141 changes: 67 additions & 74 deletions packages/twenty-chrome-extension/src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,6 @@ export type CalendarChannel = {
syncCursor?: Maybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: Maybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: Maybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: Maybe<Scalars['DateTime']>;
/** Visibility */
Expand Down Expand Up @@ -1040,8 +1038,6 @@ export type CalendarChannelCreateInput = {
syncCursor?: InputMaybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: InputMaybe<Scalars['DateTime']>;
/** Visibility */
Expand Down Expand Up @@ -1176,8 +1172,6 @@ export type CalendarChannelFilterInput = {
syncCursor?: InputMaybe<StringFilter>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<FloatFilter>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<DateFilter>;
/** Update date */
updatedAt?: InputMaybe<DateFilter>;
/** Visibility */
Expand All @@ -1202,8 +1196,6 @@ export type CalendarChannelOrderByInput = {
syncCursor?: InputMaybe<OrderByDirection>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<OrderByDirection>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<OrderByDirection>;
/** Update date */
updatedAt?: InputMaybe<OrderByDirection>;
/** Visibility */
Expand All @@ -1228,8 +1220,6 @@ export type CalendarChannelUpdateInput = {
syncCursor?: InputMaybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: InputMaybe<Scalars['DateTime']>;
/** Visibility */
Expand Down Expand Up @@ -2640,20 +2630,18 @@ export type MessageChannel = {
isSyncEnabled?: Maybe<Scalars['Boolean']>;
/** Messages from the channel. */
messageChannelMessageAssociations?: Maybe<MessageChannelMessageAssociationConnection>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: Maybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: Maybe<Scalars['String']>;
/** Sync stage */
syncStage?: Maybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: Maybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: Maybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: Maybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: Maybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: Maybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: Maybe<Scalars['DateTime']>;
/** Channel Type */
type?: Maybe<MessageChannelTypeEnum>;
/** Update date */
Expand Down Expand Up @@ -2696,20 +2684,18 @@ export type MessageChannelCreateInput = {
isContactAutoCreationEnabled?: InputMaybe<Scalars['Boolean']>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<Scalars['Boolean']>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: InputMaybe<Scalars['String']>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: InputMaybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnum>;
/** Update date */
Expand Down Expand Up @@ -2740,21 +2726,19 @@ export type MessageChannelFilterInput = {
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<BooleanFilter>;
not?: InputMaybe<MessageChannelFilterInput>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<DateFilter>;
or?: InputMaybe<Array<InputMaybe<MessageChannelFilterInput>>>;
/** Last sync cursor */
syncCursor?: InputMaybe<StringFilter>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnumFilter>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<DateFilter>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnumFilter>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnumFilter>;
/** Last sync date */
syncedAt?: InputMaybe<DateFilter>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<FloatFilter>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<DateFilter>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnumFilter>;
/** Update date */
Expand Down Expand Up @@ -2900,20 +2884,18 @@ export type MessageChannelOrderByInput = {
isContactAutoCreationEnabled?: InputMaybe<OrderByDirection>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<OrderByDirection>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<OrderByDirection>;
/** Last sync cursor */
syncCursor?: InputMaybe<OrderByDirection>;
/** Sync stage */
syncStage?: InputMaybe<OrderByDirection>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<OrderByDirection>;
/** Sync status */
syncStatus?: InputMaybe<OrderByDirection>;
/** Sync sub status */
syncSubStatus?: InputMaybe<OrderByDirection>;
/** Last sync date */
syncedAt?: InputMaybe<OrderByDirection>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<OrderByDirection>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<OrderByDirection>;
/** Channel Type */
type?: InputMaybe<OrderByDirection>;
/** Update date */
Expand All @@ -2922,6 +2904,29 @@ export type MessageChannelOrderByInput = {
visibility?: InputMaybe<OrderByDirection>;
};

/** Sync stage */
export enum MessageChannelSyncStageEnum {
/** Failed */
Failed = 'FAILED',
/** Full messages list fetch pending */
FullMessageListFetchPending = 'FULL_MESSAGE_LIST_FETCH_PENDING',
/** Messages import ongoing */
MessagesImportOngoing = 'MESSAGES_IMPORT_ONGOING',
/** Messages import pending */
MessagesImportPending = 'MESSAGES_IMPORT_PENDING',
/** Messages list fetch ongoing */
MessageListFetchOngoing = 'MESSAGE_LIST_FETCH_ONGOING',
/** Partial messages list fetch pending */
PartialMessageListFetchPending = 'PARTIAL_MESSAGE_LIST_FETCH_PENDING'
}

export type MessageChannelSyncStageEnumFilter = {
eq?: InputMaybe<MessageChannelSyncStageEnum>;
in?: InputMaybe<Array<InputMaybe<MessageChannelSyncStageEnum>>>;
is?: InputMaybe<FilterIs>;
neq?: InputMaybe<MessageChannelSyncStageEnum>;
};

/** Sync status */
export enum MessageChannelSyncStatusEnum {
/** Completed */
Expand Down Expand Up @@ -2949,29 +2954,6 @@ export type MessageChannelSyncStatusEnumFilter = {
neq?: InputMaybe<MessageChannelSyncStatusEnum>;
};

/** Sync sub status */
export enum MessageChannelSyncSubStatusEnum {
/** Failed */
Failed = 'FAILED',
/** Full messages list fetch pending */
FullMessageListFetchPending = 'FULL_MESSAGE_LIST_FETCH_PENDING',
/** Messages import ongoing */
MessagesImportOngoing = 'MESSAGES_IMPORT_ONGOING',
/** Messages import pending */
MessagesImportPending = 'MESSAGES_IMPORT_PENDING',
/** Messages list fetch ongoing */
MessageListFetchOngoing = 'MESSAGE_LIST_FETCH_ONGOING',
/** Partial messages list fetch pending */
PartialMessageListFetchPending = 'PARTIAL_MESSAGE_LIST_FETCH_PENDING'
}

export type MessageChannelSyncSubStatusEnumFilter = {
eq?: InputMaybe<MessageChannelSyncSubStatusEnum>;
in?: InputMaybe<Array<InputMaybe<MessageChannelSyncSubStatusEnum>>>;
is?: InputMaybe<FilterIs>;
neq?: InputMaybe<MessageChannelSyncSubStatusEnum>;
};

/** Channel Type */
export enum MessageChannelTypeEnum {
/** Email */
Expand Down Expand Up @@ -3001,20 +2983,18 @@ export type MessageChannelUpdateInput = {
isContactAutoCreationEnabled?: InputMaybe<Scalars['Boolean']>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<Scalars['Boolean']>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: InputMaybe<Scalars['String']>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: InputMaybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnum>;
/** Update date */
Expand Down Expand Up @@ -3572,8 +3552,9 @@ export type Mutation = {
generateTransientToken: TransientToken;
impersonate: Verify;
renewToken: AuthTokens;
sendInviteLink: SendInviteLink;
signUp: LoginToken;
skipSyncEmailOnboardingStep: SkipSyncEmailOnboardingStep;
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
track: Analytics;
updateActivities?: Maybe<Array<Activity>>;
updateActivity?: Maybe<Activity>;
Expand Down Expand Up @@ -4411,6 +4392,11 @@ export type MutationRenewTokenArgs = {
};


export type MutationSendInviteLinkArgs = {
emails: Array<Scalars['String']>;
};


export type MutationSignUpArgs = {
captchaToken?: InputMaybe<Scalars['String']>;
email: Scalars['String'];
Expand Down Expand Up @@ -4817,6 +4803,17 @@ export type ObjectFieldsConnection = {
pageInfo: PageInfo;
};

/** Onboarding step */
export enum OnboardingStep {
InviteTeam = 'INVITE_TEAM',
SyncEmail = 'SYNC_EMAIL'
}

export type OnboardingStepSuccess = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};

/** An opportunity */
export type Opportunity = {
/** Activities tied to the opportunity */
Expand Down Expand Up @@ -6186,6 +6183,11 @@ export enum RemoteTableStatus {
Synced = 'SYNCED'
}

export type SendInviteLink = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};

export type Sentry = {
dsn?: Maybe<Scalars['String']>;
environment?: Maybe<Scalars['String']>;
Expand All @@ -6196,11 +6198,6 @@ export type SessionEntity = {
url?: Maybe<Scalars['String']>;
};

export type SkipSyncEmailOnboardingStep = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};

/** Sort Directions */
export enum SortDirection {
Asc = 'ASC',
Expand Down Expand Up @@ -6537,12 +6534,12 @@ export type User = {
firstName: Scalars['String'];
id: Scalars['UUID'];
lastName: Scalars['String'];
onboardingStep?: Maybe<OnboardingStep>;
passwordHash?: Maybe<Scalars['String']>;
/** @deprecated field migrated into the AppTokens Table ref: https://github.com/twentyhq/twenty/issues/5021 */
passwordResetToken?: Maybe<Scalars['String']>;
/** @deprecated field migrated into the AppTokens Table ref: https://github.com/twentyhq/twenty/issues/5021 */
passwordResetTokenExpiresAt?: Maybe<Scalars['DateTime']>;
state: UserState;
supportUserHash?: Maybe<Scalars['String']>;
updatedAt: Scalars['DateTime'];
workspaceMember?: Maybe<WorkspaceMember>;
Expand All @@ -6564,10 +6561,6 @@ export type UserMappingOptionsUser = {
user?: Maybe<Scalars['String']>;
};

export type UserState = {
skipSyncEmailOnboardingStep?: Maybe<Scalars['Boolean']>;
};

export type UserWorkspace = {
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;
Expand Down
2 changes: 2 additions & 0 deletions packages/twenty-front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { RecordShowPage } from '~/pages/object-record/RecordShowPage';
import { ChooseYourPlan } from '~/pages/onboarding/ChooseYourPlan';
import { CreateProfile } from '~/pages/onboarding/CreateProfile';
import { CreateWorkspace } from '~/pages/onboarding/CreateWorkspace';
import { InviteTeam } from '~/pages/onboarding/InviteTeam';
import { PaymentSuccess } from '~/pages/onboarding/PaymentSuccess';
import { SyncEmails } from '~/pages/onboarding/SyncEmails';
import { SettingsAccounts } from '~/pages/settings/accounts/SettingsAccounts';
Expand Down Expand Up @@ -143,6 +144,7 @@ const createRouter = (isBillingEnabled?: boolean) =>
<Route path={AppPath.CreateWorkspace} element={<CreateWorkspace />} />
<Route path={AppPath.CreateProfile} element={<CreateProfile />} />
<Route path={AppPath.SyncEmails} element={<SyncEmails />} />
<Route path={AppPath.InviteTeam} element={<InviteTeam />} />
<Route path={AppPath.PlanRequired} element={<ChooseYourPlan />} />
<Route
path={AppPath.PlanRequiredSuccess}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ export const PageChangeEffect = () => {
setHotkeyScope(PageHotkeyScope.CreateWokspace);
break;
}
case isMatchingLocation(AppPath.SyncEmails): {
setHotkeyScope(PageHotkeyScope.SyncEmail);
break;
}
case isMatchingLocation(AppPath.InviteTeam): {
setHotkeyScope(PageHotkeyScope.InviteTeam);
break;
}
case isMatchingLocation(AppPath.PlanRequired): {
setHotkeyScope(PageHotkeyScope.PlanRequired);
break;
Expand Down
Loading
Loading