-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: 工作流编排应用记住节点的收起/展开状态 #1543 #1560
Conversation
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
set(props.nodeModel.properties, 'showNode', true) | ||
return true | ||
} | ||
}) | ||
const node_status = computed(() => { | ||
if (props.nodeModel.properties.status) { | ||
return props.nodeModel.properties.status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该问题主要在于:
- 在
@mousedown.stop @keyup.stop
等处理事件时需要考虑如何在不同的页面滚动中恢复原样。 - 比如在节点级别显示/隐藏操作按钮,应考虑是否为自定义组件,并且确保在响应式布局中的正确性。
关于修改方式:可以尝试重新实现或使用更简洁的方法,例如仅在一个端点监听焦点变化而不是多次。此外,在关键方法返回后添加默认值以防止空指针异常可能更为合适。
id: `${id}_left`, | ||
edgeAddable: false, | ||
type: 'left' | ||
}) | ||
} | ||
anchors.push({ | ||
x: x + width / 2 - 10, | ||
y: y, | ||
y: showNode ? y : y - 15, | ||
id: `${id}_right`, | ||
type: 'right' | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有明显不规范的地方或潜在问题,代码是按顺序填写,并保持了一致性。在优化建议方面,可能需要考虑的是是否可以进一步减少不必要的注释,因为过多的说明可能会增加阅读难度。
示例:
class AppNodeModel extends HtmlResize.model {
}
这行应该写成class AppNodeModel extends HtmlResize.prototype {}
以更清晰地表示继承方式。
@@ -50,7 +51,7 @@ class ConditionModel extends AppNodeModel { | |||
const h = get_up_index_height(branch_condition_list, index) | |||
anchors.push({ | |||
x: x + width / 2 - 10, | |||
y: y - height / 2 + 75 + h + element.height / 2, | |||
y: showNode ? y - height / 2 + 75 + h + element.height / 2 : y - 15, | |||
id: `${id}_${element.id}_right`, | |||
type: 'right' | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个Java脚本中的问题是关于边长和高度设置错误。正确的做法是在构造器或set方法中使用width
和height
属性的值。
此外,代码没有考虑元素显示时边缘可能被隐藏的情况。在这种情况下,应确保在渲染这些元素时更新节点的实际位置。
根据当前信息:
- 不需要调整。
- 未发现与规范相关或潜在问题;如果有,则会在接下来的提交中讨论。
- 这是过去的一个例子,因此我不能对其进行修改。如果您有关于如何改进此示例的建议,请通过提供具体的实现更改来指导开发团队进行改进。
feat: 工作流编排应用记住节点的收起/展开状态 #1543