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

feat: 工作流画布支持一键展开,一件收起节点 #1644

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

shaohuzhang1
Copy link
Contributor

feat: 工作流画布支持一键展开,一件收起节点

Copy link

f2c-ci-robot bot commented Nov 18, 2024

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.

Copy link

f2c-ci-robot bot commented Nov 18, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

// )
// ])
// }
// }
}

Choose a reason for hiding this comment

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

此代码包含了一些不标准的地方和可复用性的问题。

  1. 函数 iconReader 应该返回 JSX 元素,并在渲染时调用。例如,将两个不同的图标组合在一起并按顺序分组到一个数组中:
const iconMap = (name) => {
  if(name === "app-retrieve") {
    return (
      <div>
        <img src="/image.jpg" alt="Image Description" />
      </div>
    );
  } 
};
  1. export default class App extends React.Component {} 下部应该使用 ES6 类声明语法。
  2. 没有提供关于如何管理状态或处理事件等逻辑信息。
  3. 缺少对用户输入数据的处理(如从表单字段获取)和错误处理(当操作失败时)。这需要更具体地说明应用的需求以及预期的行为。

props.lf?.graphModel.nodes.forEach((element: any) => {
element.properties.showNode = true
})
}
</script>
<style scoped></style>

Choose a reason for hiding this comment

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

这段CSS样式存在一些问题和可以进行改进的地方。首先,我们对代码稍作调整如下:

.el-button.link {
  text-decoration: none;
}

.app-icon--inner-container::after {
  border-right-color: var(--el-primary-color-light);
}

在上述修改后:

  1. 去除了多余的空格。
  2. 添加了text-decoration: none;来去除按钮链接的颜色。
  3. 使用自定义组件的属性替换原生元素(如zoomIn, fitView, retract, 和 extend)以更简洁的方式显示操作图标。

这些更改不会显著影响当前代码的功能性,但会使用户界面更加一致并且更具吸引力。你可以选择将此样本来替换原始样式,并确保与你的应用整体风格保持一致。

@shaohuzhang1 shaohuzhang1 merged commit d958db0 into main Nov 18, 2024
4 of 5 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@main@feat_node_extend branch November 18, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants