Skip to content

Commit

Permalink
feat(docs): add support links (#5829)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking authored Dec 26, 2024
1 parent b40add3 commit dd8ae20
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 34 deletions.
8 changes: 8 additions & 0 deletions app/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
SettingsPage,
SpanPlaygroundPage,
spanPlaygroundPageLoader,
SupportPage,
TracePage,
TracingRoot,
} from "./pages";
Expand Down Expand Up @@ -200,6 +201,13 @@ const router = createBrowserRouter(
crumb: () => "APIs",
}}
/>
<Route
path="/support"
element={<SupportPage />}
handle={{
crumb: () => "Support",
}}
/>
<Route
path="/settings"
element={<SettingsPage />}
Expand Down
64 changes: 59 additions & 5 deletions app/src/components/icon/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ const loadingCircleKeyframes = keyframes`
}
`;

/**
* Raw svg icons from eva.
* @src https://akveo.github.io/eva-icons/#/
*/

//A
export const ActivityOutline = () => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
Expand Down Expand Up @@ -1216,6 +1211,20 @@ export const FunnelOutline = () => (
);

//G
export const GitHub = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 24 24"
>
<g data-name="Layer 2">
<rect width="24" height="24" transform="rotate(180 12 12)" opacity="0" />
<path d="M12 1A10.89 10.89 0 0 0 1 11.77 10.79 10.79 0 0 0 8.52 22c.55.1.75-.23.75-.52v-1.83c-3.06.65-3.71-1.44-3.71-1.44a2.86 2.86 0 0 0-1.22-1.58c-1-.66.08-.65.08-.65a2.31 2.31 0 0 1 1.68 1.11 2.37 2.37 0 0 0 3.2.89 2.33 2.33 0 0 1 .7-1.44c-2.44-.27-5-1.19-5-5.32a4.15 4.15 0 0 1 1.11-2.91 3.78 3.78 0 0 1 .11-2.84s.93-.29 3 1.1a10.68 10.68 0 0 1 5.5 0c2.1-1.39 3-1.1 3-1.1a3.78 3.78 0 0 1 .11 2.84A4.15 4.15 0 0 1 19 11.2c0 4.14-2.58 5.05-5 5.32a2.5 2.5 0 0 1 .75 2v2.95c0 .35.2.63.75.52A10.8 10.8 0 0 0 23 11.77 10.89 10.89 0 0 0 12 1" />
</g>
</svg>
);

export const Grid = () => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g data-name="Layer 2">
Expand Down Expand Up @@ -1420,6 +1429,27 @@ export const LassoOutline = () => (
</svg>
);

export const LifeBuoy = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<circle cx="12" cy="12" r="10" fill="none"></circle>
<circle cx="12" cy="12" r="4" fill="none"></circle>
<line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line>
<line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line>
<line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line>
<line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line>
<line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line>
</svg>
);

export const ListOutline = () => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<g data-name="Layer 2">
Expand Down Expand Up @@ -1891,6 +1921,30 @@ export const SettingsOutline = () => (
</svg>
);

export const Slack = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
className="feather feather-slack"
>
<path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path>
<path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path>
<path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path>
<path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path>
<path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path>
<path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path>
<path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path>
<path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>
</svg>
);

export const SlideOut = () => (
<svg
width="24"
Expand Down
27 changes: 0 additions & 27 deletions app/src/components/nav/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,6 @@ const brandCSS = (theme: Theme) => css`
margin: 0 0 var(--ac-global-dimension-static-size-200) 0;
`;

const GitHubSVG = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="20"
height="20"
viewBox="0 0 24 24"
>
<g data-name="Layer 2">
<rect width="24" height="24" transform="rotate(180 12 12)" opacity="0" />
<path
d="M12 1A10.89 10.89 0 0 0 1 11.77 10.79 10.79 0 0 0 8.52 22c.55.1.75-.23.75-.52v-1.83c-3.06.65-3.71-1.44-3.71-1.44a2.86 2.86 0 0 0-1.22-1.58c-1-.66.08-.65.08-.65a2.31 2.31 0 0 1 1.68 1.11 2.37 2.37 0 0 0 3.2.89 2.33 2.33 0 0 1 .7-1.44c-2.44-.27-5-1.19-5-5.32a4.15 4.15 0 0 1 1.11-2.91 3.78 3.78 0 0 1 .11-2.84s.93-.29 3 1.1a10.68 10.68 0 0 1 5.5 0c2.1-1.39 3-1.1 3-1.1a3.78 3.78 0 0 1 .11 2.84A4.15 4.15 0 0 1 19 11.2c0 4.14-2.58 5.05-5 5.32a2.5 2.5 0 0 1 .75 2v2.95c0 .35.2.63.75.52A10.8 10.8 0 0 0 23 11.77 10.89 10.89 0 0 0 12 1"
data-name="github"
/>
</g>
</svg>
);

function ExternalLink(props: { href: string; icon: ReactNode; text: string }) {
return (
<a href={props.href} target="_blank" css={navLinkCSS} rel="noreferrer">
Expand All @@ -107,16 +90,6 @@ function ExternalLink(props: { href: string; icon: ReactNode; text: string }) {
);
}

export function GitHubLink() {
return (
<ExternalLink
href="https://github.com/arize-ai/phoenix"
icon={<Icon svg={<GitHubSVG />} />}
text="Repository"
/>
);
}

export function DocsLink() {
return (
<ExternalLink
Expand Down
7 changes: 5 additions & 2 deletions app/src/pages/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Icon, Icons, Loading } from "@phoenix/components";
import {
Brand,
DocsLink,
GitHubLink,
NavBreadcrumb,
NavButton,
NavLink,
Expand Down Expand Up @@ -151,7 +150,11 @@ function SideNav() {
<DocsLink />
</li>
<li>
<GitHubLink />
<NavLink
to="/support"
text="Support"
icon={<Icon svg={<Icons.LifeBuoy />} />}
/>
</li>
<li>
<ThemeToggle />
Expand Down
1 change: 1 addition & 0 deletions app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export * from "./profile";
export * from "./playground";
export * from "./AuthenticatedRoot";
export * from "./authenticatedRootLoader";
export * from "./support";
109 changes: 109 additions & 0 deletions app/src/pages/support/SupportPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import React, { ReactNode } from "react";
import { css } from "@emotion/react";

import { Flex, Heading, Text, View } from "@arizeai/components";

import { Icon, Icons } from "@phoenix/components";

const supportItemsCSS = css`
display: grid;
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
gap: var(--ac-global-dimension-size-200);
padding: var(--ac-global-dimension-size-200);
`;

export function SupportPage() {
return (
<main>
<Flex direction="column" width="100%">
<View
padding="size-200"
borderBottomColor="dark"
borderBottomWidth="thin"
>
<Flex direction="column" gap="size-50">
<Heading level={1}>Support</Heading>
<Text color="text-700">
We are here to help. Pick a channel below to get in touch with us.
</Text>
</Flex>
</View>
<div css={supportItemsCSS}>
<SupportItem
icon={<Icon svg={<Icons.BookFilled />} />}
href="https://docs.arize.com/phoenix"
title="Documentation"
description="Visit our documentation for tutorials and AI support."
/>
<SupportItem
icon={<Icon svg={<Icons.GitHub />} />}
href="https://github.com/Arize-ai/phoenix/issues"
title="GitHub Issues"
description="Create an issue on Github to report bugs or request new features."
/>
<SupportItem
icon={<Icon svg={<Icons.GitHub />} />}
href="https://github.com/Arize-ai/phoenix/discussions"
title="GitHub Discussions"
description="Create a discussion on Github to ask questions or share feedback."
/>
<SupportItem
icon={<Icon svg={<Icons.Slack />} />}
href="https://arize-ai.slack.com/join/shared_invite/zt-11t1vbu4x-xkBIHmOREQnYnYDH1GDfCg?__hstc=259489365.a667dfafcfa0169c8aee4178d115dc81.1733501603539.1733501603539.1733501603539.1&__hssc=259489365.1.1733501603539&__hsfp=3822854628&submissionGuid=381a0676-8f38-437b-96f2-fc10875658df#/shared-invite/email"
title="Slack"
description="Join our Slack community to chat with other users and the team."
/>
<SupportItem
icon={<Icon svg={<Icons.Slack />} />}
href="mailto:[email protected]?subject=Slack%20Connect%20Request"
title="Slack Connect"
description="Get a dedicated support channel for you and your team."
/>
</div>
</Flex>
</main>
);
}

const supportItemCSS = css`
padding: var(--ac-global-dimension-size-200)
var(--ac-global-dimension-size-200) var(--ac-global-dimension-size-200);
border: var(--ac-global-border-size-thin) solid
var(--ac-global-border-color-dark);
border-radius: var(--ac-global-dimension-size-100);
cursor: pointer;
background-color: var(--ac-global-background-color-dark);
display: flex;
flex-direction: column;
gap: var(--ac-global-dimension-size-50);
color: var(--ac-global-color-text-700);
transition: border-color 0.2s ease-in-out;
text-decoration: none;
&:hover {
border-color: var(--ac-global-color-primary);
}
`;

const SupportItem = ({
icon,
href,
title,
description,
}: {
icon: ReactNode;
href: string;
title: string;
description: string;
}) => {
return (
<a css={supportItemCSS} href={href} target="_blank" rel="noreferrer">
<Flex direction="row" gap="size-100" alignItems="center">
{icon}
<Heading level={2}>{title}</Heading>
</Flex>
<Text textSize="medium" color="text-700">
{description}
</Text>
</a>
);
};
1 change: 1 addition & 0 deletions app/src/pages/support/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./SupportPage";

0 comments on commit dd8ae20

Please sign in to comment.