-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor onboarding user vars to be absent when user is fully onboard…
…ed (#6531) In this PR: - take feedbacks from: #6530 / #6529 / #6526 / #6512 - refactor onboarding uservars to be absent when the user is fully onboarded: isStepComplete ==> isStepIncomplete - introduce a new workspace.activationStatus: CREATION_ONGOING I'm retesting the whole flow: - with/without BILLING - sign in with/without SSO - sign up with/without SSO - another workspaceMembers join the team - subscriptionCanceled - access to billingPortal
- Loading branch information
1 parent
c543716
commit 0320402
Showing
49 changed files
with
517 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 19 additions & 7 deletions
26
packages/twenty-front/src/modules/prefetch/constants/PrefetchConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import { RecordGqlOperationSignature } from '@/object-record/graphql/types/RecordGqlOperationSignature'; | ||
import { FIND_ALL_FAVORITES_OPERATION_SIGNATURE } from '@/prefetch/query-keys/FindAllFavoritesOperationSignature'; | ||
import { FIND_ALL_VIEWS_OPERATION_SIGNATURE } from '@/prefetch/query-keys/FindAllViewsOperationSignature'; | ||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; | ||
import { RecordGqlOperationSignatureFactory } from '@/object-record/graphql/types/RecordGqlOperationSignatureFactory'; | ||
import { findAllFavoritesOperationSignatureFactory } from '@/prefetch/operation-signatures/factories/findAllFavoritesOperationSignatureFactory'; | ||
import { findAllViewsOperationSignatureFactory } from '@/prefetch/operation-signatures/factories/findAllViewsOperationSignatureFactory'; | ||
import { PrefetchKey } from '@/prefetch/types/PrefetchKey'; | ||
|
||
export const PREFETCH_CONFIG: Record<PrefetchKey, RecordGqlOperationSignature> = | ||
export const PREFETCH_CONFIG: Record< | ||
PrefetchKey, | ||
{ | ||
ALL_VIEWS: FIND_ALL_VIEWS_OPERATION_SIGNATURE, | ||
ALL_FAVORITES: FIND_ALL_FAVORITES_OPERATION_SIGNATURE, | ||
}; | ||
objectNameSingular: CoreObjectNameSingular; | ||
operationSignatureFactory: RecordGqlOperationSignatureFactory; | ||
} | ||
> = { | ||
ALL_VIEWS: { | ||
objectNameSingular: CoreObjectNameSingular.View, | ||
operationSignatureFactory: findAllViewsOperationSignatureFactory, | ||
}, | ||
ALL_FAVORITES: { | ||
objectNameSingular: CoreObjectNameSingular.Favorite, | ||
operationSignatureFactory: findAllFavoritesOperationSignatureFactory, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ules/prefetch/operation-signatures/factories/findAllFavoritesOperationSignatureFactory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; | ||
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem'; | ||
import { RecordGqlOperationSignatureFactory } from '@/object-record/graphql/types/RecordGqlOperationSignatureFactory'; | ||
import { generateDepthOneRecordGqlFields } from '@/object-record/graphql/utils/generateDepthOneRecordGqlFields'; | ||
|
||
export const findAllFavoritesOperationSignatureFactory: RecordGqlOperationSignatureFactory = | ||
({ objectMetadataItem }: { objectMetadataItem: ObjectMetadataItem }) => ({ | ||
objectNameSingular: CoreObjectNameSingular.Favorite, | ||
variables: {}, | ||
fields: { | ||
...generateDepthOneRecordGqlFields({ | ||
objectMetadataItem, | ||
}), | ||
}, | ||
}); |
24 changes: 24 additions & 0 deletions
24
.../modules/prefetch/operation-signatures/factories/findAllViewsOperationSignatureFactory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; | ||
import { RecordGqlOperationSignatureFactory } from '@/object-record/graphql/types/RecordGqlOperationSignatureFactory'; | ||
|
||
export const findAllViewsOperationSignatureFactory: RecordGqlOperationSignatureFactory = | ||
() => ({ | ||
objectNameSingular: CoreObjectNameSingular.View, | ||
variables: {}, | ||
fields: { | ||
id: true, | ||
createdAt: true, | ||
updatedAt: true, | ||
isCompact: true, | ||
objectMetadataId: true, | ||
position: true, | ||
type: true, | ||
kanbanFieldMetadataId: true, | ||
name: true, | ||
icon: true, | ||
key: true, | ||
viewFilters: true, | ||
viewSorts: true, | ||
viewFields: true, | ||
}, | ||
}); |
8 changes: 0 additions & 8 deletions
8
packages/twenty-front/src/modules/prefetch/query-keys/FindAllFavoritesOperationSignature.ts
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
packages/twenty-front/src/modules/prefetch/query-keys/FindAllViewsOperationSignature.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/twenty-front/src/modules/ui/layout/states/ShowPageRecoilScopeContext.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable no-console */ | ||
import { Injectable } from '@nestjs/common'; | ||
|
||
import { existsSync } from 'fs'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.