Skip to content

Conversation

@Wang-Yi-Teng
Copy link
Collaborator

修复extension包引入vue包问题

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

⚠️ No Changeset found

Latest commit: 902284a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@DymoneLewis DymoneLewis requested a review from Copilot November 3, 2025 09:26
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 implements automatic lifecycle management for Vue app instances in MiniMap scenarios by tracking node lifecycles and cleaning up resources when all nodes are destroyed. The key changes include downgrading TailwindCSS from v4 to v3.4.7 and refactoring MiniMap teleport container management.

  • Downgraded TailwindCSS from version 4.1.11 to 3.4.7
  • Implemented automatic Vue app instance cleanup based on node lifecycle tracking
  • Moved MiniMap teleport container creation/destruction logic from extension to vue-node-registry

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updated TailwindCSS version and added libc specifications for platform-specific packages
packages/vue-node-registry/src/view.ts Added flowId parameter to disconnect call for proper cleanup tracking
packages/vue-node-registry/src/teleport.ts Added node tracking map and automatic cleanup logic for Vue app instances
packages/extension/src/components/mini-map/index.ts Removed manual teleport container management and added isMiniMap flag
packages/core/src/model/GraphModel.ts Added isMiniMap property to GraphModel
examples/vue3-app/src/views/LFChartView.vue Added UI controls and test data for MiniMap functionality
examples/vue3-app/src/components/chart/linkChart.ts Commented out automatic MiniMap display
examples/vue3-app/package.json Updated TailwindCSS version specification
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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


let active = false
const appInstances = new Map<string, InstanceType<any>>()
const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

Missing punctuation and spacing in Chinese comment. Should be "用于储存当前流程图节点id,当节点都销毁时同时卸载vueApp实例" (add comma after 'id').

Suggested change
const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例
const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id,当节点都销毁时同时卸载vueApp实例

Copilot uses AI. Check for mistakes.

let active = false
const appInstances = new Map<string, InstanceType<any>>()
const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The Map is typed as Map<string, any> but based on usage it should be Map<string, string[]> since it stores arrays of node IDs. This makes the code more maintainable and provides better type safety.

Suggested change
const appNodesMap = new Map<string, any>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例
const appNodesMap = new Map<string, string[]>() // 用于储存当前流程图节点id当节点都销毁时同时卸载vueApp实例

Copilot uses AI. Check for mistakes.
this.animation = setupAnimation(animation)
this.overlapMode = options.overlapMode || OverlapMode.DEFAULT

this.isMiniMap = options.isMiniMap || false
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The isMiniMap property is not declared in the class definition before being used in the constructor. It should be declared as a class property with appropriate documentation explaining its purpose (e.g., "Indicates whether this graph instance is used in a MiniMap component").

Copilot uses AI. Check for mistakes.
@DymoneLewis DymoneLewis self-requested a review November 3, 2025 09:35
@DymoneLewis
Copy link
Collaborator

有点问题,这么写vue-node-registry实现的自定义vue节点就渲染不出来了
Vite-App-11-12-2025_06_56_PM

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