[WEB-1812] fix : Avoid loader when parent is added in issue detail / peek overview#5257
[WEB-1812] fix : Avoid loader when parent is added in issue detail / peek overview#5257SatishGandham merged 3 commits intopreviewfrom
Conversation
… services for modules and cycles
…ifferent services for modules and cycles" This reverts commit 957e981.
WalkthroughThe changes enhance the functionality and flexibility of issue management within the application. Key updates include modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant IssueParentSelect
participant IssueOperations
participant IssueSubIssuesStore
User->>IssueParentSelect: Select Parent Issue
IssueParentSelect->>IssueOperations: fetch(issueId, false)
IssueOperations-->>IssueParentSelect: Return Issue Data
IssueParentSelect->>User: Display Parent Issue
User->>IssueSubIssuesStore: Fetch Sub-Issues
IssueSubIssuesStore->>IssueOperations: fetch(parentIssueId, true)
IssueOperations-->>IssueSubIssuesStore: Return Sub-Issues
IssueSubIssuesStore->>IssueSubIssuesStore: Update sub_issues_count
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
web/core/components/issues/issue-detail/root.tsx (1)
Line range hint
62-65:
Integrate theloaderparameter into thefetchmethod implementation.The
fetchmethod in theissueOperationsobject does not currently utilize theloaderparameter. Consider integrating it to ensure the parameter is functional.- fetch: async (workspaceSlug: string, projectId: string, issueId: string) => { + fetch: async (workspaceSlug: string, projectId: string, issueId: string, loader?: boolean) => { try { + if (loader) { + // Show loader + } await fetchIssue(workspaceSlug, projectId, issueId); + if (loader) { + // Hide loader + } } catch (error) { console.error("Error fetching the parent issue"); + if (loader) { + // Hide loader + } } }
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- web/core/components/issues/issue-detail/parent-select.tsx (1 hunks)
- web/core/components/issues/issue-detail/root.tsx (1 hunks)
- web/core/components/issues/peek-overview/root.tsx (3 hunks)
- web/core/store/issue/issue-details/sub_issues.store.ts (1 hunks)
Additional comments not posted (6)
web/core/components/issues/issue-detail/parent-select.tsx (1)
51-51: Verify the impact of the additional parameter in the fetch method.The additional boolean parameter set to
falsein theissueOperations.fetchmethod aims to control the loader state explicitly. Ensure that this change does not introduce any unintended side effects.web/core/components/issues/peek-overview/root.tsx (3)
9-9: Verify the correctness of the import statement.The import statement has been updated to include
TIssueOperations. Ensure that this import is correctly implemented and used throughout the file.Verification successful
Verify the correctness of the import statement.
The import statement has been updated to include
TIssueOperations. Ensure that this import is correctly implemented and used throughout the file.
The import statement is correctly implemented and used.
The
TIssueOperationstype is imported and utilized within the fileweb/core/components/issues/peek-overview/root.tsx.
web/core/components/issues/peek-overview/root.tsx:TIssueOperationsis used in auseMemohook.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the import statement. # Test: Search for the usage of `TIssueOperations` in the file to ensure it is correctly implemented. rg --type typescript -A 5 $'TIssueOperations'Length of output: 79
Script:
#!/bin/bash # Description: Verify the correctness of the import statement. # Test: Search for the usage of `TIssueOperations` in the specified file to ensure it is correctly implemented. rg 'TIssueOperations' web/core/components/issues/peek-overview/root.tsxLength of output: 191
46-46: Verify the impact of the removal ofTIssuePeekOperations.The
TIssuePeekOperationstype has been removed entirely. Ensure that this removal does not introduce any issues or breaking changes.Verification successful
The removal of
TIssuePeekOperationsdoes not introduce any issues or breaking changes.The search confirmed that
TIssuePeekOperationsis no longer used in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the removal of `TIssuePeekOperations`. # Test: Search for the usage of `TIssuePeekOperations` in the codebase to ensure it is no longer used. rg --type typescript -A 5 $'TIssuePeekOperations'Length of output: 83
Script:
#!/bin/bash # Description: Verify the impact of the removal of `TIssuePeekOperations`. # Test: Search for the usage of `TIssuePeekOperations` in the codebase to ensure it is no longer used. rg --type ts -A 5 'TIssuePeekOperations'Length of output: 40
48-50: Verify the impact of the additional parameter in the fetch method.The
fetchmethod within theissueOperationsobject has been modified to include an additional parameter,loader, defaulting totrue. Ensure that this change does not introduce any unintended side effects.web/core/store/issue/issue-details/sub_issues.store.ts (1)
131-135: Verify the correctness of the new conditional block.The new conditional block updates the
sub_issues_countof a parent issue whensubIssuesis present. Ensure that this change accurately reflects the count of sub-issues and does not introduce any unintended side effects.Verification successful
The new conditional block is correctly implemented.
The
sub_issues_countis accurately updated in various parts of the codebase, and theupdateIssuemethod is consistently used. This ensures that the count of sub-issues is correctly reflected in the parent issue's details without introducing any unintended side effects.
sub_issues_countis used in multiple files, confirming its integration.updateIssuemethod is correctly implemented and widely used.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the new conditional block. # Test: Search for the usage of `sub_issues_count` in the codebase to ensure it is correctly updated. rg --type typescript -A 5 $'sub_issues_count'Length of output: 79
Script:
#!/bin/bash # Description: Verify the correctness of the new conditional block. # Test: Search for the usage of `sub_issues_count` in the codebase to ensure it is correctly updated. rg --type ts -A 5 'sub_issues_count' # Test: Search for the implementation and usage of `updateIssue` to ensure it is correctly called. rg --type ts -A 5 'updateIssue'Length of output: 144054
web/core/components/issues/issue-detail/root.tsx (1)
27-27: The addition of the optionalloaderparameter is correct.The change to the
fetchmethod in theTIssueOperationstype definition looks good and enhances the method's functionality.
This PR fixes the loader which appears when parent issue is added to the Issue
Screen.Recording.2024-07-29.at.7.02.28.PM.mov
Summary by CodeRabbit
New Features
Bug Fixes