[WEB-2028] fix: added states to module progress bar#5273
[WEB-2028] fix: added states to module progress bar#5273SatishGandham merged 2 commits intopreviewfrom
Conversation
WalkthroughThe changes enhance the Changes
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/core/components/modules/module-card-item.tsx (4 hunks)
- web/core/constants/module.ts (1 hunks)
Additional comments not posted (4)
web/core/constants/module.ts (1)
101-122: LGTM! Verify the usage of the new constant in the codebase.The code changes are approved.
However, ensure that the new constant
MODULE_STATE_GROUPS_DETAILSis correctly used throughout the codebase.Verification successful
The new constant
MODULE_STATE_GROUPS_DETAILSis correctly used in the codebase.The constant is imported and utilized in the
web/core/components/modules/module-card-item.tsxfile.
web/core/components/modules/module-card-item.tsx: The constant is used to map overMODULE_STATE_GROUPS_DETAILSto createprogressIndicatorData.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new constant `MODULE_STATE_GROUPS_DETAILS`. # Test: Search for the constant usage. Expect: Correct usage throughout the codebase. rg --type javascript --type typescript $'MODULE_STATE_GROUPS_DETAILS'Length of output: 103
Script:
#!/bin/bash # Description: Verify the usage of the new constant `MODULE_STATE_GROUPS_DETAILS`. # Test: Search for the constant usage. Expect: Correct usage throughout the codebase. rg --type js --type ts --type tsx 'MODULE_STATE_GROUPS_DETAILS'Length of output: 91
Script:
#!/bin/bash # Description: Verify the usage of the new constant `MODULE_STATE_GROUPS_DETAILS`. # Test: Search for the constant usage. Expect: Correct usage throughout the codebase. rg --type js --type ts 'MODULE_STATE_GROUPS_DETAILS'Length of output: 390
web/core/components/modules/module-card-item.tsx (3)
9-10: LGTM!The new imports are necessary for the updated functionality of the
ModuleCardItemcomponent.Also applies to: 16-16
219-219: LGTM!The usage of the
LinearProgressIndicatorcomponent enhances the visual representation of module progress.
168-173: LGTM! Verify the correctness of the new logic.The code changes are approved.
However, ensure that the new logic for
progressIndicatorDatacorrectly maps the module metrics.Verification successful
The new logic for
progressIndicatorDatacorrectly maps the module metrics.The structure of
MODULE_STATE_GROUPS_DETAILSandCYCLE_STATE_GROUPS_DETAILSarrays is appropriate and aligns with the mapping logic in the code.
web/core/constants/module.tsweb/core/constants/cycle.tsScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the new logic for `progressIndicatorData`. # Test: Search for the `progressIndicatorData` usage. Expect: Correct mapping of module metrics. rg --type javascript --type typescript $'progressIndicatorData'Length of output: 97
Script:
#!/bin/bash # Description: Verify the correctness of the new logic for `progressIndicatorData`. # Test: Search for the `progressIndicatorData` usage. Expect: Correct mapping of module metrics. rg --type js --type ts 'progressIndicatorData'Length of output: 601
Script:
#!/bin/bash # Description: Verify the definitions of `MODULE_STATE_GROUPS_DETAILS` and `CYCLE_STATE_GROUPS_DETAILS`. # Test: Search for the definitions of `MODULE_STATE_GROUPS_DETAILS` and `CYCLE_STATE_GROUPS_DETAILS`. rg --type js --type ts 'MODULE_STATE_GROUPS_DETAILS' rg --type js --type ts 'CYCLE_STATE_GROUPS_DETAILS'Length of output: 905
Script:
#!/bin/bash # Description: Display the contents of `MODULE_STATE_GROUPS_DETAILS` and `CYCLE_STATE_GROUPS_DETAILS`. # Display the contents of `MODULE_STATE_GROUPS_DETAILS`. rg --type js --type ts --context 10 'export const MODULE_STATE_GROUPS_DETAILS' web/core/constants/module.ts # Display the contents of `CYCLE_STATE_GROUPS_DETAILS`. rg --type js --type ts --context 10 'export const CYCLE_STATE_GROUPS_DETAILS' web/core/constants/cycle.tsLength of output: 924
web/core/constants/module.ts
Outdated
| }, | ||
| ]; | ||
|
|
||
| export const MODULE_STATE_GROUPS_DETAILS = [ |
There was a problem hiding this comment.
This is same for cycles as well. We should use that.
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- web/core/components/cycles/active-cycle/progress.tsx (3 hunks)
- web/core/components/modules/module-card-item.tsx (4 hunks)
- web/core/constants/common.ts (1 hunks)
- web/core/constants/cycle.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/core/components/modules/module-card-item.tsx
Additional comments not posted (5)
web/core/constants/common.ts (1)
9-30: LGTM!The new constant
PROGRESS_STATE_GROUPS_DETAILSis well-defined and follows a consistent structure.web/core/constants/cycle.ts (1)
Line range hint
1-1:
Verify the removal ofCYCLE_STATE_GROUPS_DETAILS.Ensure that the constant
CYCLE_STATE_GROUPS_DETAILSis not used elsewhere in the codebase.Verification successful
Verification complete:
CYCLE_STATE_GROUPS_DETAILSis not used elsewhere in the codebase.
- The constant
CYCLE_STATE_GROUPS_DETAILSwas not found in any JavaScript or TypeScript files in the repository.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify if `CYCLE_STATE_GROUPS_DETAILS` is used elsewhere in the codebase. # Test: Search for the constant usage. Expect: No occurrences of the constant. rg --type js --type ts --type tsx -w 'CYCLE_STATE_GROUPS_DETAILS'Length of output: 93
Script:
#!/bin/bash # Description: Verify if `CYCLE_STATE_GROUPS_DETAILS` is used elsewhere in the codebase. # Test: Search for the constant usage. Expect: No occurrences of the constant. rg --type js --type jsx --type ts -w 'CYCLE_STATE_GROUPS_DETAILS'Length of output: 93
Script:
#!/bin/bash # Description: Verify if `CYCLE_STATE_GROUPS_DETAILS` is used elsewhere in the codebase. # Test: Search for the constant usage. Expect: No occurrences of the constant. rg --type js --type ts -w 'CYCLE_STATE_GROUPS_DETAILS'Length of output: 54
web/core/components/cycles/active-cycle/progress.tsx (3)
12-12: LGTM!The import statement correctly updates to use
PROGRESS_STATE_GROUPS_DETAILSfromcommon.ts.
24-24: LGTM!The
progressIndicatorDataarray correctly usesPROGRESS_STATE_GROUPS_DETAILSfor mapping state groups.
70-70: LGTM!The background color reference is correctly updated to use
PROGRESS_STATE_GROUPS_DETAILS.
Summary
In module's card layout, the progress bar only reflected the completed state. Add unstarted, backlog and started state as well.
[WEB-2028]
Summary by CodeRabbit
New Features
LinearProgressIndicator.MODULE_STATE_GROUPS_DETAILSconstant for better categorization of module states.ActiveCycleProgresscomponent to reflect new progress states.Bug Fixes