-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: resolve component update notification state persistence after dismissal #6032
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
… to manage dismissAll state 🔧 (GenericNode): Import and use utility store in GenericNode component to access dismissAll state 🔧 (use-reset-dismiss-update-all): Create hook to reset dismissAll state in utility store 🔧 (UpdateAllComponents): Import and use utility store in UpdateAllComponents component to access dismissAll state 🔧 (header): Import useResetDismissUpdateAll hook in header component to reset dismissAll state 🔧 (list): Import useResetDismissUpdateAll hook in list component to reset dismissAll state 🔧 (utilityStore): Add dismissAll state and setDismissAll method to utility store 🔧 (utility/index): Add dismissAll state and setDismissAll method to UtilityStoreType
… to handle dismissing all notifications ✨ (GenericNode/index.tsx): add dismissAll prop to GenericNode component to handle dismissing all notifications ✨ (UpdateAllComponents/index.tsx): add e.stopPropagation() to onClick event handler to prevent event bubbling 🔧 (header/index.tsx): remove unused import useResetDismissUpdateAll from header component
…onent when it is outdated and not user-edited 🔧 (GenericNode/index.tsx): Update handleUpdateComponent function to handleUpdateCode for consistency 🔧 (appHeaderComponent/index.tsx): Add useResetDismissUpdateAll hook to reset dismiss update all functionality 🔧 (use-reset-dismiss-update-all.ts): Update useResetDismissUpdateAll hook to only reset dismiss update all in flow location path 🔧 (list/index.tsx): Remove useResetDismissUpdateAll hook from ListComponent as it is no longer needed 🔧 (index.css): Remove extra whitespace in CSS file
… dismissAll variable in className calculation
anovazzi1
approved these changes
Feb 4, 2025
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
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
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 a new feature to handle the dismissal of update notifications for components. The changes span across multiple files to integrate this feature into the existing codebase.
New Feature: Dismiss All Updates
src/frontend/src/CustomNodes/GenericNode/components/NodeStatus/index.tsx
: AddeduseUtilityStore
import and integrateddismissAll
state to conditionally render update notifications and handle component updates. [1] [2] [3] [4] [5] [6]src/frontend/src/CustomNodes/GenericNode/index.tsx
: AddeduseUtilityStore
import and integrateddismissAll
state to manage the visibility of update notifications. [1] [2] [3] [4] [5] [6]Utility Store Enhancements
src/frontend/src/stores/utilityStore.ts
: AddeddismissAll
state andsetDismissAll
method to manage the dismissal state.src/frontend/src/types/zustand/utility/index.ts
: UpdatedUtilityStoreType
to includedismissAll
andsetDismissAll
properties.Additional Integrations
src/frontend/src/components/core/appHeaderComponent/index.tsx
: AddeduseResetDismissUpdateAll
hook to reset thedismissAll
state when navigating to the flow page. [1] [2]src/frontend/src/hooks/use-reset-dismiss-update-all.ts
: Created a new hook to reset thedismissAll
state based on the current location.src/frontend/src/pages/FlowPage/components/UpdateAllComponents/index.tsx
: IntegratedsetDismissAll
to handle the dismissal of all update notifications. [1] [2] [3]