-
Notifications
You must be signed in to change notification settings - Fork 167
chore: Replace "COMPLETED" with "DONE" in filter dropdown and remove feature flag #1342
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
base: develop
Are you sure you want to change the base?
chore: Replace "COMPLETED" with "DONE" in filter dropdown and remove feature flag #1342
Conversation
…aishalimaheshwari2000/website-status into chore/remove-feature-flag-DONE
…aishalimaheshwari2000/website-status into chore/remove-feature-flag-DONE
|
@vaishalimaheshwari2000 is attempting to deploy a commit to the RDS-Team Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughThis pull request updates task status terminology throughout the test suites and source components. The tests now expect the status value “Done” instead of “Completed” and have removed conditions related to the development flag. In the production code, conditional logic and status filtering have been streamlined by eliminating unnecessary dev mode checks and updating the status handling functions accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant TDS as TaskDetailsSection
participant TD as TaskDropDown
participant TSEM as TaskStatusEditMode
U->>TDS: Initiate render of task details
alt Editing Mode Active
TDS->>TD: Render task dropdown
TD->>TSEM: Beautify status ("Done")
TSEM-->>TD: Return formatted status
TD-->>TDS: Provide updated dropdown
else Non-Editing Mode
TDS->>TSEM: Beautify status ("Done")
TSEM-->>TDS: Return formatted status
end
TDS-->>U: Display task details with updated status
Possibly related PRs
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 using PR comments)
Other keywords and placeholders
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: 3
🔭 Outside diff range comments (1)
src/components/tasks/TaskSearch/FilterDropdown.tsx (1)
28-29: 🧹 Nitpick (assertive)Consider removing unused isDevMode variable
The
isDevModevariable is still defined but no longer used in the filtering logic after the simplification. Consider removing it to improve code cleanliness.const router = useRouter(); - const isDevMode = router.query.dev === 'true';
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (10)
__tests__/Unit/Components/Tasks/Card.test.tsx(1 hunks)__tests__/Unit/Components/Tasks/FilterDropdown.test.tsx(1 hunks)__tests__/Unit/Components/Tasks/TaskDetails.test.tsx(2 hunks)__tests__/Unit/Components/Tasks/TaskDropDown.test.tsx(1 hunks)__tests__/Unit/Components/Tasks/TaskStatusEditMode.test.tsx(2 hunks)src/components/taskDetails/TaskDetailsSection.tsx(1 hunks)src/components/tasks/TaskDropDown.tsx(2 hunks)src/components/tasks/TaskSearch/FilterDropdown.tsx(1 hunks)src/components/tasks/card/TaskStatusEditMode.tsx(2 hunks)src/components/tasks/card/index.tsx(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
__tests__/Unit/Components/Tasks/Card.test.tsx (1)
src/constants/constants.ts (1)
DONE(5-5)
src/components/tasks/card/TaskStatusEditMode.tsx (1)
src/constants/task-status.ts (1)
BACKEND_TASK_STATUS(39-56)
__tests__/Unit/Components/Tasks/TaskDropDown.test.tsx (1)
src/constants/task-status.ts (1)
BACKEND_TASK_STATUS(39-56)
src/components/tasks/TaskDropDown.tsx (2)
src/constants/task-status.ts (1)
BACKEND_TASK_STATUS(39-56)src/components/tasks/card/TaskStatusEditMode.tsx (1)
beautifyStatus(89-89)
🔇 Additional comments (14)
__tests__/Unit/Components/Tasks/TaskDropDown.test.tsx (1)
125-132: Approved: Status terminology updateThe change from
BACKEND_TASK_STATUS.COMPLETEDtoBACKEND_TASK_STATUS.DONEand the removal of theisDevModeprop aligns with standardizing on the "Done" status, removing the feature flag dependency.__tests__/Unit/Components/Tasks/TaskDetails.test.tsx (2)
225-230: Approved: Removed dev flag dependencyThe test description and implementation have been updated to reflect that "Done" status is now used consistently without requiring the dev flag condition.
249-254: Approved: Removed dev flag parameterConsistent with the earlier change, the dev flag parameter has been removed from the
renderWithRoutercall, correctly reflecting the standardized status handling.src/components/taskDetails/TaskDetailsSection.tsx (1)
49-49: Approved: Simplified status beautificationThe
isDevModeparameter has been removed from thebeautifyStatusfunction call, correctly implementing the standardized status handling approach.src/components/tasks/TaskSearch/FilterDropdown.tsx (1)
51-52: Filter logic simplified to exclude 'COMPLETED' unconditionallyThe filter condition has been simplified to always exclude 'COMPLETED' tasks, removing the conditional logic based on the development mode. This aligns with standardizing on 'DONE' status across all environments.
__tests__/Unit/Components/Tasks/Card.test.tsx (2)
560-560: Test updated to expect 'Done' instead of 'Completed'The test expectation has been updated to reflect the standardized task status terminology, changing from 'Completed' to 'Done'.
566-568: Test case updated to use DONE status constantThe test case has been updated to reflect the standardized status terminology, changing from COMPLETED to DONE constant. This ensures consistency with the new status handling throughout the application.
src/components/tasks/card/TaskStatusEditMode.tsx (2)
12-12: Added import for BACKEND_TASK_STATUS constantThe import for BACKEND_TASK_STATUS provides better type safety and maintainability for status comparisons.
21-25: Simplified beautifyStatus function to always convert COMPLETED to DONEThe function has been simplified to always convert 'COMPLETED' status to 'DONE', removing the conditional logic based on development mode. This aligns with standardizing status terminology across environments.
Consider adding a comment to clarify this intentional standardization for future developers:
const beautifyStatus = (status: string) => { let beautifiedStatus = status; + // Always convert COMPLETED to DONE as part of standardizing status terminology if (beautifiedStatus === BACKEND_TASK_STATUS.COMPLETED) { beautifiedStatus = 'DONE'; }src/components/tasks/card/index.tsx (1)
586-586: Updated beautifyStatus call to match new function signatureThe call to beautifyStatus has been updated to remove the isDevMode parameter, aligning with the function's new signature and the standardization of status terminology.
__tests__/Unit/Components/Tasks/TaskStatusEditMode.test.tsx (2)
113-117: Updated filtering logic to match new terminology standardsThe filtering logic now excludes 'COMPLETED' instead of 'DONE', which aligns with the standardization on "Done" terminology throughout the application. This change is consistent with removing the feature flag.
161-163: Simplified beautifyStatus test for better clarityThe test now directly verifies that BACKEND_TASK_STATUS.COMPLETED is converted to "Done" without relying on a development mode parameter. This simplification helps maintain clearer test expectations while confirming the proper status name conversion.
src/components/tasks/TaskDropDown.tsx (2)
34-35: Simplified filtering logic for task statusesThe filtering logic has been improved to consistently exclude 'COMPLETED' status regardless of development mode, which streamlines the code and aligns with standardizing on "Done" terminology.
123-123: Removed isDevMode parameter from beautifyStatus callThe removal of the isDevMode parameter is consistent with the other changes that standardize on "Done" terminology without relying on development mode flags.
573764e to
3f07b31
Compare
|
Hi @vaishalimaheshwari2000, can you please add a screen recording and provide a better description for your changes? |
Yes , I have updated the description as well as and attached the screen recording |
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.
Hello @vaishalimaheshwari2000 can we please write the pr title better , also why you have checked under feature flag checkbox?
I'm sorry @AnujChhikara for checked under the feature flag . Yeah , Sure I'll try to write it best |
| (isDevMode && tab === 'COMPLETED') || | ||
| (!isDevMode && tab === 'DONE') | ||
| ) | ||
| tab !== 'COMPLETED' |
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.
We don't even need this check, we have a export const depreciatedTaskStatus = ['AVAILABLE']; at@/interfaces/task.type, add this status value in that array, it would be skipped anyway.
Date: @11/04/2025
Developer Name: Vaishali
Issue Ticket Number
DONEstatus #1318Description
Update the filter dropdown by replacing "COMPLETED" with "DONE", and remove the associated feature flag to make the change available unconditionally.
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Screen Record
Screen Recording
tasks-status-real-dev-squad-google-chrome-2025-04-12-17-27-13_QfrfgVEy.mp4
Additional Notes