From 4f4e29527e3e45e954963b94d892c9b616edf897 Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Thu, 21 Dec 2023 16:56:40 +0000 Subject: [PATCH 1/4] tada --- site/src/theme/dark/experimental.ts | 27 ++++------------------- site/src/theme/darkBlue/experimental.ts | 29 +++++-------------------- site/src/theme/experimental.ts | 1 - site/src/theme/light/experimental.ts | 29 +++++-------------------- 4 files changed, 14 insertions(+), 72 deletions(-) diff --git a/site/src/theme/dark/experimental.ts b/site/src/theme/dark/experimental.ts index 7e929c4ea8e97..08977a6660ce8 100644 --- a/site/src/theme/dark/experimental.ts +++ b/site/src/theme/dark/experimental.ts @@ -15,34 +15,15 @@ export default { fill: colors.zinc[500], text: colors.zinc[50], disabled: { - background: "#f00", - outline: "#f00", + background: colors.gray[900], + outline: colors.zinc[700], fill: colors.zinc[500], text: colors.zinc[200], }, hover: { background: colors.zinc[800], outline: colors.zinc[600], - fill: "#f00", - text: colors.white, - }, - }, - - l3: { - background: colors.zinc[800], - outline: colors.zinc[700], - fill: colors.zinc[600], - text: colors.white, - disabled: { - background: "#f00", - outline: "#f00", - fill: "#f00", - text: colors.zinc[200], - }, - hover: { - background: "#f00", - outline: "#f00", - fill: "#f00", + fill: colors.zinc[400], text: colors.white, }, }, @@ -75,7 +56,7 @@ export default { warning: { background: colors.amber[950], outline: colors.amber[300], - fill: "#f00", + fill: colors.amber[500], text: colors.amber[50], }, notice: { diff --git a/site/src/theme/darkBlue/experimental.ts b/site/src/theme/darkBlue/experimental.ts index 9b15df75a932b..2aeb5c50ef689 100644 --- a/site/src/theme/darkBlue/experimental.ts +++ b/site/src/theme/darkBlue/experimental.ts @@ -15,34 +15,15 @@ export default { fill: colors.gray[500], text: colors.gray[50], disabled: { - background: "#f00", - outline: "#f00", + background: colors.gray[900], + outline: colors.zinc[700], fill: colors.gray[500], text: colors.gray[200], }, hover: { - background: "#f00", + background: colors.gray[800], outline: colors.gray[600], - fill: "#f00", - text: colors.white, - }, - }, - - l3: { - background: colors.gray[800], - outline: colors.gray[700], - fill: colors.gray[600], - text: colors.white, - disabled: { - background: "#f00", - outline: "#f00", - fill: "#f00", - text: colors.gray[200], - }, - hover: { - background: "#f00", - outline: "#f00", - fill: "#f00", + fill: colors.zinc[400], text: colors.white, }, }, @@ -75,7 +56,7 @@ export default { warning: { background: colors.amber[950], outline: colors.amber[300], - fill: "#f00", + fill: colors.amber[500], text: colors.amber[50], }, notice: { diff --git a/site/src/theme/experimental.ts b/site/src/theme/experimental.ts index 7bbc247f2a8e1..7021ea2313aa1 100644 --- a/site/src/theme/experimental.ts +++ b/site/src/theme/experimental.ts @@ -9,7 +9,6 @@ export type InteractiveThemeRole = keyof { export interface NewTheme { l1: Role; // page background, things which sit at the "root level" l2: InteractiveRole; // sidebars, table headers, navigation - l3: InteractiveRole; // buttons, inputs roles: { danger: InteractiveRole; // delete, immutable parameters, stuff that sucks to fix diff --git a/site/src/theme/light/experimental.ts b/site/src/theme/light/experimental.ts index 87ea50527c9f9..add7b48b010e4 100644 --- a/site/src/theme/light/experimental.ts +++ b/site/src/theme/light/experimental.ts @@ -15,34 +15,15 @@ export default { fill: colors.gray[500], text: colors.gray[950], disabled: { - background: "#f00", - outline: "#f00", + background: colors.gray[100], + outline: colors.gray[500], fill: colors.gray[500], - text: colors.gray[200], + text: colors.gray[800], }, hover: { background: colors.gray[200], outline: colors.gray[700], - fill: "#f00", - text: colors.black, - }, - }, - - l3: { - background: colors.gray[200], - outline: colors.gray[700], - fill: colors.gray[600], - text: colors.black, - disabled: { - background: "#f00", - outline: "#f00", - fill: "#f00", - text: colors.gray[200], - }, - hover: { - background: "#f00", - outline: "#f00", - fill: "#f00", + fill: colors.zinc[600], text: colors.black, }, }, @@ -75,7 +56,7 @@ export default { warning: { background: colors.amber[50], outline: colors.amber[300], - fill: "#f00", + fill: colors.amber[500], text: colors.amber[950], }, notice: { From f619cdb134784f00fa15ce5a750a53c24081f10a Mon Sep 17 00:00:00 2001 From: McKayla Washburn Date: Thu, 21 Dec 2023 17:49:56 +0000 Subject: [PATCH 2/4] small bits of cleanup, rebrand as "preview" --- site/src/components/Badges/Badges.stories.tsx | 6 +-- site/src/components/Badges/Badges.tsx | 4 +- .../AppearancePage/AppearanceForm.tsx | 20 ++++---- site/src/theme/experimental.ts | 48 +++++++++++++++---- 4 files changed, 54 insertions(+), 24 deletions(-) diff --git a/site/src/components/Badges/Badges.stories.tsx b/site/src/components/Badges/Badges.stories.tsx index fd31d446e0770..65b04d9d6c245 100644 --- a/site/src/components/Badges/Badges.stories.tsx +++ b/site/src/components/Badges/Badges.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react"; import { Badges, AlphaBadge, - BetaBadge, + PreviewBadge, DisabledBadge, EnabledBadge, EntitledBadge, @@ -55,9 +55,9 @@ export const Enterprise: Story = { children: , }, }; -export const Beta: Story = { +export const Preview: Story = { args: { - children: , + children: , }, }; export const Alpha: Story = { diff --git a/site/src/components/Badges/Badges.tsx b/site/src/components/Badges/Badges.tsx index 1a60e949b0831..19f20f0cfbc15 100644 --- a/site/src/components/Badges/Badges.tsx +++ b/site/src/components/Badges/Badges.tsx @@ -108,7 +108,7 @@ export const EnterpriseBadge: FC = () => { ); }; -export const BetaBadge: FC = () => { +export const PreviewBadge: FC = () => { return ( { }), ]} > - Beta + Preview ); }; diff --git a/site/src/pages/UserSettingsPage/AppearancePage/AppearanceForm.tsx b/site/src/pages/UserSettingsPage/AppearancePage/AppearanceForm.tsx index 85f0bd5d53129..e730ebb1aaa50 100644 --- a/site/src/pages/UserSettingsPage/AppearancePage/AppearanceForm.tsx +++ b/site/src/pages/UserSettingsPage/AppearancePage/AppearanceForm.tsx @@ -5,7 +5,7 @@ import type { UpdateUserAppearanceSettingsRequest } from "api/typesGenerated"; import themes, { DEFAULT_THEME, type Theme } from "theme"; import { ErrorAlert } from "components/Alert/ErrorAlert"; import { Stack } from "components/Stack/Stack"; -import { BetaBadge } from "components/Badges/Badges"; +import { PreviewBadge } from "components/Badges/Badges"; import { ThemeOverride } from "contexts/ThemeProvider"; export interface AppearanceFormProps { @@ -57,7 +57,7 @@ export const AppearanceForm: FC = ({ /> onChangeTheme("light")} @@ -74,7 +74,7 @@ interface AutoThemePreviewButtonProps extends Omit { const AutoThemePreviewButton: FC = ({ active, - beta, + preview, className, displayName, themes, @@ -102,13 +102,13 @@ const AutoThemePreviewButton: FC = ({ clipPath: "polygon(-5% -5%, 50% -5%, 50% 105%, -5% 105%)", }} active={active} - beta={beta} + preview={preview} displayName={displayName} theme={leftTheme} /> @@ -123,7 +123,7 @@ interface ThemePreviewButtonProps extends ThemePreviewProps { const ThemePreviewButton: FC = ({ active, - beta, + preview, className, displayName, theme, @@ -143,7 +143,7 @@ const ThemePreviewButton: FC = ({