Skip to content

Conversation

@HawtinZeng
Copy link
Contributor

No description provided.

@Aarebecca
Copy link
Contributor

@HawtinZeng packages/g6/__tests__/demos/behavior-expand-collapse-node.ts文件存在格式问题,麻烦尝试下格式化代码呢。

@HawtinZeng
Copy link
Contributor Author

文件结束符改成LF了

@hustcc
Copy link
Member

hustcc commented Jul 18, 2025

@HawtinZeng 修复一下 ci 吧~

@HawtinZeng
Copy link
Contributor Author

@HawtinZeng 修复一下 ci 吧~

image g6-extension-react本地跑pnpm run test能通过,ci不通过

@HawtinZeng
Copy link
Contributor Author

CI通过了,可以合进主分支了

@Aarebecca
Copy link
Contributor

@HawtinZeng 最好是添加一个额外的测试用例

@HawtinZeng
Copy link
Contributor Author

HawtinZeng commented Aug 19, 2025

我觉得用不着,因为最开始behavior-expand-collapse-node的测试数据有个点就是collapsed,但我跑测试通过不了,我就把这个collapsed状态删掉了,后面有人提了一个collapsed的bug,我这个时候才找到对应的解决办法。需要改一下原来的图配置。所以这个测试用例并没有发生什么改变。只是图配置变了,图配置也不影响这个用例中的其它功能。

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.47%. Comparing base (8500beb) to head (2d53215).
⚠️ Report is 6 commits behind head on v5.

Files with missing lines Patch % Lines
packages/g6/src/utils/element.ts 57.14% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##               v5    #7262      +/-   ##
==========================================
- Coverage   95.59%   95.47%   -0.12%     
==========================================
  Files         188      188              
  Lines        9888     9905      +17     
  Branches     2134     2132       -2     
==========================================
+ Hits         9452     9457       +5     
- Misses        436      448      +12     
Flag Coverage Δ
g6 95.47% <66.66%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/g6/src/behaviors/collapse-expand.ts 100.00% <100.00%> (ø)
packages/g6/src/runtime/behavior.ts 98.43% <100.00%> (ø)
packages/g6/src/runtime/element.ts 97.14% <100.00%> (ø)
packages/g6/src/runtime/graph.ts 98.27% <100.00%> (+0.83%) ⬆️
packages/g6/src/utils/element.ts 93.44% <57.14%> (-6.56%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Aarebecca
Copy link
Contributor

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 主要移除了 CollapseExpandNodeOptions 中已废弃的 align 字段,并更新了相关的行为、测试和文档。此外,还补充了 behavior-expand-collapse-nodecollapsed 初始状态下的测试用例。代码变更整体上是正确的,但有几点建议:

  1. runtime/behavior.ts 中,对已销毁元素的事件处理逻辑被削弱,建议恢复。
  2. utils/element.ts 中的 setAttributes 函数存在代码重复,可以进行重构以提高可维护性。
  3. API 文档中 CollapseExpandNodeOptions 的类型定义没有完全更新,需要移除 align 字段。
    这些修改将有助于提高代码的健壮性和可维护性。

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.

4 participants