-
Notifications
You must be signed in to change notification settings - Fork 0
feat-namespaced-spacing-and-responsive-cols #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
There was a problem hiding this 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‑hocclass="gap-*"usage on<OuiGrid>with a single:cols="{ ... }"responsive API and typedgapprops across superadmin/admin/org/billing pages. - Update the core OUI layout utilities: refine
Responsive<T>to allow an explicitdefaultkey and support object-based responsive values inresponsiveClass, 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.
Summary
Why
Notes