Skip to content

Conversation

@veryCrunchy
Copy link
Member

Summary

  • Add namespaced CSS spacing variables for padding, margin, and gap (xs, sm, md, lg, xl, 2xl) derived from --oui-spacing-base to avoid collisions with container-related variables and prevent Tailwind v4 resolution issues.
  • Replace multiple grid column props (cols, colsMd, colsLg, colsXl) and class-based gap usage with a single responsive :cols object API (e.g. { sm: 1, md: 2, xl: 4 }) and standardized gap sizing across grid usages.
  • Update various pages (invoices, billing, abuse, quotas, dns, role-bindings, organizations) to use the new responsive cols prop and standardized gaps.
  • Refine Responsive type to allow an explicit default key and tighten the union shape: T | (Partial<Record<Breakpoint, T>> & { default?: T }).
  • Minor whitespace fix in deployments page.

Why

  • Prevents ambiguous --spacing-* custom property resolution that could be interpreted as --container-* by Tailwind v4, enabling safer upgrades and predictable spacing utilities.
  • Simplifies and standardizes responsive grid declaration and gap sizing, improving readability and consistency across the codebase.
  • Strengthens typing for responsive props, offering a clear recommended pattern for base/default values.

Notes

  • Responsive API example: :cols="{ sm: 1, md: 2, xl: 4 }"
  • Spacing variables introduced: --padding-xs…--padding-2xl, --margin-xs…--margin-2xl, --gap-xs…--gap-2xl

Introduce explicit CSS custom properties for padding, margin, and gap
(sizes: xs, sm, md, lg, xl, 2xl) that derive from the existing
--oui-spacing-base. Each utility gets its own namespace (--padding-,
--margin-, --gap-) to avoid collisions with container-related variables.

This prevents Tailwind v4 resolution issues where generic --spacing-
values (e.g. --spacing-xl) could be picked up as --container-* values,
ensuring predictable spacing utilities and safer future upgrades.
Update OuiGrid usages to pass responsive column definitions via the
:cols object (e.g. { sm: 1, md: 2, xl: 4 }) and standardize gap sizing.
This replaces multiple old attribute combinations like cols, colsMd,
colsLg, colsXl and class-based gaping with a single, consistent API.
Apply these changes across several dashboard pages (invoices, billing,
abuse, quotas, dns, role-bindings, organizations) to simplify layout
declaration and improve readability.

Additionally, expand the Oui types for Responsive<T> to allow an
explicit default key and tighten the union shape:
- add documentation comment recommending use of default for base value
- change Responsive<T> to T | (Partial<Record<Breakpoint,T>> & { default?: T })

Also fix a minor whitespace inconsistency in deployments page.

These changes make responsive grid usage consistent, clearer to
authors, and enable a more robust type for responsive props.
Copilot AI review requested due to automatic review settings February 1, 2026 04:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes responsive grid usage across admin/superadmin pages, introduces namespaced spacing CSS variables, and refines the shared Responsive<T> helper and class-mapping logic to support a default breakpoint-safe API.

Changes:

  • Replace legacy cols, colsMd, colsLg, colsXl, etc. props and ad‑hoc class="gap-*" usage on <OuiGrid> with a single :cols="{ ... }" responsive API and typed gap props across superadmin/admin/org/billing pages.
  • Update the core OUI layout utilities: refine Responsive<T> to allow an explicit default key and support object-based responsive values in responsiveClass, and add namespaced CSS custom properties for padding/margin/gap to avoid Tailwind v4 naming conflicts.
  • Minor cleanup in deployments pages (centralized useRouter() usage and a tiny class attribute whitespace tweak).

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/dashboard/app/pages/superadmin/webhook-events.vue Migrates summary metrics grid to :cols="{ sm: 1, md: 2, xl: 4 }" and standardized gap="md".
apps/dashboard/app/pages/superadmin/vps/[vpsId].vue Updates multiple VPS detail grids to the new :cols responsive object API with consistent gaps.
apps/dashboard/app/pages/superadmin/users/[userId].vue Switches the main user info grid to :cols="{ sm: 1, lg: 3 }" with gap="lg".
apps/dashboard/app/pages/superadmin/role-bindings.vue Refactors the role-binding form layout grid to use the new :cols/gap API.
apps/dashboard/app/pages/superadmin/organizations/[orgId].vue Uses :cols="{ sm: 1, lg: 3 }" for the organization info layout grid.
apps/dashboard/app/pages/superadmin/invoices.vue Standardizes invoices summary metrics grid to :cols="{ sm: 1, md: 2, xl: 4 }" and gap="md".
apps/dashboard/app/pages/superadmin/index.vue Converts overview metrics and lower dashboard grids to :cols objects and gap props (md/lg).
apps/dashboard/app/pages/superadmin/income.vue Updates income summary and payment metric grids to the new responsive cols API and gap sizing.
apps/dashboard/app/pages/superadmin/dns.vue Adjusts DNS server info grid to :cols="{ sm: 1, md: 2 }" with gap="md".
apps/dashboard/app/pages/superadmin/abuse.vue Replaces multi-breakpoint column props with :cols="{ sm: 1, md: 2, xl: 5, '2xl': 6 }" and gap="md".
apps/dashboard/app/pages/organizations.vue Standardizes several organization management grids to the :cols object API with gap="md"/"lg".
apps/dashboard/app/pages/deployments/index.vue Reuses a single router instance instead of re-calling useRouter() inside helpers; keeps existing responsive grids.
apps/dashboard/app/pages/deployments/[id]/index.vue Minor whitespace adjustment in a Hero icon container class list.
apps/dashboard/app/pages/billing.vue Updates the organization selector grid to :cols="{ sm: 1, lg: 2 }" with gap="md".
apps/dashboard/app/pages/admin/quotas.vue Migrates quota form grid to :cols="{ sm: 1, md: 2 }" and gap="md".
apps/dashboard/app/pages/admin/bindings.vue Uses the new responsive cols object for basic/binding info grids with gap="md".
apps/dashboard/app/components/oui/types.d.ts Refines Responsive<T> to `T
apps/dashboard/app/components/oui/classMaps.ts Extends responsiveClass to handle a default key and centralizes breakpoint prefixes in a string-keyed map.
apps/dashboard/app/assets/css/tailwind/config.css Adds namespaced --padding-*, --margin-*, and --gap-* custom properties derived from --oui-spacing-base to avoid Tailwind v4 spacing/container collisions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@veryCrunchy veryCrunchy merged commit 4c2a5e1 into main Feb 1, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants