-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: Add Helper for Field Processing & Update Code Validation Logic #4429
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…dash library 📝 (GenericNode/index.tsx): Add import statement for processNodeAdvancedFields helper function 📝 (GenericNode/index.tsx): Add edges variable to store edges state using useFlowStore hook 📝 (GenericNode/index.tsx): Modify onSuccess callback to process and update node data with advanced fields using processNodeAdvancedFields helper function
…vanced fields of a node based on edges in a graph for better customization and control.
dosubot
bot
added
size:M
This PR changes 30-99 lines, ignoring generated files.
enhancement
New feature or request
labels
Nov 6, 2024
…dash to clean up the code and improve maintainability.
github-actions
bot
added
bug
Something isn't working
and removed
enhancement
New feature or request
labels
Nov 6, 2024
…onent for tooltip styling and add support for accent colors 📝 (NodeStatus/index.tsx): Update border and text color classes to use accent colors for better visual consistency 📝 (handleRenderComponent/index.tsx): Refactor code to use accent colors for handle styling and tooltip components 📝 (index.tsx): Remove unused imports and refactor code to use accent colors for border beams and build status styling 📝 (get-class-from-build-status.ts): Update CSS class based on build status for better visual representation 📝 (index.tsx, sidebarFilterComponent/index.tsx, nodeToolbarComponent/index.tsx): Update CSS variable names for consistency and clarity 📝 (index.tsx): Refactor code to use ReactFlow hooks for better maintainability and readability 📝 (applies.css): Refactor CSS classes for consistency and improved styling 📝 (index.css): Update color variables names from inner- to accent- for better clarity and consistency in the codebase. 📝 (tailwind.config.mjs): refactor color classes from "inner-" to "accent-" for better clarity and consistency 📝 (tailwind.config.mjs): add new "node-ring" color class to the tailwind config 📝 (freeze-path.spec.ts): update test to click on "freeze-path-button" instead of "icon-FreezeAll" for better test coverage and accuracy
… relevantEdges for clarity and consistency 🐛 (process-node-advanced-fields.ts): fix condition to check relevantEdges length instead of edgesWithNode length for correct logic
ogabrielluiz
approved these changes
Nov 7, 2024
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.
LGTM
anovazzi1
approved these changes
Nov 7, 2024
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.
lgtm
joaoguilhermeS
pushed a commit
that referenced
this pull request
Nov 7, 2024
…4429) * 📝 (GenericNode/index.tsx): Add import statement for cloneDeep from lodash library 📝 (GenericNode/index.tsx): Add import statement for processNodeAdvancedFields helper function 📝 (GenericNode/index.tsx): Add edges variable to store edges state using useFlowStore hook 📝 (GenericNode/index.tsx): Modify onSuccess callback to process and update node data with advanced fields using processNodeAdvancedFields helper function * ✨ (process-node-advanced-fields.ts): add a new function to process advanced fields of a node based on edges in a graph for better customization and control. * ♻️ (GenericNode/index.tsx): Remove unused import of cloneDeep from lodash to clean up the code and improve maintainability. * 🔧 (process-node-advanced-fields.ts): rename variable edgesWithNode to relevantEdges for clarity and consistency 🐛 (process-node-advanced-fields.ts): fix condition to check relevantEdges length instead of edgesWithNode length for correct logic --------- Co-authored-by: anovazzi1 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to enhance the functionality of the
GenericNode
component in the frontend. The most notable changes include the addition of a new helper function to process node fields, updates to the code validation logic, and the inclusion of new imports to support these functionalities.Enhancements to
GenericNode
functionality:New Helper Function:
processNodeAdvancedFields
insrc/frontend/src/CustomNodes/helpers/process-node-advanced-fields.ts
to handle advanced field processing for nodes. This function filters edges and updates node templates accordingly.Code Validation Updates:
onSuccess
callback inGenericNode
to useprocessNodeAdvancedFields
for processing node fields before updating the node code.Additional Imports:
GenericNode
:cloneDeep
fromlodash
to deep clone objects.processNodeAdvancedFields
from the new helper file.edges
state fromuseFlowStore
to access current edges in the flow.