Skip to content

feat(hub): support dock defaults on DevframeDefinition#94

Merged
antfu merged 1 commit into
mainfrom
tangy-lions-run
Jul 15, 2026
Merged

feat(hub): support dock defaults on DevframeDefinition#94
antfu merged 1 commit into
mainfrom
tangy-lions-run

Conversation

@antfubot

Copy link
Copy Markdown
Collaborator

Intent

Let a devframe author declare default dock attributes directly on its DevframeDefinition, so the appearance of the dock entry a hub synthesizes (category, order, visibility, badge, group, title/icon overrides) can travel with the tool itself rather than being specified only at every mount site.

What changed

  • DevframeDefinition.dock — a new optional field typed as the new framework-neutral DevframeDockDefaults interface (title, icon, defaultOrder, category, when, badge, groupId). Metadata-only, since devframe sits below hub and can't depend on the hub's dock types.
  • mountDevframe now merges the definition's dock defaults into the synthesized iframe entry, beneath its per-mount options.dock overrides. Precedence: locked derived id/type/url ← per-mount options.dock ← definition d.dockname/icon-derived defaults. Standalone adapters (cli/spa/build) ignore it.

Notes

Two tests cover the merge (defaults applied; per-mount overrides win). The devframe API snapshots are updated for the new export. The pre-existing withBuiltinCategory/~builtin test failures on the base branch are untouched and unrelated to this change.

This PR was created with the help of an agent.

Add a `dock` option to DevframeDefinition carrying default dock
attributes for the iframe entry a hub synthesizes. mountDevframe merges
these beneath its per-mount `dock` overrides, which in turn sit beneath
the locked, derived id/type/url.
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit 50a2178
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a57393b116a3e0008536a9b
😎 Deploy Preview https://deploy-preview-94--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 antfu merged commit 0ac8081 into main Jul 15, 2026
6 of 12 checks passed
@antfu antfu deleted the tangy-lions-run branch July 15, 2026 07:43
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