Skip to content

Commit ee8db2f

Browse files
authored
chore: remove pilot references (#7083)
1 parent 975dda9 commit ee8db2f

File tree

19 files changed

+16
-75
lines changed

19 files changed

+16
-75
lines changed

packages/app/src/app/graphql/types.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ export type TemplateFragmentDashboardFragment = {
21872187

21882188
export type TeamFragmentDashboardFragment = { __typename?: 'Team' } & Pick<
21892189
Team,
2190-
'id' | 'name' | 'description' | 'creatorId' | 'avatarUrl' | 'joinedPilotAt'
2190+
'id' | 'name' | 'description' | 'creatorId' | 'avatarUrl'
21912191
> & {
21922192
settings: Maybe<
21932193
{ __typename?: 'WorkspaceSandboxSettings' } & Pick<
@@ -2223,13 +2223,7 @@ export type TeamFragmentDashboardFragment = { __typename?: 'Team' } & Pick<
22232223

22242224
export type CurrentTeamInfoFragmentFragment = { __typename?: 'Team' } & Pick<
22252225
Team,
2226-
| 'id'
2227-
| 'creatorId'
2228-
| 'description'
2229-
| 'inviteToken'
2230-
| 'joinedPilotAt'
2231-
| 'name'
2232-
| 'avatarUrl'
2226+
'id' | 'creatorId' | 'description' | 'inviteToken' | 'name' | 'avatarUrl'
22332227
> & {
22342228
users: Array<
22352229
{ __typename?: 'User' } & Pick<User, 'id' | 'avatarUrl' | 'username'>
@@ -2306,7 +2300,6 @@ export type ProjectFragment = { __typename?: 'Project' } & {
23062300

23072301
export type _CreateTeamMutationVariables = Exact<{
23082302
name: Scalars['String'];
2309-
pilot: Maybe<Scalars['Boolean']>;
23102303
}>;
23112304

23122305
export type _CreateTeamMutation = { __typename?: 'RootMutationType' } & {
@@ -3757,8 +3750,5 @@ export type JoinTeamByTokenMutationVariables = Exact<{
37573750
}>;
37583751

37593752
export type JoinTeamByTokenMutation = { __typename?: 'RootMutationType' } & {
3760-
redeemTeamInviteToken: { __typename?: 'Team' } & Pick<
3761-
Team,
3762-
'id' | 'name' | 'joinedPilotAt'
3763-
>;
3753+
redeemTeamInviteToken: { __typename?: 'Team' } & Pick<Team, 'id' | 'name'>;
37643754
};

packages/app/src/app/overmind/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ type ModalName =
250250
| 'sandboxPicker'
251251
| 'minimumPrivacy'
252252
| 'addMemberToWorkspace'
253-
| 'pilotPayment'
253+
| 'legacyPayment'
254254
| 'whatsNew';
255255

256256
export const modalOpened = (

packages/app/src/app/overmind/effects/gql/dashboard/fragments.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export const teamFragmentDashboard = gql`
119119
description
120120
creatorId
121121
avatarUrl
122-
joinedPilotAt
123122
settings {
124123
minimumPrivacy
125124
}
@@ -157,7 +156,6 @@ export const currentTeamInfoFragment = gql`
157156
creatorId
158157
description
159158
inviteToken
160-
joinedPilotAt
161159
name
162160
avatarUrl
163161

packages/app/src/app/overmind/effects/gql/dashboard/mutations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ export const createTeam: Query<
9696
_CreateTeamMutation,
9797
_CreateTeamMutationVariables
9898
> = gql`
99-
mutation _CreateTeam($name: String!, $pilot: Boolean) {
100-
createTeam(name: $name, pilot: $pilot) {
99+
mutation _CreateTeam($name: String!) {
100+
createTeam(name: $name) {
101101
...teamFragmentDashboard
102102
}
103103
}

packages/app/src/app/overmind/internalActions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,6 @@ export const trackCurrentTeams = async ({ effects, state }: Context) => {
568568
export const identifyCurrentUser = async ({ state, effects }: Context) => {
569569
const user = state.user;
570570
if (user) {
571-
effects.analytics.identify('pilot', user.experiments.inPilot);
572-
effects.browser.storage.set('pilot', user.experiments.inPilot);
573571
Object.entries(user.metadata).forEach(([key, value]) => {
574572
if (value) {
575573
effects.analytics.identify(key, value);

packages/app/src/app/overmind/namespaces/dashboard/actions.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,17 +1075,14 @@ export const createTeam = async (
10751075
{ effects, actions, state }: Context,
10761076
{
10771077
teamName,
1078-
pilot = false,
10791078
}: {
10801079
teamName: string;
1081-
pilot?: boolean;
10821080
}
10831081
) => {
10841082
try {
10851083
effects.analytics.track('Team - Create Team', { dashboardVersion: 2 });
10861084
const { createTeam: newTeam } = await effects.gql.mutations.createTeam({
10871085
name: teamName,
1088-
pilot,
10891086
});
10901087
state.dashboard.teams = [...state.dashboard.teams, newTeam];
10911088
actions.setActiveTeam({ id: newTeam.id });
@@ -1550,7 +1547,6 @@ export const setTeamMinimumPrivacy = async (
15501547
}
15511548
};
15521549

1553-
15541550
export const setWorkspaceSandboxSettings = async (
15551551
{ state, effects }: Context,
15561552
{

packages/app/src/app/pages/Dashboard/Content/routes/Settings/TeamSettings/ManageSubscription/index.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useAppState } from 'app/overmind';
33
import {
44
SubscriptionStatus,
55
TeamMemberAuthorization,
6-
SubscriptionOrigin,
76
SubscriptionPaymentProvider,
87
} from 'app/graphql/types';
98
import { useLocation, useHistory } from 'react-router-dom';
@@ -12,7 +11,6 @@ import { Stack, Text } from '@codesandbox/components';
1211

1312
import { Card } from '../../components';
1413
import { Upgrade } from './upgrade';
15-
import { Pilot } from './pilot';
1614
import { Paddle } from './paddle';
1715
import { Stripe } from './stripe';
1816
import { ProcessingPayment } from '../../components/ProcessingPayment';
@@ -58,10 +56,6 @@ export const ManageSubscription = () => {
5856
);
5957

6058
const renderProvider = () => {
61-
if (team.subscription?.origin === SubscriptionOrigin.Pilot) {
62-
return <Pilot />;
63-
}
64-
6559
if (
6660
team?.subscription?.paymentProvider === SubscriptionPaymentProvider.Paddle
6761
) {

packages/app/src/app/pages/Dashboard/Content/routes/Settings/TeamSettings/ManageSubscription/pilot.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/app/src/app/pages/Dashboard/Content/routes/Settings/TeamSettings/WorkspaceSettings.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
TeamMemberAuthorization,
2323
SubscriptionType,
2424
SubscriptionInterval,
25-
SubscriptionOrigin,
2625
CurrentTeamInfoFragmentFragment,
2726
} from 'app/graphql/types';
2827
import { Card } from '../components';
@@ -115,13 +114,10 @@ export const WorkspaceSettings = () => {
115114
// throw them a confirmation modal
116115
const confirmNewMemberAddition =
117116
team?.subscription &&
118-
team?.subscription.origin !== SubscriptionOrigin.Pilot &&
119117
numberOfUnusedSeats === 0 &&
120118
newMemberAuthorization !== TeamMemberAuthorization.Read;
121119
const confirmMemberRoleChange =
122-
team?.subscription &&
123-
team?.subscription.origin !== SubscriptionOrigin.Pilot &&
124-
numberOfUnusedSeats === 0;
120+
team?.subscription && numberOfUnusedSeats === 0;
125121

126122
const onInviteSubmit = async event => {
127123
event.preventDefault();

packages/app/src/app/pages/Dashboard/Content/routes/Settings/UserSettings/ManageSubscription/Patron.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const Patron = () => {
2424
padding: 0,
2525
})}
2626
onClick={() => {
27-
actions.modalOpened({ modal: 'pilotPayment' });
27+
actions.modalOpened({ modal: 'legacyPayment' });
2828
}}
2929
>
3030
Update payment information

0 commit comments

Comments
 (0)