From 5d746aa59458d06d077e2bfe74afb89d14a75c42 Mon Sep 17 00:00:00 2001 From: TJ Date: Mon, 17 Aug 2026 11:41:06 -0700 Subject: [PATCH] fix(site/src): replace hardcoded text-[13px] with scale tokens outside agents (#28071) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the arbitrary `text-[13px]` value with the design-system tokens `text-sm` (14px) or `text-xs` (12px) in the 18 non-agents files that used it. `AgentsPage` usages and `modules/resources/AgentMetadata.tsx` are intentionally left alone; they'll be handled with the agents UI separately. Because the custom Tailwind scale bakes `font-weight: 500` into `text-xs`/`text-sm`, `font-normal` was added wherever the text previously rendered at 400 and is prose, code, or log content, so only the size changes there. Short labels, headers, and numeric values take the token's 500 weight as-is. ### Token decisions | File | Token | Rationale | |---|---|---| | `components/Logs/LogLine.tsx` | `text-xs font-normal` | Dense mono log output; 12px keeps line-height close to current | | `components/PaginationWidget/PaginationAmount.tsx` | `text-xs font-normal` | Caption-style "showing X of Y" text | | `pages/IconsPage/IconsPage.tsx` (figcaption) | `text-xs font-normal` | 88px-wide icon captions | | `pages/WorkspacesPage/WorkspacesButton.tsx` | `text-xs font-normal` | Secondary line under the template name in the combobox | | `modules/templates/TemplateExampleCard.tsx`, `pages/CreateTemplateGalleryPage/...` | `text-xs font-normal` | Secondary card description prose (and its "Read more" link) | | `components/FullPageLayout/Sidebar.tsx` / `Topbar.tsx` | `text-sm` (Topbar adds `font-normal`) | Nav chrome; Topbar is a container so `font-normal` avoids leaking 500 into all children | | `components/Paywall/PaywallPremium.tsx` | `text-sm font-normal` | Feature list prose (compact variant) | | `modules/templates/TemplateFiles/TemplateFiles.tsx` / `TemplateFileTree.tsx` | `text-sm` | File headers/tree labels (header already `font-medium`) | | `modules/workspaces/WorkspaceOutdatedTooltip.tsx` | `text-sm font-normal` | Tooltip body prose | | `pages/WorkspacePage/ResourcesSidebar.tsx` | `text-sm font-normal` | Help text prose | | `pages/AISettingsPage/.../CredentialField.tsx` | `text-sm font-normal` | Mono credential input | | `pages/DeploymentSettingsPage/Option.tsx` | `text-sm` | Already `font-semibold` | | `pages/HealthPage/Content.tsx` | `text-sm font-normal` | Mono detail block | | `pages/TemplateVersionEditorPage/TemplateVersionEditor.tsx` | `text-sm` | "Files" panel header label | | `pages/TemplatePage/TemplateInsightsPage/TemplateInsightsPage.tsx` | `text-sm` (`font-normal` on prose/empty state) | Data labels and values in insight panels | ### Storybook review checklist Stories directly covering changed components: - `Logs/LogLine` and `Logs/Logs` - `Paywall/PaywallPremium` - `TemplateExampleCard` - `TemplateFiles` and `TemplateFileTree` - `WorkspaceOutdatedTooltip` - `CreateTemplateGalleryPageView` - `IconsPage` - `TemplateInsightsPage` - `TemplateVersionEditor` (also exercises FullPageLayout `Topbar`/`Sidebar`) Indirect coverage for components without their own stories: - `PaginationAmount` → `PaginationWidget/PaginationContainer` stories, plus paginated page views (`UsersPageView`, `AuditPageView`, `ConnectionLogPageView`) - `WorkspacesButton` → `WorkspacesPageView` stories (open the "New workspace" combobox) - `HealthPage/Content` → `HealthPage/*Page` stories (`DERPPage`, `DatabasePage`, etc.) - `ResourcesSidebar` → `WorkspacePage/Workspace` stories (failed-build state) - `FullPageLayout Topbar/Sidebar` → `TemplateVersionEditor` stories - `CredentialField` → `ProviderForm` / `AddProviderPageView` stories No story exists for `DeploymentSettingsPage/Option`; verify on the deployment settings page (option value pills). --- 🤖 This PR was generated by Coder Agents on behalf of @tracyjohnsonux. --- site/src/components/FullPageLayout/Sidebar.tsx | 4 ++-- site/src/components/FullPageLayout/Topbar.tsx | 2 +- site/src/components/Logs/LogLine.tsx | 2 +- .../PaginationWidget/PaginationAmount.tsx | 2 +- site/src/components/Paywall/PaywallSmall.tsx | 2 +- .../TemplateExampleCard/TemplateExampleCard.tsx | 5 +++-- .../templates/TemplateFiles/TemplateFileTree.tsx | 2 +- .../templates/TemplateFiles/TemplateFiles.tsx | 2 +- .../WorkspaceOutdatedTooltip.tsx | 10 ++++++---- .../ProvidersPage/components/CredentialField.tsx | 2 +- .../CreateTemplateGalleryPageView.tsx | 2 +- site/src/pages/DeploymentSettingsPage/Option.tsx | 4 ++-- site/src/pages/HealthPage/Content.tsx | 2 +- site/src/pages/IconsPage/IconsPage.tsx | 2 +- .../TemplateInsightsPage/TemplateInsightsPage.tsx | 14 +++++++------- .../TemplateVersionEditor.tsx | 2 +- site/src/pages/WorkspacePage/ResourcesSidebar.tsx | 2 +- site/src/pages/WorkspacesPage/WorkspacesButton.tsx | 2 +- 18 files changed, 33 insertions(+), 30 deletions(-) diff --git a/site/src/components/FullPageLayout/Sidebar.tsx b/site/src/components/FullPageLayout/Sidebar.tsx index 4ebc14a480..a119a584fb 100644 --- a/site/src/components/FullPageLayout/Sidebar.tsx +++ b/site/src/components/FullPageLayout/Sidebar.tsx @@ -17,7 +17,7 @@ export const SidebarLink: FC = ({ className, ...props }) => { return ( = ({ return (