Skip to content

feat(design): shared uno.config base with h-nav and unified nav header#120

Merged
antfu merged 6 commits into
mainfrom
feat/shared-design-uno-config
Jul 22, 2026
Merged

feat(design): shared uno.config base with h-nav and unified nav header#120
antfu merged 6 commits into
mainfrom
feat/shared-design-uno-config

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

What

Introduces design/uno.config.ts as the single source of truth for the UnoCSS stack every plugin and example composes, and unifies the top nav header across all surfaces.

Shared base config

design/uno.config.ts exports designConfig owning what was previously duplicated in all 15 configs: the sage-green presetAnthonyDesign over Wind4, Phosphor icons, DM Sans/Mono web fonts, the directive/variant-group transformers, the border preflight, the named z-* layers, and a new shared h-nav navbar-height token. Every uno.config.ts (8 plugins + 6 examples + storybook) now extends it via mergeConfigs and keeps only its own content globs / safelist.

This gives every surface one font stack, one z-index scale, and one fixed navbar height.

Unified nav header (icon + title)

  • The 6 co-located design.ts nav() helpers now use h-nav instead of a literal h-10.
  • The three Vue LayoutToolbar navs (inspect, messages, og) — previously content-driven py-2 heights — now pass class="h-nav" to match the fixed height used everywhere else. Their brand blocks were already canonical (i-ph:* text-base color-active icon + font-semibold text-sm title).
  • data-inspector's divergent header (bespoke container, color-primary icon/title, no fixed height) is brought into the canonical LayoutToolbar + h-nav + color-active icon form.

The hub host shells (minimal-vite/minimal-next) keep their distinct multi-tool chrome header by design; they still inherit the shared config.

Verification

  • pnpm lint clean, pnpm typecheck green (16 packages), pnpm build green (17 tasks).
  • Confirmed the built CSS of all 7 plugins + example SPAs emits one identical rule, .h-nav{height:calc(var(--spacing) * 10)}, across Solid, Vue, React/Next, Svelte and Preact.

This PR was created with the help of an agent.

Introduce design/uno.config.ts as the single source for the UnoCSS stack
every plugin and example composes — the sage-green preset, Wind4, Phosphor
icons, DM Sans/Mono fonts, transformers, border preflight, the named z-*
layers, and a new shared h-nav navbar-height token. All 15 configs now
extend it via mergeConfigs and keep only their own content globs/safelist.

Unify the top nav header (icon + title) across every surface: the design.ts
nav() helpers and the Vue LayoutToolbar navs all resolve to the shared h-nav
height, and data-inspector's divergent header is brought into the canonical
icon + title form.
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 513c0c8
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a6027a5145d3f0008304505
😎 Deploy Preview https://deploy-preview-120--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

antfu and others added 5 commits July 22, 2026 10:36
Bring the minimal-vite and minimal-next hub shells into the same canonical
top nav as every other surface: a fixed h-nav container with an icon + title
brand block (i-ph-squares-four-duotone), replacing their bespoke
items-baseline headers.
The framework-neutral class-helper builders (cx/button/badge/nav/card/…) were
duplicated byte-for-byte across six surfaces. Move the single implementation to
design/design.ts and reduce each local copy to a re-export, so every surface
stays in lockstep.

The shared config adds design/design.ts to every app's content.filesystem, so
its runtime-assembled class chains are extracted uniformly under both the Vite
pipeline and the @unocss/postcss (filesystem) integrations.
Add a framework-neutral `connectionIndicator(status)` helper to design/design.ts
that returns a dot + label pill for every non-connected state and `null` when
connected. Adopt it in each surface's top nav (inspect, messages, data-inspector,
git), replacing their bespoke pills/badges, so the connection state renders
identically everywhere and only appears while the connection is not live.
The full-screen "not connected" state was reimplemented with a near-identical
copy map in four surfaces (git, inspect, messages, terminals). Move the copy
(icon/title/body/reloadable/spin per status) and the layout class builders
(connectionPanel/Glyph/Title/Body/Detail) into design/design.ts, and have every
surface render from them, so the disconnected/error/unauthorized/connecting
panels look identical across React, Vue and Svelte.
@antfu
antfu merged commit 97b65e9 into main Jul 22, 2026
12 checks passed
@antfu
antfu deleted the feat/shared-design-uno-config branch July 22, 2026 03:20
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