From e079ab4556bd378cdc6161355a8d489a5b1bda10 Mon Sep 17 00:00:00 2001 From: Benjamin Leonard Date: Fri, 16 May 2025 15:25:18 +0100 Subject: [PATCH 1/3] Initial tailwind upgrade blockout --- app/components/AttachFloatingIpModal.tsx | 2 +- app/components/CapacityBar.tsx | 28 +- app/components/CapacityBars.tsx | 2 +- app/components/CopyCode.tsx | 2 +- app/components/DocsPopover.tsx | 20 +- app/components/ErrorBoundary.tsx | 2 +- app/components/ErrorPage.tsx | 2 +- app/components/InstanceAutoRestartPopover.tsx | 4 +- app/components/IpPoolUtilization.tsx | 4 +- app/components/MswBanner.tsx | 6 +- app/components/RefetchIntervalPicker.tsx | 2 +- app/components/RouteTabs.tsx | 2 +- app/components/Sidebar.tsx | 25 +- app/components/TimeSeriesChart.tsx | 4 +- app/components/ToastStack.tsx | 2 +- app/components/TopBar.tsx | 6 +- app/components/form/Form.tsx | 9 +- .../form/fields/DateTimeRangePicker.tsx | 4 +- app/forms/idp/create.tsx | 2 +- app/forms/image-upload.tsx | 20 +- app/forms/instance-create.tsx | 4 +- app/layouts/LoginLayout.tsx | 8 +- app/layouts/helpers.tsx | 8 +- app/pages/DeviceAuthSuccessPage.tsx | 2 +- app/pages/DeviceAuthVerifyPage.tsx | 4 +- app/pages/project/instances/InstancesPage.tsx | 2 +- .../project/instances/SerialConsolePage.tsx | 4 +- .../project/vpcs/internet-gateway-edit.tsx | 6 +- app/pages/settings/ProfilePage.tsx | 4 +- app/pages/system/UtilizationPage.tsx | 6 +- app/pages/system/networking/IpPoolPage.tsx | 2 +- app/table/cells/TypeValueCell.tsx | 2 +- app/table/columns/action-col.tsx | 2 +- app/ui/lib/ActionMenu.tsx | 20 +- app/ui/lib/Badge.tsx | 18 +- app/ui/lib/BulkActionMenu.tsx | 6 +- app/ui/lib/CalendarCell.tsx | 10 +- app/ui/lib/CardBlock.tsx | 6 +- app/ui/lib/Combobox.tsx | 12 +- app/ui/lib/DateField.tsx | 2 +- app/ui/lib/DatePicker.tsx | 2 +- app/ui/lib/DateRangePicker.tsx | 2 +- app/ui/lib/DialogOverlay.tsx | 2 +- app/ui/lib/Divider.tsx | 2 +- app/ui/lib/EmptyMessage.tsx | 2 +- app/ui/lib/FileInput.tsx | 20 +- app/ui/lib/InlineCode.tsx | 2 +- app/ui/lib/Listbox.tsx | 10 +- app/ui/lib/Message.tsx | 12 +- app/ui/lib/MiniTable.tsx | 2 +- app/ui/lib/Modal.tsx | 14 +- app/ui/lib/NumberInput.tsx | 6 +- app/ui/lib/Pagination.tsx | 2 +- app/ui/lib/Popover.tsx | 2 +- app/ui/lib/PropertiesTable.tsx | 10 +- app/ui/lib/Radio.tsx | 12 +- app/ui/lib/SideModal.tsx | 22 +- app/ui/lib/Table.tsx | 14 +- app/ui/lib/TextInput.tsx | 6 +- app/ui/lib/Toast.tsx | 14 +- app/ui/styles/components/Tabs.css | 10 +- app/ui/styles/components/form.css | 2 +- app/ui/styles/components/menu-button.css | 6 +- app/ui/styles/components/menu-list.css | 2 +- app/ui/styles/components/mini-table.css | 2 +- app/ui/styles/components/spinner.css | 2 +- app/ui/styles/components/table.css | 6 +- app/ui/styles/index.css | 313 +-- app/ui/styles/vars.css | 13 + package-lock.json | 1695 ++++++++--------- package.json | 7 +- postcss.config.mjs | 17 - tailwind.config.ts | 91 - vite.config.ts | 2 + 74 files changed, 1192 insertions(+), 1410 deletions(-) create mode 100644 app/ui/styles/vars.css delete mode 100644 postcss.config.mjs delete mode 100644 tailwind.config.ts diff --git a/app/components/AttachFloatingIpModal.tsx b/app/components/AttachFloatingIpModal.tsx index a2022fe94c..671331b535 100644 --- a/app/components/AttachFloatingIpModal.tsx +++ b/app/components/AttachFloatingIpModal.tsx @@ -26,7 +26,7 @@ function FloatingIpLabel({ fip }: { fip: FloatingIp }) { {fip.description && ( <> -
+
{fip.description}
diff --git a/app/components/CapacityBar.tsx b/app/components/CapacityBar.tsx index 39fc075cd7..a9acc848d1 100644 --- a/app/components/CapacityBar.tsx +++ b/app/components/CapacityBar.tsx @@ -34,15 +34,15 @@ export const CapacityBar = ({ const unitElt = includeUnit ? <> {unit} : null return ( -
+
-
+
-
+
@@ -55,9 +55,9 @@ function TitleCell({ icon, title, unit }: TitleCellProps) { return (
- {icon} - {title} - ({unit}) + {icon} + {title} + ({unit})
) @@ -67,8 +67,8 @@ function PctCell({ pct }: { pct: number }) { // NaN happens when both top and bottom are 0 if (Number.isNaN(pct)) { return ( -
-
+
+
%
) @@ -77,7 +77,7 @@ function PctCell({ pct }: { pct: number }) { const [wholeNumber, decimal] = splitDecimal(pct) return (
-
{wholeNumber}
+
{wholeNumber}
{decimal}%
) @@ -87,10 +87,10 @@ function Bar({ pct }: { pct: number }) { return (
-
+
) } @@ -103,9 +103,9 @@ type ValueCellProps = { function ValueCell({ label, value, unit }: ValueCellProps) { return ( -
-
{label}
-
+
+
{label}
+
{unit}
diff --git a/app/components/CapacityBars.tsx b/app/components/CapacityBars.tsx index f5d415cf1c..b78da863ec 100644 --- a/app/components/CapacityBars.tsx +++ b/app/components/CapacityBars.tsx @@ -23,7 +23,7 @@ export const CapacityBars = ({ allocatedLabel: string }) => { return ( -
+
} title="CPU" diff --git a/app/components/CopyCode.tsx b/app/components/CopyCode.tsx index 15187abe37..9e7f303e6c 100644 --- a/app/components/CopyCode.tsx +++ b/app/components/CopyCode.tsx @@ -46,7 +46,7 @@ export function CopyCodeModal({ return ( -
+        
           {children}
         
diff --git a/app/components/DocsPopover.tsx b/app/components/DocsPopover.tsx index 5086597ff6..1ec1e8555c 100644 --- a/app/components/DocsPopover.tsx +++ b/app/components/DocsPopover.tsx @@ -22,14 +22,14 @@ type DocsPopoverLinkProps = { export const DocsPopoverLink = ({ href, linkText }: DocsPopoverLinkProps) => ( -
-
+
+
{linkText} - +
@@ -53,18 +53,18 @@ export const DocsPopover = ({ heading, icon, summary, links }: DocsPopoverProps)
-

-
{icon}
+

+
{icon}
{title}

-

{summary}

+

{summary}

-
-

Guides

+
+

Guides

{links.map((link) => ( ))} diff --git a/app/components/ErrorBoundary.tsx b/app/components/ErrorBoundary.tsx index be419ffa09..00cb74b893 100644 --- a/app/components/ErrorBoundary.tsx +++ b/app/components/ErrorBoundary.tsx @@ -19,7 +19,7 @@ import { ErrorPage, NotFound } from './ErrorPage' const IdpMisconfig = () => ( diff --git a/app/components/ErrorPage.tsx b/app/components/ErrorPage.tsx index 3e6b6522c1..ef2f725b63 100644 --- a/app/components/ErrorPage.tsx +++ b/app/components/ErrorPage.tsx @@ -41,7 +41,7 @@ export function ErrorPage({ children }: Props) {
-
+
diff --git a/app/components/InstanceAutoRestartPopover.tsx b/app/components/InstanceAutoRestartPopover.tsx index 54599937ba..0971d3a312 100644 --- a/app/components/InstanceAutoRestartPopover.tsx +++ b/app/components/InstanceAutoRestartPopover.tsx @@ -112,7 +112,7 @@ export const InstanceAutoRestartPopover = ({ instance }: { instance: Instance }) Instance Auto-Restart - +
@@ -123,7 +123,7 @@ export const InstanceAutoRestartPopover = ({ instance }: { instance: Instance }) const PopoverRow = ({ label, children }: { label: string; children: ReactNode }) => (
{label}
-
+
{children}
diff --git a/app/components/IpPoolUtilization.tsx b/app/components/IpPoolUtilization.tsx index 1a9530e6f1..927b28f263 100644 --- a/app/components/IpPoolUtilization.tsx +++ b/app/components/IpPoolUtilization.tsx @@ -34,13 +34,13 @@ export function IpUtilCell(util: IpPoolUtilization) { return (
- + v4
- + v6 diff --git a/app/components/MswBanner.tsx b/app/components/MswBanner.tsx index 58cf8eec14..d2fdf771e7 100644 --- a/app/components/MswBanner.tsx +++ b/app/components/MswBanner.tsx @@ -49,11 +49,11 @@ export function MswBanner({ disableButton }: Props) { return ( <> {/* The [&+*]:pt-10 style is to ensure the page container isn't pushed out of screen as it uses 100vh for layout */} -