Skip to content

Commit

Permalink
Redesigns Home account footer into new header bar
Browse files Browse the repository at this point in the history
  - Adds popover for account information
  - Adds popover for integration connection and status
  • Loading branch information
eamodio committed Dec 12, 2024
1 parent a3558a9 commit e729ed3
Show file tree
Hide file tree
Showing 16 changed files with 1,161 additions and 586 deletions.
41 changes: 37 additions & 4 deletions src/constants.integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,44 @@ export enum IssueIntegrationId {

export type IntegrationId = HostingIntegrationId | IssueIntegrationId | SelfHostedIntegrationId;

export const supportedCloudIntegrationIds = [IssueIntegrationId.Jira];
export const supportedCloudIntegrationIdsExperimental = [
IssueIntegrationId.Jira,
export const supportedOrderedCloudIssueIntegrationIds = [IssueIntegrationId.Jira];
export const supportedOrderedCloudIntegrationIds = [
HostingIntegrationId.GitHub,
HostingIntegrationId.GitLab,
IssueIntegrationId.Jira,
];

export type SupportedCloudIntegrationIds = (typeof supportedCloudIntegrationIdsExperimental)[number];
export type SupportedCloudIntegrationIds = (typeof supportedOrderedCloudIntegrationIds)[number];

export function isSupportedCloudIntegrationId(id: IntegrationId): id is SupportedCloudIntegrationIds {
return supportedOrderedCloudIntegrationIds.includes(id as SupportedCloudIntegrationIds);
}

export type IntegrationFeatures = 'prs' | 'issues';

export interface IntegrationDescriptor {
id: SupportedCloudIntegrationIds;
name: string;
icon: string;
supports: IntegrationFeatures[];
}
export const supportedCloudIntegrationDescriptors: IntegrationDescriptor[] = [
{
id: HostingIntegrationId.GitHub,
name: 'GitHub',
icon: 'gl-provider-github',
supports: ['prs', 'issues'],
},
{
id: HostingIntegrationId.GitLab,
name: 'GitLab',
icon: 'gl-provider-gitlab',
supports: ['prs', 'issues'],
},
{
id: IssueIntegrationId.Jira,
name: 'Jira',
icon: 'gl-provider-jira',
supports: ['issues'],
},
];
5 changes: 3 additions & 2 deletions src/plus/gk/account/__debug__accountDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class AccountDebug {

this.service.restoreFeaturePreviews();
this.service.restoreSession();
this.service.changeSubscription(this.service.getStoredSubscription(), { store: false });
this.service.changeSubscription(this.service.getStoredSubscription(), undefined, { store: false });
}

private async startSimulation(pick: SimulateQuickPickItem | undefined): Promise<boolean> {
Expand Down Expand Up @@ -287,6 +287,7 @@ class AccountDebug {
state === SubscriptionState.Community
? undefined
: getPreviewSubscription(state === SubscriptionState.ProPreviewExpired ? 0 : 3),
undefined,
{ store: false },
);

Expand Down Expand Up @@ -341,7 +342,7 @@ class AccountDebug {
activeOrganizationId,
);

this.service.changeSubscription({ ...subscription, ...simulatedSubscription }, { store: false });
this.service.changeSubscription({ ...subscription, ...simulatedSubscription }, undefined, { store: false });

return false;
}
Expand Down
Loading

0 comments on commit e729ed3

Please sign in to comment.