Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 6f0c135

Browse files
authored
remove "organizations aren't supported" page on dotcom (#63932)
We want to support orgs on dotcom for grouping prompts in the Prompt Library. Note that creating orgs was never actually disabled in the API, so this was ineffectual anyway. ## Test plan View the user settings area sidebar in dotcom mode and ensure the new org button is shown.
1 parent 6616eb1 commit 6f0c135

File tree

7 files changed

+16
-107
lines changed

7 files changed

+16
-107
lines changed

client/web/BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,8 +1713,6 @@ ts_project(
17131713
"src/user/settings/ScimAlert.tsx",
17141714
"src/user/settings/UserSettingsArea.tsx",
17151715
"src/user/settings/UserSettingsSidebar.tsx",
1716-
"src/user/settings/aboutOrganization/AboutOrganizationPage.tsx",
1717-
"src/user/settings/aboutOrganization/index.ts",
17181716
"src/user/settings/accessTokens/UserSettingsCreateAccessTokenCallbackPage.tsx",
17191717
"src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx",
17201718
"src/user/settings/accessTokens/UserSettingsTokensArea.tsx",
@@ -2473,7 +2471,6 @@ ts_project(
24732471
"src/team/new/NewTeamPage.story.tsx",
24742472
"src/tour/components/Tour/Tour.story.tsx",
24752473
"src/user/profile/UserProfile.story.tsx",
2476-
"src/user/settings/aboutOrganization/AboutOrganizationPage.story.tsx",
24772474
],
24782475
tags = [TAG_SEARCHSUITE],
24792476
tsconfig = ":tsconfig",

client/web/src/user/settings/UserSettingsSidebar.tsx

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { type FC, useState, useCallback } from 'react'
1+
import { type FC, useCallback, useState } from 'react'
22

33
import { mdiMenu, mdiPlus } from '@mdi/js'
44
import classNames from 'classnames'
55

6-
import { ProductStatusBadge, Button, Link, Icon, type ProductStatusType, Tooltip } from '@sourcegraph/wildcard'
6+
import { Button, Icon, Link, ProductStatusBadge, type ProductStatusType, Tooltip } from '@sourcegraph/wildcard'
77

88
import type { AuthenticatedUser } from '../../auth'
99
import type { BatchChangesProps } from '../../batches'
@@ -94,25 +94,20 @@ export const UserSettingsSidebar: FC<UserSettingsSidebarProps> = props => {
9494
</Tooltip>
9595
</SidebarNavItem>
9696
))}
97-
{!siteAdminViewingOtherUser &&
98-
(window.context.sourcegraphDotComMode ? (
99-
<SidebarNavItem to="./about-organizations" onClick={collapseMobileSidebar}>
100-
About organizations
101-
</SidebarNavItem>
102-
) : (
103-
<div className={styles.newOrgBtnWrapper}>
104-
<Button
105-
to="/organizations/new"
106-
variant="secondary"
107-
outline={true}
108-
size="sm"
109-
as={Link}
110-
onClick={collapseMobileSidebar}
111-
>
112-
<Icon aria-hidden={true} svgPath={mdiPlus} /> New organization
113-
</Button>
114-
</div>
115-
))}
97+
{!siteAdminViewingOtherUser && (
98+
<div className={styles.newOrgBtnWrapper}>
99+
<Button
100+
to="/organizations/new"
101+
variant="secondary"
102+
outline={true}
103+
size="sm"
104+
as={Link}
105+
onClick={collapseMobileSidebar}
106+
>
107+
<Icon aria-hidden={true} svgPath={mdiPlus} /> New organization
108+
</Button>
109+
</div>
110+
)}
116111
</SidebarGroup>
117112
)}
118113
<SidebarGroup>

client/web/src/user/settings/aboutOrganization/AboutOrganizationPage.module.scss

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

client/web/src/user/settings/aboutOrganization/AboutOrganizationPage.story.tsx

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

client/web/src/user/settings/aboutOrganization/AboutOrganizationPage.tsx

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

client/web/src/user/settings/aboutOrganization/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

client/web/src/user/settings/routes.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ const UserSettingsSecurityPage = lazyComponent(
3030
'UserSettingsSecurityPage'
3131
)
3232

33-
const AboutOrganizationPage = lazyComponent(
34-
() => import('./aboutOrganization/AboutOrganizationPage'),
35-
'AboutOrganizationPage'
36-
)
37-
3833
const shouldRenderBatchChangesPage = ({
3934
batchChangesEnabled,
4035
user: { viewerCanAdminister },
@@ -79,12 +74,6 @@ export const userSettingsAreaRoutes: readonly UserSettingsAreaRoute[] = [
7974
render: lazyComponent(() => import('./research/ProductResearch'), 'ProductResearchPage'),
8075
condition: () => window.context.productResearchPageEnabled,
8176
},
82-
{
83-
path: 'about-organizations',
84-
render: props => (
85-
<AboutOrganizationPage {...props} telemetryRecorder={props.platformContext.telemetryRecorder} />
86-
),
87-
},
8877
{
8978
path: 'permissions',
9079
render: lazyComponent(

0 commit comments

Comments
 (0)