Skip to content
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

Dev to Main Sync #1247

Merged
merged 27 commits into from
Sep 7, 2024
Merged

Dev to Main Sync #1247

merged 27 commits into from
Sep 7, 2024

Conversation

Achintya-Chatterjee
Copy link
Member

@Achintya-Chatterjee Achintya-Chatterjee commented Sep 3, 2024

Date: 3rd September 2024

Developer Name: @Achintya-Chatterjee


Issue Ticket Number

PR's Going in These Sync

Description

  • @Achintya-Chatterjee Refactors the TaskDetails component by breaking it down into smaller, modular subcomponents.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

Test Coverage

Screenshot 1

Additional Notes

Achintya-Chatterjee and others added 22 commits July 31, 2024 14:21
- Updated TaskDetails component to include assignee input with a data-testid of 'assignee-input'.
- Modified the test for rendering the assignee dropdown to correctly identify the assignee input field using the updated test ID.
- Ensured the test checks for the presence of the assignee input field in edit mode.
… component

- Added back the getExtensionRequestLink function to handle the extension request URL generation.
- Updated the assignee handling in the render method to include suggestions for editing.
- Maintained the isEditing and isUserAuthorized checks for showing the assignee input field.
- Ensured the task extension request link is correctly generated and displayed in the Dates section.
…etails

- Fixed issue with duplicate input fields appearing in the Assignee section.
- Ensured the suggestion box appears correctly below the Assignee input field.
- Applied consistent styling to the Assignee input field and suggestion box.
- Linked the label to the input field using the  attribute.
- Refactored the Assignee input and suggestion box to use the Suggestions component properly.
- Updated suggestion box styles to maintain a consistent width relative to the input field
- Ensured suggestion box width is set to 100% of its parent container
- Adjusted styles for better visual consistency
* fix: assign text box alignment it would be be appearing where the name is

* feat: Update TaskDetails component and fix test for assignee input

- Updated TaskDetails component to include assignee input with a data-testid of 'assignee-input'.
- Modified the test for rendering the assignee dropdown to correctly identify the assignee input field using the updated test ID.
- Ensured the test checks for the presence of the assignee input field in edit mode.

* refactor: make the superuser to false on test files

* refactor: Reintroduce getExtensionRequestLink function to TaskDetails component

- Added back the getExtensionRequestLink function to handle the extension request URL generation.
- Updated the assignee handling in the render method to include suggestions for editing.
- Maintained the isEditing and isUserAuthorized checks for showing the assignee input field.
- Ensured the task extension request link is correctly generated and displayed in the Dates section.

* fix: Resolve duplicate input field and suggestion box issues in TaskDetails

- Fixed issue with duplicate input fields appearing in the Assignee section.
- Ensured the suggestion box appears correctly below the Assignee input field.
- Applied consistent styling to the Assignee input field and suggestion box.
- Linked the label to the input field using the  attribute.
- Refactored the Assignee input and suggestion box to use the Suggestions component properly.

* fix: classname to be more generic

* refactor: test cases to use those old values

* fix: Ensure consistent width for suggestion box and refactor styles

- Updated suggestion box styles to maintain a consistent width relative to the input field
- Ensured suggestion box width is set to 100% of its parent container
- Adjusted styles for better visual consistency
Co-authored-by: Shubham Sharma <shbh541@gmail.com>
…omponent

Refactored TaskDetails component to conditionally render either the TaskDropDown for editing or the Details component for viewing the status, ensuring the Status field is only displayed once depending on the editing state.
…omponent

Refactored TaskDetails component to conditionally render either the TaskDropDown for editing or the Details component for viewing the status, ensuring the Status field is only displayed once depending on the editing state.
Fix: Prevent Duplicate `Status:` Field in task details Page
* Corrected loading issue and extra space in standup submit

* Fixed early return

---------

Co-authored-by: Shubham Sharma <shbh541@gmail.com>
* removal of feature flag

* fix TaskContent test

* remove TaskSearch deprecated component

* fix test for removing TaskSearch deprecated component

* remove TabSection component

* rename TaskSearchDev to TaskSearch

* rename TaskSearchDev to TaskSearch in tests

* resolve merge conflict
…formance (#1243)

* refactor(TaskDetails): Modularize and optimize TaskDetails component for improved maintainability and performance

- Broke down TaskDetails component into smaller, focused subcomponents: TaskHeader, TaskDescription, TaskDetailsSection, TaskParticipants, TaskDates, TaskDependencies, and TaskProgress.
- Maintained consistent styling using existing CSS classes from task-details.module.scss.
- Ensured all functionalities, including editing, API integration, and state management, remain intact.
- Added performance optimizations using React best practices, such as useCallback and useMemo where applicable.
- Handled loading and error states, as well as edge cases like empty data gracefully.

* fix(TaskDetails): Correct data type issues and ensure proper conditional rendering

- Resolved type issues, ensuring  is correctly handled as a number.
- Fixed conditional rendering to prevent the edit button from appearing for unauthorized users.
- Ensured consistent date formatting using  utility.
- Improved type safety across the TaskDetails subcomponents to prevent future issues.
- Maintained all functionality from previous refactor, including state management and API integration.

* fix(task-details): Correct the position of status and link fields

- Adjusted the position of the 'Status' and 'Link' fields within the TaskDetailsSection component to ensure they are displayed correctly.
- Ensured that the 'Status' dropdown is only visible in edit mode and does not appear twice.
- Verified that the layout matches the design specifications when switching between view and edit modes.

* chore: remove unnecessary comments from the code

* fix: restore original styling for TaskDates and TaskParticipants components

- Reverted changes in the component structure that affected the layout and styling.
- Ensured the CSS classes are applied correctly and match the pre-refactor styling.
- Adjusted the JSX structure to maintain the original visual layout.

* chore: remove react memo from every component as it was unnecessary

* chore: remove react memo from every component as it was unnecessary

* refactor: TaskDates component to conditionally render Details based on extension request status

* refactor: switch to named exports for all of the sub-components

* chore: remove any from TaskDetails component and replace them with appropiates type

* chore: removed default export from every  sub-component as we are already using named export

* refactor(TaskDetails): remove unnecessary TaskProgress and TaskDependencies components and directly use underlying components

* refactor: refactor code to simplyfy code reading used is else instead of ternary operator

* chore: remove extra Taskcontainer wrap that was impacting styling of update progress

---------

Co-authored-by: Ashif Khan <54736284+ashifkhn@users.noreply.github.com>
* refactor(TaskDetails): Modularize and optimize TaskDetails component for improved maintainability and performance

- Broke down TaskDetails component into smaller, focused subcomponents: TaskHeader, TaskDescription, TaskDetailsSection, TaskParticipants, TaskDates, TaskDependencies, and TaskProgress.
- Maintained consistent styling using existing CSS classes from task-details.module.scss.
- Ensured all functionalities, including editing, API integration, and state management, remain intact.
- Added performance optimizations using React best practices, such as useCallback and useMemo where applicable.
- Handled loading and error states, as well as edge cases like empty data gracefully.

* fix(TaskDetails): Correct data type issues and ensure proper conditional rendering

- Resolved type issues, ensuring  is correctly handled as a number.
- Fixed conditional rendering to prevent the edit button from appearing for unauthorized users.
- Ensured consistent date formatting using  utility.
- Improved type safety across the TaskDetails subcomponents to prevent future issues.
- Maintained all functionality from previous refactor, including state management and API integration.

* fix(task-details): Correct the position of status and link fields

- Adjusted the position of the 'Status' and 'Link' fields within the TaskDetailsSection component to ensure they are displayed correctly.
- Ensured that the 'Status' dropdown is only visible in edit mode and does not appear twice.
- Verified that the layout matches the design specifications when switching between view and edit modes.

* chore: remove unnecessary comments from the code

* fix: restore original styling for TaskDates and TaskParticipants components

- Reverted changes in the component structure that affected the layout and styling.
- Ensured the CSS classes are applied correctly and match the pre-refactor styling.
- Adjusted the JSX structure to maintain the original visual layout.

* test: Add unit tests for TaskHeader component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskDescription component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskProgress component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskParticipants component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskDates component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskDetailsSection component of refactored TaskDetails subcomponents

* test: Add unit tests for TaskDependencies component of refactored TaskDetails subcomponents

* chore: remove react memo from every component as it was unnecessary

* chore: remove react memo from every component as it was unnecessary

* refactor: TaskDates component to conditionally render Details based on extension request status

* refactor: switch to named exports for all of the sub-components

* chore: remove any from TaskDetails component and replace them with appropiates type

* chore

* Delete src/components/taskDetails/TaskProgress.tsx

* Delete src/components/taskDetails/TaskParticipants.tsx

* Delete src/components/taskDetails/TaskHeader.tsx

* Delete src/components/taskDetails/TaskDetailsSection.tsx

* Delete src/components/taskDetails/TaskDescription.tsx

* Delete src/components/taskDetails/TaskDependencies.tsx

* Delete src/components/taskDetails/TaskDates.tsx

* chore: removed default export from every  sub-component as we are already using named export

* chore: removed default export from every  sub-component as we are already using named export

* refactor: refactor test codes to use named export instead of default exports

* refactor(TaskDetails): remove unnecessary TaskProgress and TaskDependencies components and directly use underlying components

* chore: remove test code of taskdependency and taskprogress as i have already used them in underlying taskdetails component

* chore: remove test code of taskdependency and taskprogress as i have already used them in underlying taskdetails component

* refactor: refactor code to simplyfy code reading used is else instead of ternary operator

* chore: remove extra Taskcontainer wrap that was impacting styling of update progress

---------

Co-authored-by: Ashif Khan <54736284+ashifkhn@users.noreply.github.com>
Co-authored-by: Amit Prakash <34869115+iamitprakash@users.noreply.github.com>
Copy link

vercel bot commented Sep 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
status-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 3, 2024 6:24pm

@Achintya-Chatterjee Achintya-Chatterjee requested review from tejaskh3 and joyguptaa and removed request for tejaskh3 September 3, 2024 13:48
* fix: assign text box alignment it would be be appearing where the name is

* feat: Update TaskDetails component and fix test for assignee input

- Updated TaskDetails component to include assignee input with a data-testid of 'assignee-input'.
- Modified the test for rendering the assignee dropdown to correctly identify the assignee input field using the updated test ID.
- Ensured the test checks for the presence of the assignee input field in edit mode.

* refactor: make the superuser to false on test files

* refactor: Reintroduce getExtensionRequestLink function to TaskDetails component

- Added back the getExtensionRequestLink function to handle the extension request URL generation.
- Updated the assignee handling in the render method to include suggestions for editing.
- Maintained the isEditing and isUserAuthorized checks for showing the assignee input field.
- Ensured the task extension request link is correctly generated and displayed in the Dates section.

* fix: Resolve duplicate input field and suggestion box issues in TaskDetails

- Fixed issue with duplicate input fields appearing in the Assignee section.
- Ensured the suggestion box appears correctly below the Assignee input field.
- Applied consistent styling to the Assignee input field and suggestion box.
- Linked the label to the input field using the  attribute.
- Refactored the Assignee input and suggestion box to use the Suggestions component properly.

* fix: classname to be more generic

* refactor: test cases to use those old values

* fix: Ensure consistent width for suggestion box and refactor styles

- Updated suggestion box styles to maintain a consistent width relative to the input field
- Ensured suggestion box width is set to 100% of its parent container
- Adjusted styles for better visual consistency

* Fix: Assignee text box alignment (#1225)

* fix: assign text box alignment it would be be appearing where the name is

* feat: Update TaskDetails component and fix test for assignee input

- Updated TaskDetails component to include assignee input with a data-testid of 'assignee-input'.
- Modified the test for rendering the assignee dropdown to correctly identify the assignee input field using the updated test ID.
- Ensured the test checks for the presence of the assignee input field in edit mode.

* refactor: make the superuser to false on test files

* refactor: Reintroduce getExtensionRequestLink function to TaskDetails component

- Added back the getExtensionRequestLink function to handle the extension request URL generation.
- Updated the assignee handling in the render method to include suggestions for editing.
- Maintained the isEditing and isUserAuthorized checks for showing the assignee input field.
- Ensured the task extension request link is correctly generated and displayed in the Dates section.

* fix: Resolve duplicate input field and suggestion box issues in TaskDetails

- Fixed issue with duplicate input fields appearing in the Assignee section.
- Ensured the suggestion box appears correctly below the Assignee input field.
- Applied consistent styling to the Assignee input field and suggestion box.
- Linked the label to the input field using the  attribute.
- Refactored the Assignee input and suggestion box to use the Suggestions component properly.

* fix: classname to be more generic

* refactor: test cases to use those old values

* fix: Ensure consistent width for suggestion box and refactor styles

- Updated suggestion box styles to maintain a consistent width relative to the input field
- Ensured suggestion box width is set to 100% of its parent container
- Adjusted styles for better visual consistency

* Corrected loading issue and extra space in standup submit (#1230)



* fix: prevent Status field from being displayed twice in TaskDetails component

Refactored TaskDetails component to conditionally render either the TaskDropDown for editing or the Details component for viewing the status, ensuring the Status field is only displayed once depending on the editing state.

* fix: prevent Status field from being displayed twice in TaskDetails component

Refactored TaskDetails component to conditionally render either the TaskDropDown for editing or the Details component for viewing the status, ensuring the Status field is only displayed once depending on the editing state.

* Fix: Assignee text box alignment (#1225) (#1228) (#1234)

* Refactor else condition (#1240)

* Corrected loading issue and extra space in standup submit

* Fixed early return

---------



---------

Co-authored-by: Amit Prakash <34869115+iamitprakash@users.noreply.github.com>
Co-authored-by: Shubham Sharma <68867418+skv93-coder@users.noreply.github.com>
Co-authored-by: Shubham Sharma <shbh541@gmail.com>
Copy link
Member

@pallabez pallabez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Achintya-Chatterjee
Copy link
Member Author

LGTM

@pallabez sir your changes are also going to prod

@Achintya-Chatterjee Achintya-Chatterjee requested review from pallabez and removed request for pallabez September 3, 2024 20:36
@pallabez
Copy link
Member

pallabez commented Sep 3, 2024

LGTM

@pallabez sir your changes are also going to prod

Already added the PR ticket

@iamitprakash iamitprakash merged commit 804c455 into main Sep 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants