Skip to content

feat: add optional plugin dependency support#711

Merged
Yonava merged 1 commit into
mainfrom
yva/theme-resolver
Jun 20, 2026
Merged

feat: add optional plugin dependency support#711
Yonava merged 1 commit into
mainfrom
yva/theme-resolver

Conversation

@Yonava

@Yonava Yonava commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Introduces optionalDependsOn to the GraphPlugin type, allowing plugins to declare soft dependencies that may or may not be present at runtime.

  • Adds optionalDependsOn field to LoosePluginData and DefaultPluginData, with controls typed as Partial and events merged into the hub without ordering enforcement
  • Converts anchors' hard dependency on focus to an optional one, replacing three TODO-guarded controls.focus.* calls with controls.focus?. null-safe access

This unblocks plugin compositions where anchors is used without focus, removing the need for the workarounds previously tracked via TODO comments.

@Yonava Yonava changed the title add optional plugin dependency support feat: add optional plugin dependency support Jun 20, 2026
@Yonava Yonava merged commit 955ed7d into main Jun 20, 2026
1 check failed
@Yonava Yonava deleted the yva/theme-resolver branch June 20, 2026 13:36
@Yonava Yonava linked an issue Jun 20, 2026 that may be closed by this pull request
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.

[graph/plugins/anchors] remove dependency on plugins/focus

1 participant