-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[WEB-2028] fix: added states to module progress bar #5273
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_DETAILS
is correctly used throughout the codebase.Verification successful
The new constant
MODULE_STATE_GROUPS_DETAILS
is correctly used in the codebase.The constant is imported and utilized in the
web/core/components/modules/module-card-item.tsx
file.
web/core/components/modules/module-card-item.tsx
: The constant is used to map overMODULE_STATE_GROUPS_DETAILS
to 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
ModuleCardItem
component.Also applies to: 16-16
219-219
: LGTM!The usage of the
LinearProgressIndicator
component 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
progressIndicatorData
correctly maps the module metrics.Verification successful
The new logic for
progressIndicatorData
correctly maps the module metrics.The structure of
MODULE_STATE_GROUPS_DETAILS
andCYCLE_STATE_GROUPS_DETAILS
arrays is appropriate and aligns with the mapping logic in the code.
web/core/constants/module.ts
web/core/constants/cycle.ts
Scripts 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
@@ -97,3 +97,26 @@ export const MODULE_ORDER_BY_OPTIONS: { key: TModuleOrderByOptions; label: strin | |||
label: "Manual", | |||
}, | |||
]; | |||
|
|||
export const MODULE_STATE_GROUPS_DETAILS = [ |
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.
This is same for cycles as well. We should use that.
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.
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_DETAILS
is 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_DETAILS
is not used elsewhere in the codebase.Verification successful
Verification complete:
CYCLE_STATE_GROUPS_DETAILS
is not used elsewhere in the codebase.
- The constant
CYCLE_STATE_GROUPS_DETAILS
was 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_DETAILS
fromcommon.ts
.
24-24
: LGTM!The
progressIndicatorData
array correctly usesPROGRESS_STATE_GROUPS_DETAILS
for 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_DETAILS
constant for better categorization of module states.ActiveCycleProgress
component to reflect new progress states.Bug Fixes