-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: In workflow applications, the display of custom icons for sub applications and tools in the box below the variable selection is incorrect #4168
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,6 +75,7 @@ class AppNode extends HtmlResize.view { | |
| } | ||
| result.push({ | ||
| value: this.props.model.id, | ||
| icon: this.props.model.properties.node_data?.icon, | ||
| label: this.props.model.properties.stepName, | ||
| type: this.props.model.type, | ||
| children: this.props.model.properties?.config?.fields || [], | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided code snippet seems to contain a small issue that could be resolved without altering its main functionality. Let's address it: @@ -75,6 +75,9 @@
},
result.push({
value: this.props.model.id,
+ icon: this.props.model.properties.node_data.icon || '',
label: this.props.model.properties.stepName,
type: this.props.model.type,
children: this.props.model.properties.config.fields || [],
});Potential issue resolved:
Optimization suggestion (not required but recommended): This change will handle optional properties gracefully while maintaining the original intent of providing a node with an optional icon. |
||
|
|
||
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.
This code looks mostly correct with a couple of minor adjustments to enhance readability and maintainability:
Attribute Order: It seems like you're trying to ensure attributes (
classand@wheel) are consistently placed within specific tags (e.g.,<a>,<button>, etc.). If this is a requirement, make sure each element has its properties in the same order.Whitespace Consistency: The addition of spaces after commas (
,"size": "18"), colons (:), and semi-colons (;) can improve the readability, but it's already present.Code Formatting: Ensure consistent indentation. In JavaScript objects,
{...}typically use two-space indentation while strings might need to be single-quoted ('string'). However, if you prefer triple quotes (`"""```"), they must span at least three lines.Here is a slightly formatted version for better readability:
In summary, there are no immediate technical issues, but ensuring proper formatting and attribute ordering can certainly help keep the code clean and easier to understand.