NXT-4467: Close version panel when entering shared component#121
Open
NXT-4467: Close version panel when entering shared component#121
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements functionality to automatically close the version history panel when a user enters a shared (linked) component. This improves the user experience by ensuring the version panel doesn't remain open in contexts where it's not relevant.
Changes:
- Added logic to detect when entering a linked component and automatically deactivate version mode
- Imported
WorkflowInfoenum anduseWorkflowVersionsStoreto support the new functionality
Comments suppressed due to low confidence (1)
org.knime.ui.js/src/store/application/lifecycle.ts:607
- The new logic to close the version panel when entering a shared component lacks test coverage. Consider adding a test case that verifies the version panel is deactivated when entering a linked component, similar to the existing tests in lifecycle.test.ts that verify afterSetActivateWorkflow is called.
afterSetActivateWorkflow() {
const activeWorkflow = useWorkflowStore().activeWorkflow;
if (
activeWorkflow?.info.linked &&
activeWorkflow.info.containerType ===
WorkflowInfo.ContainerTypeEnum.Component
) {
const versionsStore = useWorkflowVersionsStore();
if (versionsStore.activeProjectVersionsModeStatus !== "inactive") {
void versionsStore.deactivateVersionsMode();
}
}
useComponentInteractionsStore().checkForLinkedComponentUpdates({
auto: true,
});
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9ce804b to
44458e6
Compare
|
This file contains hidden or 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
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.



NXT-4467 (Close version history panel when entering a shared component)