Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace icons with icons from new @apollo/icons package #1194

Merged
merged 8 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/modern-needles-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"apollo-client-devtools": patch
---

Use icons from new `@apollo/icons` package.
24 changes: 15 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
"codegen": "graphql-codegen --config codegen.ts"
},
"dependencies": {
"@apollo/brand": "^0.3.0",
"@apollo/brand": "^0.4.0",
"@apollo/client": "^3.8.8",
"@apollo/tailwind-preset": "^0.1.2",
"@apollo/icons": "^0.0.3",
"@apollo/tailwind-preset": "^0.1.3",
"@headlessui/react": "^1.7.17",
"@radix-ui/react-tabs": "^1.0.2",
"clsx": "^2.1.0",
Expand Down
6 changes: 3 additions & 3 deletions src/application/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import { Cache } from "./components/Cache/Cache";
import { GetOperationCounts, GetOperationCountsVariables } from "./types/gql";
import { Tabs } from "./components/Tabs";
import { Button } from "./components/Button";
import { SettingsIcon } from "./components/icons/Settings";
import IconSettings from "@apollo/icons/default/IconSettings.svg";
import { SettingsModal } from "./components/Layouts/SettingsModal";
import Logo from "@apollo/brand/logos/symbol.svg";
import Logo from "@apollo/icons/logos/LogoSymbol.svg";

export const reloadStatus = makeVar<boolean>(false);

Expand Down Expand Up @@ -92,7 +92,7 @@ export const App = () => {
variant="hidden"
onClick={() => setSettingsOpen(true)}
>
<SettingsIcon aria-hidden="true" />
<IconSettings aria-hidden="true" className="w-4" />
<span className="sr-only">Settings</span>
</Button>
<SettingsModal open={settingsOpen} onOpen={setSettingsOpen} />
Expand Down
4 changes: 2 additions & 2 deletions src/application/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { colors } from "@apollo/brand";
import { clsx } from "clsx";
import { CopyToClipboard } from "react-copy-to-clipboard";
import { ColorTheme, colorTheme } from "../theme";
import { CopyIcon } from "./icons/Copy";
import IconCopy from "@apollo/icons/default/IconCopy.svg";
import { Button } from "./Button";
import { useMemo } from "react";

Expand Down Expand Up @@ -175,7 +175,7 @@ export const CodeBlock = ({
data-testid="copy-query-strin"
className="sticky top-0"
>
<CopyIcon />
<IconCopy className="w-4" />
Copy
</Button>
</CopyToClipboard>
Expand Down
4 changes: 2 additions & 2 deletions src/application/components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ComponentPropsWithoutRef } from "react";
import clsx from "clsx";
import CopyToClipboard from "react-copy-to-clipboard";
import { Button } from "./Button";
import { CopyIcon } from "./icons/Copy";
import IconCopy from "@apollo/icons/default/IconCopy.svg";

type ButtonProps = ComponentPropsWithoutRef<typeof Button>;

Expand All @@ -21,7 +21,7 @@ export function CopyButton({
return (
<CopyToClipboard text={text}>
<Button {...rest} className={className} size={size} variant="hidden">
<CopyIcon
<IconCopy
className={clsx({
"h-4": size === "sm" || size === "md",
"h-2": size === "xs",
Expand Down
36 changes: 0 additions & 36 deletions src/application/components/Icon.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/application/components/Queries/RunInExplorerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SET_OPERATION,
} from "../Explorer/postMessageHelpers";
import { currentScreen, Screens } from "../Layouts/Navigation";
import { RunIcon } from "../icons/Run";
import IconRun from "@apollo/icons/default/IconRun.svg";
import { Button } from "../Button";

interface RunInExplorerButtonProps {
Expand Down Expand Up @@ -39,7 +39,7 @@ export const RunInExplorerButton = ({
}
}}
>
<RunIcon aria-hidden />
<IconRun aria-hidden className="w-4" />
Run in Explorer
</Button>
);
Expand Down
4 changes: 2 additions & 2 deletions src/application/components/SearchField.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { clsx } from "clsx";
import { SearchIcon } from "./icons/Search";
import IconSearch from "@apollo/icons/default/IconSearch.svg";

interface SearchFieldProps {
autoFocus?: boolean;
Expand All @@ -18,7 +18,7 @@ export function SearchField({
}: SearchFieldProps) {
return (
<div className={clsx(className, "flex items-center relative")}>
<SearchIcon className="absolute left-4 z-10 text-icon-secondary dark:text-icon-secondary-dark" />
<IconSearch className="absolute left-4 z-10 text-icon-secondary dark:text-icon-secondary-dark w-4" />
<input
autoFocus={autoFocus}
onChange={(e) => onChange(e.target.value)}
Expand Down
23 changes: 0 additions & 23 deletions src/application/components/icons/Copy.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions src/application/components/icons/Run.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/application/components/icons/Search.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/application/components/icons/Settings.tsx

This file was deleted.