Skip to content

Commit

Permalink
Remove scope icons (#451)
Browse files Browse the repository at this point in the history
We are de-emphasizing Teleport Community Edition and framing Teleport
Enterprise as a single edition, rather than splitting Enterprise and
Enterprise Cloud. As a result, it doesn't make as much sense as it used
to indicate whether a given feature applies to one of three editions.

This change removes the "Available for" icons and navigation icons that
indicate edition availability. This paves the way for information
architecture changes that position Teleport Enterprise as the main
subject of the Teleport docs.
  • Loading branch information
ptgott authored Apr 15, 2024
1 parent f02c65b commit e8d9487
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 140 deletions.
1 change: 0 additions & 1 deletion layouts/DocsPage/DocsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ const DocsPage = ({
icon={icon}
getNewVersionPath={getPath}
latest={latest}
scopes={scopes}
isVersionAgnosticPage={isVersionAgnosticPage(route)}
/>
{videoBanner && (
Expand Down
6 changes: 1 addition & 5 deletions layouts/DocsPage/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ import { useContext } from "react";
import NextImage from "next/image";
import Button from "components/Button";
import Icon from "components/Icon";
import { Scopes } from "./Scopes";
import Versions from "./Versions";
import { DocsContext } from "./context";
import type { IconName } from "components/Icon";
import type { VersionsInfo, ScopesInMeta } from "./types";
import type { VersionsInfo } from "./types";
import styles from "./Header.module.css";
import forkmeUrl from "./assets/forkme.webp";

interface DocHeaderProps {
title: string;
icon?: IconName;
scopes: ScopesInMeta;
githubUrl?: string;
latest?: string;
versions?: VersionsInfo;
Expand All @@ -29,7 +27,6 @@ const DocHeader = ({
versions,
getNewVersionPath,
latest,
scopes,
isVersionAgnosticPage,
}: DocHeaderProps) => {
return (
Expand All @@ -56,7 +53,6 @@ const DocHeader = ({
latest={latest}
/>
)}
<Scopes className={styles.scopes} scopes={scopes} />
</div>
</div>
</section>
Expand Down
30 changes: 0 additions & 30 deletions layouts/DocsPage/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,6 @@ const SCOPE_DICTIONARY: Record<string, ScopeType> = {
cloud2: "cloud",
};

const getScopeIcons = (scopes: ScopesInMeta) => {
if (scopes[0] === "noScope" || scopes[0] === "") {
return;
}

const scopeIcons = Object.keys(SCOPE_DICTIONARY).map(
(scope: "code3" | "building2" | "cloud2") => {
const hideScope = !scopes.includes(SCOPE_DICTIONARY[scope]);
const ariaLabel = hideScope ? "" : SCOPE_DICTIONARY[scope];

return (
<li
className={cn(
styles["scope-item"],
hideScope && styles["non-visible"]
)}
key={scope}
aria-label={ariaLabel}
aria-hidden={hideScope}
>
<Icon name={scope} size="xxs" />
</li>
);
}
);

return <ul className={styles["scope-list"]}>{scopeIcons}</ul>;
};

interface DocsNavigationItemsProps {
entries: NavigationItem[];
onClick: () => void;
Expand Down Expand Up @@ -82,7 +53,6 @@ const DocsNavigationItems = ({
onClick={onClick}
>
{entry.title}
{!!entry.forScopes?.length && getScopeIcons(entry.forScopes)}
{!!entry.entries?.length && (
<Icon size="sm" name="ellipsis" className={styles.ellipsis} />
)}
Expand Down
99 changes: 0 additions & 99 deletions layouts/DocsPage/Scopes.tsx

This file was deleted.

6 changes: 1 addition & 5 deletions pages/older-versions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ const OldVersions = () => {
<SiteHeader />
<main className={styles.wrapper}>
<div className={styles.body}>
<Header
title={title}
scopes={["noScope"]}
isVersionAgnosticPage={true}
/>
<Header title={title} isVersionAgnosticPage={true} />
<div className={styles.content}>
<p>
Deprecated versions of the Teleport docs can be found at the
Expand Down

0 comments on commit e8d9487

Please sign in to comment.