Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removeEditorWindow does not compare title #1955

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

liujuping
Copy link
Collaborator

No description provided.

@liujuping liujuping requested a review from JackLian as a code owner April 26, 2023 02:58
@github-actions
Copy link

ChatGPT Code Review:

CodeReview:
在Workspace类中的removeEditorWindow方法中,修改了参数列表,新增title参数,并在对windows数组进行查找元素时添加了对title的判断,这样做可以确保在删除窗口时只会删除指定title的窗口。这次修改基本没有问题,这里提供一些建议。
建议:

  1. 可以考虑将参数列表中的resourceName与title组合成一个参数对象作为参数,提高代码的可读性。
  2. 在命名方法时应该命名得具体明确,例如本例中的removeEditorWindow,可以考虑修改为removeWindowByResourceAndTitle。
  3. 在添加注释时应该更具体说明方法的行为和参数的作用,以便于理解和开发维护。

Commit message:
fix(workspace): removeEditorWindow does not compare title

Explanation:
修改了 removeEditorWindow 方法,新增 title 参数,确保只删除指定 title 的窗口,避免误删除。

@github-actions
Copy link

Coverage report for packages/utils

St.
Category Percentage Covered / Total
🔴 Statements 48.18% 119/247
🔴 Branches 42.64% 113/265
🔴 Functions 41.03% 32/78
🔴 Lines 49.36% 115/233

Test suite run success

32 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from 7d32726

@github-actions
Copy link

Coverage report for packages/renderer-core

St.
Category Percentage Covered / Total
🟡 Statements 71.95% 908/1262
🟡 Branches 61.23% 567/926
🟡 Functions 69.12% 197/285
🟡 Lines 71.94% 892/1240

Test suite run success

91 tests passing in 8 suites.

Report generated by 🧪jest coverage report action from 7d32726

@github-actions
Copy link

Coverage report for packages/designer

St.
Category Percentage Covered / Total
🟢 Statements 96.34% 2842/2950
🟢 Branches 88.83% 1630/1835
🟢 Functions 95.97% 858/894
🟢 Lines 96.41% 2769/2872

Test suite run success

370 tests passing in 42 suites.

Report generated by 🧪jest coverage report action from 7d32726

@github-actions
Copy link

Coverage report for packages/react-simulator-renderer

St.
Category Percentage Covered / Total
🔴 Statements 33.63% 114/339
🔴 Branches 14.88% 25/168
🔴 Functions 26.14% 23/88
🔴 Lines 34.23% 114/333

Test suite run success

2 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 7d32726

@JackLian JackLian merged commit 9fd28ef into develop Apr 26, 2023
@JackLian JackLian deleted the fix/workspace-removeEditorWindow branch April 26, 2023 03:05
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