-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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: update "update components" design, implemented update all components functionality, refactor get types #4739
Conversation
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.
found a bug related to the update all, it does not disappear after update a component directly on it, instead of update using the update all option:
before fix this bug I would suggest to separate this pr in two different prs, one for the new alert design and other for the types refactor and update all in the bottom. IMO this pr is too big (and risk) to be addressed for the next release.
the new alert style is really awesome, great work.
Modularized PR into three |
This pull request includes multiple changes to the
src/frontend/src/CustomNodes/GenericNode
components and related files to improve the handling of outdated nodes and streamline the codebase. The most important changes include modifying theNodeStatus
andGenericNode
components, adding a new hook for updating all nodes, and updating the flow and type management logic.Improvements to
NodeStatus
andGenericNode
components:src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx
: Removed unused propertieshandleUpdateCode
andloadingUpdate
, and added logic to update the class based onisOutdated
andisUserEdited
properties. [1] [2] [3] [4] [5]src/frontend/src/CustomNodes/GenericNode/index.tsx
: Added a warning banner for outdated nodes and removed the old update button logic fromNodeStatus
. [1] [2] [3] [4] [5]New hook for updating all nodes:
src/frontend/src/CustomNodes/hooks/use-update-all-nodes.tsx
: Introduced a new hookuseUpdateAllNodes
to handle updating multiple nodes at once, leveragingcloneDeep
fromlodash
anduseCallback
for performance.Flow and type management updates:
src/frontend/src/controllers/API/queries/flows/use-get-types.ts
: Added a new query functionuseGetTypes
to fetch and manage component types, replacing the oldgetTypes
method.src/frontend/src/pages/AppInitPage/index.tsx
: Updated the initialization logic to fetch types before other data, ensuring types are loaded before proceeding. [1] [2]Additional changes:
src/frontend/src/components/ui/button.tsx
: Added a newwarning
variant to the button component for consistent styling of warning messages.src/frontend/src/components/appHeaderComponent/components/FlowMenu/index.tsx
: Replaced the oldgetTypes
method with the newuseGetTypes
query.