From 080ee132cb20fa27fdce5a9d8564a0bc14539fbb Mon Sep 17 00:00:00 2001 From: eti Date: Wed, 5 Aug 2026 10:30:23 +0300 Subject: [PATCH] =?UTF-8?q?web/components:=20use=20proper=20size=20naming?= =?UTF-8?q?=20convention=20(sm=20=E2=9E=9D=20small,=20...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eti --- .../lib/components/profile/FollowCard.svelte | 2 +- web/src/lib/components/repo/BlobHeader.svelte | 8 +-- web/src/lib/components/repo/BranchList.svelte | 2 +- .../lib/components/repo/DiffFileCard.svelte | 2 +- web/src/lib/components/repo/DiffTopbar.svelte | 12 ++--- web/src/lib/components/repo/RepoCard.svelte | 2 +- web/src/lib/components/repo/RepoHeader.svelte | 6 +-- web/src/lib/components/repo/StarButton.svelte | 4 +- .../components/repo/issues/IssueCard.svelte | 2 +- .../components/repo/issues/IssueSearch.svelte | 2 +- .../repo/issues/IssueToolbar.svelte | 6 +-- .../repo/pipelines/PipelineCard.svelte | 2 +- .../repo/pipelines/PipelineCardContent.svelte | 2 +- .../repo/pipelines/PipelineSearch.svelte | 2 +- .../repo/pipelines/PipelineToolbar.svelte | 11 ++-- .../repo/pipelines/PipelineWorkflows.svelte | 50 +++++++++++++++---- .../components/settings/SettingsList.svelte | 8 +-- .../components/settings/tabs/EmailsTab.svelte | 4 +- .../components/settings/tabs/KnotsTab.svelte | 4 +- .../components/settings/tabs/SitesTab.svelte | 2 +- .../settings/tabs/SpindlesTab.svelte | 4 +- web/src/lib/components/shell/Topbar.svelte | 8 +-- .../lib/components/shell/TopbarSearch.svelte | 2 +- .../lib/components/ui/Button.stories.svelte | 16 +++--- web/src/lib/components/ui/Button.svelte | 14 +++--- web/src/lib/components/ui/Card.stories.svelte | 4 +- web/src/lib/components/ui/Card.svelte | 8 +-- .../components/ui/ColorBall.stories.svelte | 10 ++-- web/src/lib/components/ui/ColorBall.svelte | 11 ++-- .../lib/components/ui/Dropdown.stories.svelte | 6 +-- web/src/lib/components/ui/Dropdown.svelte | 4 +- .../lib/components/ui/Input.stories.svelte | 18 +++---- web/src/lib/components/ui/Input.svelte | 20 ++++---- .../lib/components/ui/MarkdownEditor.svelte | 4 +- web/src/lib/components/ui/Tag.svelte | 10 ++-- web/src/lib/components/ui/Textarea.svelte | 12 ++--- .../lib/components/welcome/KeysStep.svelte | 2 +- .../[repo]/settings/access/new/+page.svelte | 2 +- .../[repo]/settings/hooks/new/+page.svelte | 2 +- .../[repo]/settings/labels/new/+page.svelte | 2 +- .../pipelines/secrets/new/+page.svelte | 2 +- .../[repo]/settings/rename/+page.svelte | 2 +- .../[repo]/settings/sites/+page.svelte | 4 +- web/src/routes/login/+page.svelte | 2 +- .../routes/settings/emails/new/+page.svelte | 2 +- web/src/routes/settings/keys/new/+page.svelte | 2 +- .../routes/settings/knots/new/+page.svelte | 2 +- .../settings/profile/avatar/+page.svelte | 2 +- .../settings/profile/deactivate/+page.svelte | 2 +- .../settings/profile/delete/+page.svelte | 2 +- .../settings/profile/handle/+page.svelte | 2 +- .../settings/profile/password/+page.svelte | 2 +- .../routes/settings/spindles/new/+page.svelte | 2 +- 53 files changed, 177 insertions(+), 143 deletions(-) diff --git a/web/src/lib/components/profile/FollowCard.svelte b/web/src/lib/components/profile/FollowCard.svelte index b3bec5ff3..341e129ad 100644 --- a/web/src/lib/components/profile/FollowCard.svelte +++ b/web/src/lib/components/profile/FollowCard.svelte @@ -16,6 +16,6 @@ } = $props(); - + diff --git a/web/src/lib/components/repo/BlobHeader.svelte b/web/src/lib/components/repo/BlobHeader.svelte index b7b83b416..6f650ecc5 100644 --- a/web/src/lib/components/repo/BlobHeader.svelte +++ b/web/src/lib/components/repo/BlobHeader.svelte @@ -92,14 +92,14 @@ {#if kind !== "submodule"} {#if hasRenderedView(kind)} - {/if} - + {#if copyText !== null} - @@ -83,7 +83,7 @@ {#if onSetAllOpen} - diff --git a/web/src/lib/components/repo/StarButton.svelte b/web/src/lib/components/repo/StarButton.svelte index e23c67e16..5eb890d69 100644 --- a/web/src/lib/components/repo/StarButton.svelte +++ b/web/src/lib/components/repo/StarButton.svelte @@ -69,7 +69,7 @@ - - + + + @@ -70,9 +70,9 @@
- - - + + +
diff --git a/web/src/lib/components/ui/Button.svelte b/web/src/lib/components/ui/Button.svelte index 4ea6cacaa..f4161f234 100644 --- a/web/src/lib/components/ui/Button.svelte +++ b/web/src/lib/components/ui/Button.svelte @@ -62,9 +62,9 @@ // the two render at different heights side by side. py only takes over as the // floor when a label wraps to a second line. size: { - sm: "min-h-8 gap-1.5 px-2 py-1 typography-paragraph-small", - md: "min-h-9 gap-2 px-3 py-1 typography-paragraph-regular", - lg: "min-h-10 gap-2.5 px-4 py-1 typography-paragraph-large" + small: "min-h-8 gap-1.5 px-2 py-1 typography-paragraph-small", + regular: "min-h-9 gap-2 px-3 py-1 typography-paragraph-regular", + large: "min-h-10 gap-2.5 px-4 py-1 typography-paragraph-large" }, insetShadow: { true: "", @@ -96,7 +96,7 @@ ], defaultVariants: { variant: "default", - size: "md", + size: "regular", insetShadow: false } }); @@ -132,7 +132,7 @@ let { variant = "default", - size = "md", + size = "regular", insetShadow = false, href, type = "button", @@ -148,8 +148,8 @@ }: Props = $props(); const classes = $derived(button({ variant, size, insetShadow, class: className })); - const spinnerSize = $derived(spinnerClass ?? (size === "lg" ? "size-5" : "size-4")); - const iconSize = $derived(size === "lg" ? "size-5" : "size-4"); + const spinnerSize = $derived(spinnerClass ?? (size === "large" ? "size-5" : "size-4")); + const iconSize = $derived(size === "large" ? "size-5" : "size-4"); const Icon = $derived(icon); diff --git a/web/src/lib/components/ui/Card.stories.svelte b/web/src/lib/components/ui/Card.stories.svelte index b131d615f..a50d3d95e 100644 --- a/web/src/lib/components/ui/Card.stories.svelte +++ b/web/src/lib/components/ui/Card.stories.svelte @@ -10,13 +10,13 @@ border: { control: "boolean" }, shadow: { control: "boolean" }, background: { control: "boolean" }, - padding: { control: { type: "select" }, options: ["default", "sm", "none"] } + padding: { control: { type: "select" }, options: ["regular", "small", "none"] } }, args: { border: true, shadow: false, background: true, - padding: "default" + padding: "regular" } }); diff --git a/web/src/lib/components/ui/Card.svelte b/web/src/lib/components/ui/Card.svelte index 0a60d9779..227610203 100644 --- a/web/src/lib/components/ui/Card.svelte +++ b/web/src/lib/components/ui/Card.svelte @@ -17,8 +17,8 @@ false: "" }, padding: { - default: "px-6 py-4", - sm: "p-4", + regular: "px-6 py-4", + small: "p-4", none: "" } }, @@ -26,7 +26,7 @@ border: true, shadow: false, background: true, - padding: "default" + padding: "regular" } }); @@ -50,7 +50,7 @@ border = true, shadow = false, background = true, - padding = "default", + padding = "regular", class: className, children, ...rest diff --git a/web/src/lib/components/ui/ColorBall.stories.svelte b/web/src/lib/components/ui/ColorBall.stories.svelte index 974a508ca..db509b22f 100644 --- a/web/src/lib/components/ui/ColorBall.stories.svelte +++ b/web/src/lib/components/ui/ColorBall.stories.svelte @@ -9,17 +9,17 @@ argTypes: { size: { control: { type: "inline-radio" }, - options: ["sm", "md", "lg"] + options: ["small", "regular", "large"] } }, args: { color: "#3178c6", - size: "sm" + size: "small" } }); - - - + + + diff --git a/web/src/lib/components/ui/ColorBall.svelte b/web/src/lib/components/ui/ColorBall.svelte index 7f2459afe..833aa9700 100644 --- a/web/src/lib/components/ui/ColorBall.svelte +++ b/web/src/lib/components/ui/ColorBall.svelte @@ -5,13 +5,14 @@ base: "shrink-0 rounded-full", variants: { size: { - sm: "size-2", - md: "size-4", - lg: "size-8" + small: "size-2", + regular: "size-4", + large: "size-8" } }, + // the language dot is by far the common case, so the smallest rung is the default here defaultVariants: { - size: "sm" + size: "small" } }); @@ -26,7 +27,7 @@ class?: string; } - let { color, size = "sm", class: className }: Props = $props(); + let { color, size = "small", class: className }: Props = $props(); const classes = $derived(colorBall({ size, class: className })); const sphere = $derived( diff --git a/web/src/lib/components/ui/Dropdown.stories.svelte b/web/src/lib/components/ui/Dropdown.stories.svelte index 2f9ecdcb4..019f1d704 100644 --- a/web/src/lib/components/ui/Dropdown.stories.svelte +++ b/web/src/lib/components/ui/Dropdown.stories.svelte @@ -58,15 +58,15 @@ padding and label size the same way it does on a standalone Button. -->
- + Edit Settings - + Edit Settings - + Edit Settings diff --git a/web/src/lib/components/ui/Dropdown.svelte b/web/src/lib/components/ui/Dropdown.svelte index b2ba4f513..c6b910bd9 100644 --- a/web/src/lib/components/ui/Dropdown.svelte +++ b/web/src/lib/components/ui/Dropdown.svelte @@ -71,7 +71,7 @@ variant = "plain", buttonVariant = "default", insetShadow = false, - size = "md", + size = "regular", align = "left", label, menuClass, @@ -213,7 +213,7 @@