Skip to content

Commit df290d0

Browse files
committed
[dashboard] user visible rename team->organization
1 parent 6c95548 commit df290d0

27 files changed

+145
-135
lines changed

components/dashboard/src/Menu.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export default function Menu() {
8282
"users",
8383
"workspaces",
8484
"teams",
85+
"orgs",
8586
].includes(resource)
8687
) {
8788
return resource;
@@ -118,6 +119,7 @@ export default function Menu() {
118119
"usage",
119120
"plans",
120121
"teams",
122+
"orgs",
121123
"variables",
122124
"keys",
123125
"integrations",
@@ -282,8 +284,8 @@ export default function Menu() {
282284
<div className="p-1 text-base text-gray-500 dark:text-gray-400 border-gray-800">
283285
<PillMenuItem
284286
additionalClasses="border-2 border-gray-200 dark:border-gray-700 border-dashed"
285-
name="New Team →"
286-
link="/teams/new"
287+
name="New Organization →"
288+
link="/orgs/new"
287289
/>
288290
</div>
289291
);
@@ -330,10 +332,10 @@ export default function Menu() {
330332
.sort((a, b) => (a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1)),
331333
{
332334
slug: "new",
333-
title: "Create a new team",
335+
title: "Create a new organization",
334336
customContent: (
335337
<div className="w-full text-gray-400 flex items-center">
336-
<span className="flex-1 font-semibold">New Team</span>
338+
<span className="flex-1 font-semibold">New Organization</span>
337339
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14" className="w-3.5">
338340
<path
339341
fill="currentColor"
@@ -344,7 +346,7 @@ export default function Menu() {
344346
</svg>
345347
</div>
346348
),
347-
link: "/teams/new",
349+
link: "/orgs/new",
348350
},
349351
];
350352
const classes =
@@ -370,7 +372,7 @@ export default function Menu() {
370372
d="M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414Z"
371373
fill="#78716C"
372374
/>
373-
<title>Toggle team selection menu</title>
375+
<title>Toggle organization selection menu</title>
374376
</svg>
375377
</div>
376378
</ContextMenu>

components/dashboard/src/admin/TeamsSearch.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Pagination from "../Pagination/Pagination";
1818

1919
export default function TeamsSearchPage() {
2020
return (
21-
<PageWithAdminSubMenu title="Teams" subtitle="Search and manage teams.">
21+
<PageWithAdminSubMenu title="Organizations" subtitle="Search and manage organizations.">
2222
<TeamsSearch />
2323
</PageWithAdminSubMenu>
2424
);
@@ -104,7 +104,7 @@ export function TeamsSearch() {
104104
</div>
105105
<input
106106
type="search"
107-
placeholder="Search Teams"
107+
placeholder="Search Organizations"
108108
onKeyDown={(k) => k.key === "Enter" && search()}
109109
onChange={(v) => {
110110
setSearchTerm(v.target.value.trim());
@@ -147,7 +147,7 @@ export function TeamsSearch() {
147147
return (
148148
<Link
149149
key={"pr-" + props.team.name}
150-
to={"/admin/teams/" + props.team.id}
150+
to={"/admin/orgs/" + props.team.id}
151151
data-analytics='{"button_type":"sidebar_menu"}'
152152
>
153153
<div className="rounded-xl whitespace-nowrap flex py-6 px-6 w-full justify-between hover:bg-gray-100 dark:hover:bg-gray-800 focus:bg-gitpod-kumquat-light group">

components/dashboard/src/admin/admin-menu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export function getAdminMenu() {
1919
link: ["/admin/projects"],
2020
},
2121
{
22-
title: "Teams",
23-
link: ["/admin/teams"],
22+
title: "Organizationss",
23+
link: ["/admin/orgs"],
2424
},
2525
{
2626
title: "Blocked Repositories",

components/dashboard/src/app/AppRoutes.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ import {
2626
settingsPathPreferences,
2727
settingsPathTeams,
2828
settingsPathTeamsJoin,
29-
settingsPathTeamsNew,
29+
settingsPathOrgs,
30+
settingsPathOrgsJoin,
31+
settingsPathOrgsNew,
3032
settingsPathVariables,
3133
settingsPathSSHKeys,
3234
usagePathMain,
@@ -198,7 +200,7 @@ export const AppRoutes: FunctionComponent<AppRoutesProps> = ({ user, teams }) =>
198200
<Route path="/from-referrer" exact component={FromReferrer} />
199201

200202
<AdminRoute path="/admin/users" component={UserSearch} />
201-
<AdminRoute path="/admin/teams" component={TeamsSearch} />
203+
<AdminRoute path="/admin/orgs" component={TeamsSearch} />
202204
<AdminRoute path="/admin/workspaces" component={WorkspacesSearch} />
203205
<AdminRoute path="/admin/projects" component={ProjectsSearch} />
204206
<AdminRoute path="/admin/blocked-repositories" component={BlockedRepositories} />
@@ -248,11 +250,15 @@ export const AppRoutes: FunctionComponent<AppRoutesProps> = ({ user, teams }) =>
248250
}}
249251
/>
250252
</Route>
253+
{/* TODO remove these navigation after a few weeks */}
251254
<Route path={settingsPathTeams}>
252-
<Route exact path={settingsPathTeams} component={Teams} />
253-
<Route exact path={settingsPathTeamsNew} component={NewTeam} />
254255
<Route exact path={settingsPathTeamsJoin} component={JoinTeam} />
255256
</Route>
257+
<Route path={settingsPathOrgs}>
258+
<Route exact path={settingsPathOrgs} component={Teams} />
259+
<Route exact path={settingsPathOrgsNew} component={NewTeam} />
260+
<Route exact path={settingsPathOrgsJoin} component={JoinTeam} />
261+
</Route>
256262
{(teams || []).map((team) => (
257263
<Route path={`/t/${team.slug}`} key={team.slug}>
258264
<Route exact path={`/t/${team.slug}`}>

components/dashboard/src/components/BillingAccountSelector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function BillingAccountSelector(props: { onSelected?: () => void }) {
2828
return;
2929
}
3030

31-
// Fetch the list of teams we can actually attribute to
31+
// Fetch the list of orgs we can actually attribute to
3232
getGitpodService()
3333
.server.listAvailableUsageAttributionIds()
3434
.then((attrIds) => {
@@ -59,7 +59,7 @@ export function BillingAccountSelector(props: { onSelected?: () => void }) {
5959
(await teamsService.getTeam({ teamId: team!.id })).team?.members || [],
6060
);
6161
} catch (error) {
62-
console.warn("Could not get members of team", team, error);
62+
console.warn("Could not get members of org", team, error);
6363
}
6464
}),
6565
).then(() => setMembersByTeam(members));

components/dashboard/src/components/UsageBasedBillingConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export default function UsageBasedBillingConfig({ attributionId }: Props) {
170170
<h2 className="text-gray-500">
171171
{attributionId && AttributionId.parse(attributionId)?.kind === "user"
172172
? "Manage billing for your personal account."
173-
: "Manage billing for your team."}
173+
: "Manage billing for your organization."}
174174
</h2>
175175
<div className="max-w-xl flex flex-col">
176176
{errorMessage && (

components/dashboard/src/components/UsageLimitReachedModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function UsageLimitReachedModal(p: { hints: any }) {
3939
You have reached the <strong>usage limit</strong> of your billing account.
4040
</Alert>
4141
<p className="mt-3 text-base text-gray-600 dark:text-gray-300">
42-
{"Contact a team owner "}
42+
{"Contact an organization owner "}
4343
{attributedTeamName && (
4444
<>
4545
of <strong>{attributedTeamName} </strong>

components/dashboard/src/components/UsageView.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ function UsageView({ attributionId }: UsageViewProps) {
174174
};
175175

176176
const currentPaginatedResults = usagePage?.usageEntriesList.filter((u) => u.kind === "workspaceinstance") ?? [];
177-
178-
const headerTitle = attributionId.kind === "team" ? "Team Usage" : "Personal Usage";
179-
180177
const DateDisplay = forwardRef((arg: any, ref: any) => (
181178
<div
182179
className="px-2 py-0.5 text-gray-500 bg-gray-50 dark:text-gray-400 dark:bg-gray-800 rounded-md cursor-pointer flex items-center hover:bg-gray-100 dark:hover:bg-gray-700"
@@ -209,7 +206,7 @@ function UsageView({ attributionId }: UsageViewProps) {
209206
<Header
210207
title={
211208
<div className="flex items-baseline">
212-
<h1 className="tracking-tight">{headerTitle}</h1>
209+
<h1 className="tracking-tight">Usage</h1>
213210
<h2 className="ml-3">(updated every 15 minutes).</h2>
214211
</div>
215212
}
@@ -281,7 +278,7 @@ function UsageView({ attributionId }: UsageViewProps) {
281278
{" "}
282279
workspaces
283280
</a>{" "}
284-
in {startDate.format("MMMM YYYY")} or checked your other teams?
281+
in {startDate.format("MMMM YYYY")} or checked your other organizations?
285282
</p>
286283
</div>
287284
)}

components/dashboard/src/contexts/FeatureFlagContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
6161

6262
for (const [flagName, config] of Object.entries(featureFlags)) {
6363
const value = async () => {
64-
// First check if the flag is non-default for any of the teams
64+
// First check if the flag is non-default for any of the orgs
6565
for (const team of teams || []) {
6666
const flagValue = await getExperimentsClient().getValueAsync(flagName, config.defaultValue, {
6767
user,

components/dashboard/src/hooks/use-user-and-teams-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const useUserAndTeamsLoader = () => {
4747
// eslint-disable-next-line react-hooks/exhaustive-deps
4848
}, []);
4949

50-
// TODO: Can this check happen when we load the teams rather than a separate effect?
50+
// TODO: Can this check happen when we load the orgs rather than a separate effect?
5151
useEffect(() => {
5252
if (!teams) {
5353
return;

components/dashboard/src/projects/NewProject.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export default function NewProject() {
333333
<p className="text-gray-500 text-center text-base">
334334
Projects allow you to manage prebuilds and workspaces for your repository.{" "}
335335
<a
336-
href="https://www.gitpod.io/docs/teams-and-projects"
336+
href="https://www.gitpod.io/docs/orgs-and-projects"
337337
target="_blank"
338338
rel="noreferrer"
339339
className="gp-link"
@@ -527,23 +527,11 @@ export default function NewProject() {
527527
};
528528

529529
const renderSelectTeam = () => {
530-
const userFullName = user?.fullName || user?.name || "...";
531530
const teamsToRender = teams || [];
532531
return (
533532
<>
534-
<p className="mt-2 text-gray-500 text-center text-base">Select team or personal account</p>
533+
<p className="mt-2 text-gray-500 text-center text-base">Select organization</p>
535534
<div className="mt-14 flex flex-col space-y-2">
536-
<label
537-
key={`user-${userFullName}`}
538-
className={`w-80 px-4 py-3 flex space-x-3 items-center cursor-pointer rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800`}
539-
onClick={() => setSelectedTeamOrUser(user)}
540-
>
541-
<input type="radio" />
542-
<div className="flex-grow overflow-ellipsis truncate flex flex-col">
543-
<span className="font-semibold">{userFullName}</span>
544-
<span className="text-sm text-gray-400">Personal account</span>
545-
</div>
546-
</label>
547535
{teamsToRender.map((t) => (
548536
<label
549537
key={`team-${t.name}`}
@@ -558,7 +546,7 @@ export default function NewProject() {
558546
? `${teamMembers[t.id].length} member${
559547
teamMembers[t.id].length === 1 ? "" : "s"
560548
}`
561-
: "Team"}
549+
: "Organization"}
562550
</span>
563551
</div>
564552
</label>
@@ -567,7 +555,7 @@ export default function NewProject() {
567555
<div className="flex space-x-3 items-center relative">
568556
<input type="radio" onChange={() => setShowNewTeam(!showNewTeam)} />
569557
<div className="flex-grow overflow-ellipsis truncate flex flex-col">
570-
<span className="font-semibold">Create new team</span>
558+
<span className="font-semibold">Create new organization</span>
571559
<span className="text-sm text-gray-400">Collaborate with others</span>
572560
</div>
573561
{teamsToRender.length > 0 && (
@@ -624,7 +612,7 @@ export default function NewProject() {
624612
) : (
625613
<>
626614
{" "}
627-
in team{" "}
615+
in organization{" "}
628616
<a className="gp-link" href={`/t/${selectedTeamOrUser?.slug}/projects`}>
629617
{selectedTeamOrUser?.name}
630618
</a>

components/dashboard/src/projects/ProjectSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export default function () {
141141
, first cancel your existing plan.
142142
</span>
143143
<Link className="mt-2" to={project.teamId ? "../billing" : "/plans"}>
144-
<button>Go to {project.teamId ? "Team" : "Personal"} Billing</button>
144+
<button>Go to {project.teamId ? "Organization" : "Personal"} Billing</button>
145145
</Link>
146146
</div>
147147
</Alert>
@@ -254,7 +254,7 @@ export default function () {
254254
, first cancel your existing plan.
255255
</span>
256256
<Link className="mt-2" to={project.teamId ? "../billing" : "/plans"}>
257-
<button>Go to {project.teamId ? "Team" : "Personal"} Billing</button>
257+
<button>Go to {project.teamId ? "Organization" : "Personal"} Billing</button>
258258
</Link>
259259
</div>
260260
</Alert>

components/dashboard/src/projects/RemoveProjectModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const RemoveProjectModal: FunctionComponent<RemoveProjectModalProps> = ({
2828
return (
2929
<ConfirmationModal
3030
title="Remove Project"
31-
areYouSureText="Are you sure you want to remove this project from this team? Team members will also lose access to this project."
31+
areYouSureText="Are you sure you want to remove this project from this organization? Organization members will also lose access to this project."
3232
children={{
3333
name: project?.name ?? "",
3434
description: project?.cloneUrl ?? "",

components/dashboard/src/settings/Plans.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ export default function () {
109109
if (!freeSlot) {
110110
setTeamClaimModal({
111111
mode: "error",
112-
errorText: "This invitation is no longer valid. Please contact the team owner.",
112+
errorText: "This invitation is no longer valid. Please contact the organization owner.",
113113
});
114114
} else {
115115
setTeamClaimModal({
116116
mode: "confirmation",
117117
teamId: claimedTeamSubscriptionId,
118118
slotId: freeSlot.id,
119-
text: "You are about to claim a seat in a team.",
119+
text: "You are about to claim a seat in an organization.",
120120
});
121121
}
122122
});
@@ -722,7 +722,7 @@ export default function () {
722722
<div className="mt-4 flex justify-center space-x-3 2xl:space-x-7">{planCards}</div>
723723
{assignedTs && userBillingMode?.mode === "chargebee" && !!userBillingMode.teamNames && (
724724
<Alert type="info" className="mt-10 mx-auto">
725-
<p>Assigned Team Seats</p>
725+
<p>Assigned Organization Seats</p>
726726
<ul>{userBillingMode.teamNames.join(", ")}</ul>
727727
</Alert>
728728
)}
@@ -805,7 +805,7 @@ export default function () {
805805
{!!teamClaimModal && (
806806
// TODO: Use title and buttons props
807807
<Modal visible={true} onClose={() => setTeamClaimModal(undefined)}>
808-
<h3 className="pb-2">Team Invitation</h3>
808+
<h3 className="pb-2">Organization Invitation</h3>
809809
<div className="border-t border-b border-gray-200 dark:border-gray-800 mt-2 -mx-6 px-6 py-4">
810810
<p className="pb-4 text-gray-500 text-base">
811811
{teamClaimModal.mode === "error" ? teamClaimModal.errorText : teamClaimModal.text}
@@ -925,7 +925,7 @@ function PlanCard(p: PlanCardProps) {
925925
<div className="relative w-full">
926926
{p.isTsAssigned && (
927927
<div className="absolute w-full mt-5 text-center font-semibold cursor-default">
928-
Team seat assigned
928+
Organization seat assigned
929929
</div>
930930
)}
931931
<div className="absolute w-full mt-5 text-center font-semibold cursor-default">{p.bottomLabel}</div>

0 commit comments

Comments
 (0)