-
Notifications
You must be signed in to change notification settings - Fork 71
[Improvement] Add bot suggestion from #3938 #3947
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
[Improvement] Add bot suggestion from #3938 #3947
Conversation
WalkthroughThe changes focus on refining type annotations, improving code clarity, and enforcing stricter equality checks across several components and hooks. Updates include stricter type handling in dropdown components, improved JSDoc comments, extraction of magic numbers into named constants, and removal of unnecessary type assertions in hooks. No functional behavior is altered. Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
yarn install v1.22.22 ✨ Finishing Touches
🧪 Generate unit tests
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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.
Greptile Summary
This PR implements several code quality improvements across multiple files based on AI suggestions from PR #3938. The changes focus on:
- Improved type safety by removing unnecessary type assertions and 'any' types
- Better code maintainability through constant extraction
- Enhanced comparison operators for stricter type checking
- Better documentation and prop types
Specific changes include:
- Timesheet view: Changed loose equality (
==
) to strict equality (===
) - useTaskSizesValue: Removed unnecessary type assertion
- useScrollPagination: Extracted magic number to named constant
SCROLL_THRESHOLD
- MultipleStatusDropdown: Replaced 'any' types with specific TypeScript types
- TaskSizesDropdown: Improved documentation and added isMultiple prop support
- useTaskPrioritiesValue: Removed unnecessary type assertion
PR Description Notes:
- The description could be more detailed about which specific AI suggestions were implemented
- Documentation update checkbox is unchecked despite making documentation improvements
Confidence score: 4.5/5
- This PR is very safe to merge as it consists of TypeScript improvements and code quality enhancements
- High confidence due to the nature of changes being primarily type-related and following established best practices
- Files needing attention: apps/web/core/components/tasks/multiple-status-dropdown.tsx - verify the type changes don't impact existing functionality
6 files reviewed, no comments
Edit PR Review Bot Settings | Greptile
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
🧹 Nitpick comments (3)
apps/web/core/hooks/common/use-pagination.ts (1)
65-66
: Prefer movingSCROLL_THRESHOLD
outside the hook or exposing it as a propDeclaring the constant inside the hook causes it to be (re)allocated on every render. It’s a trivial cost here, but hoisting it to module scope (or allowing callers to override it via a hook parameter) avoids the extra work and makes unit testing / tweaking easier.
- const SCROLL_THRESHOLD = 100; +export const SCROLL_THRESHOLD = 100; // or accept as an argument with a sensible defaultapps/web/core/components/pages/timesheet/timesheet-view.tsx (1)
29-36
: Condition can be simplified
loading !== undefined && loading === false
can be reduced toloading === false
– the strict equality already guarantees the value is defined.- if (loading !== undefined && loading === false && data.length === 0) { + if (loading === false && data.length === 0) {apps/web/core/components/tasks/task-sizes-dropdown.tsx (1)
23-25
: Redundant cast – can likely be removedYou removed similar casts in the hooks, but this component still forces
taskSizes as TTaskStatus[]
. UnlesstaskSizes
is typed differently here, the cast may hide real type mismatches.- const taskSizesValue = useMapToTaskStatusValues(taskSizes as TTaskStatus[], false); + const taskSizesValue = useMapToTaskStatusValues(taskSizes, false);If
useTaskSizes()
already returns the correct shape, this keeps typing strict and consistent.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
apps/web/core/components/pages/timesheet/timesheet-view.tsx
(1 hunks)apps/web/core/components/tasks/multiple-status-dropdown.tsx
(2 hunks)apps/web/core/components/tasks/task-sizes-dropdown.tsx
(1 hunks)apps/web/core/hooks/common/use-pagination.ts
(2 hunks)apps/web/core/hooks/tasks/use-task-priorities-value.ts
(1 hunks)apps/web/core/hooks/tasks/use-task-sizes-value.ts
(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In `apps/web/components/ui/sidebar.tsx`, modifications to the keyboard shortcut implementation within `React.useEffect` can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: CREDO23
PR: ever-co/ever-teams#3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In `apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx`, within the `ProjectDropDown` component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The `onChange` function carries the parent state, and `setSelected` maintains the selected state in the child component.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In `apps/web/components/ui/sidebar.tsx`, cookie configuration enhancements including `secure` and `httpOnly` flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3887
File: apps/web/core/query/keys/index.ts:41-58
Timestamp: 2025-06-07T04:31:16.865Z
Learning: The team uses a progressive migration approach for React Query implementation, where query key infrastructure is added first before implementing the hooks/services that use them. This results in intentionally unused code during intermediate migration states.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In `apps/web/components/ui/sidebar.tsx`, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
Learnt from: CREDO23
PR: ever-co/ever-teams#3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
apps/web/core/hooks/tasks/use-task-sizes-value.ts (5)
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the `TaskTable` component (`apps/web/components/pages/team/tasks/TaskTable.tsx`), we do not need to add error handling for task fetching when using `useTeamTasks()`.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The `favoriteTasksAtom` in `apps/web/app/stores/team-tasks.ts` is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/components/pages/kanban/menu-kanban-card.tsx:85-85
Timestamp: 2024-11-20T19:57:48.324Z
Learning: We are gradually migrating from 'taskName' to 'title' as we make changes to the remaining files.
Learnt from: syns2191
PR: ever-co/ever-teams#3409
File: .scripts/electron-desktop-environment/concrete-environment-content/desktop-server-web-environment-content.ts:21-22
Timestamp: 2024-12-11T01:37:45.660Z
Learning: When adding `TERM_OF_SERVICE` and `PRIVACY_POLICY` in `DesktopServerWebEnvironmentContent` in `.scripts/electron-desktop-environment/concrete-environment-content/desktop-server-web-environment-content.ts`, fallback values using the `||` operator are not necessary.
apps/web/core/components/pages/timesheet/timesheet-view.tsx (8)
Learnt from: CREDO23
PR: ever-co/ever-teams#3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In `apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx`, within the `ProjectDropDown` component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The `onChange` function carries the parent state, and `setSelected` maintains the selected state in the child component.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In `apps/web/components/ui/sidebar.tsx`, modifications to the keyboard shortcut implementation within `React.useEffect` can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: Innocent-Akim
PR: ever-co/ever-teams#3208
File: apps/web/app/[locale]/timesheet/components/TimesheetFilter.tsx:30-35
Timestamp: 2024-10-30T16:31:01.294Z
Learning: In the `TimesheetFilter` component, the `Add Time` button does not need to use the `AddManualTimeModal` component, as per the user's decision.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the `TaskTable` component (`apps/web/components/pages/team/tasks/TaskTable.tsx`), we do not need to add error handling for task fetching when using `useTeamTasks()`.
Learnt from: CREDO23
PR: ever-co/ever-teams#3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3199
File: apps/web/components/app-sidebar.tsx:49-55
Timestamp: 2024-10-28T17:16:03.609Z
Learning: In `apps/web/components/app-sidebar.tsx`, hardcoded sample user data is intentionally included and should not be removed.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In `apps/web/components/ui/sidebar.tsx`, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
apps/web/core/hooks/tasks/use-task-priorities-value.ts (6)
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The `favoriteTasksAtom` in `apps/web/app/stores/team-tasks.ts` is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the `TaskTable` component (`apps/web/components/pages/team/tasks/TaskTable.tsx`), we do not need to add error handling for task fetching when using `useTeamTasks()`.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3199
File: apps/web/app/stores/team-tasks.ts:29-29
Timestamp: 2024-10-28T17:22:19.947Z
Learning: In `apps/web/app/stores/team-tasks.ts`, tasks should be sorted alphabetically, not by `createdAt` date.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/components/pages/kanban/menu-kanban-card.tsx:85-85
Timestamp: 2024-11-20T19:57:48.324Z
Learning: We are gradually migrating from 'taskName' to 'title' as we make changes to the remaining files.
Learnt from: syns2191
PR: ever-co/ever-teams#3409
File: .scripts/electron-desktop-environment/concrete-environment-content/desktop-server-web-environment-content.ts:21-22
Timestamp: 2024-12-11T01:37:45.660Z
Learning: When adding `TERM_OF_SERVICE` and `PRIVACY_POLICY` in `DesktopServerWebEnvironmentContent` in `.scripts/electron-desktop-environment/concrete-environment-content/desktop-server-web-environment-content.ts`, fallback values using the `||` operator are not necessary.
apps/web/core/hooks/common/use-pagination.ts (2)
Learnt from: CREDO23
PR: ever-co/ever-teams#3626
File: apps/web/app/[locale]/projects/components/page-component.tsx:119-119
Timestamp: 2025-02-28T09:17:46.802Z
Learning: In the projects page component, filtering of projects based on the active team has been moved out of the useEffect hook that fetches organization projects, and is now handled in the pagination logic instead.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In `apps/web/components/ui/sidebar.tsx`, modifications to the keyboard shortcut implementation within `React.useEffect` can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
apps/web/core/components/tasks/task-sizes-dropdown.tsx (6)
Learnt from: CREDO23
PR: ever-co/ever-teams#3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In `apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx`, within the `ProjectDropDown` component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The `onChange` function carries the parent state, and `setSelected` maintains the selected state in the child component.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In `apps/web/components/ui/sidebar.tsx`, modifications to the keyboard shortcut implementation within `React.useEffect` can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In `apps/web/components/ui/sidebar.tsx`, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/components/pages/kanban/menu-kanban-card.tsx:85-85
Timestamp: 2024-11-20T19:57:48.324Z
Learning: We are gradually migrating from 'taskName' to 'title' as we make changes to the remaining files.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3234
File: apps/web/components/pages/team/tasks/TaskTable.tsx:9-13
Timestamp: 2024-11-06T17:10:06.239Z
Learning: In the `TaskTable` component (`apps/web/components/pages/team/tasks/TaskTable.tsx`), we do not need to add error handling for task fetching when using `useTeamTasks()`.
apps/web/core/components/tasks/multiple-status-dropdown.tsx (8)
Learnt from: CREDO23
PR: ever-co/ever-teams#3360
File: apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx:346-354
Timestamp: 2024-11-25T18:49:15.126Z
Learning: In `apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx`, within the `ProjectDropDown` component, both parent and child state should be synchronized for better UI updates, even in controlled mode. The `onChange` function carries the parent state, and `setSelected` maintains the selected state in the child component.
Learnt from: CREDO23
PR: ever-co/ever-teams#3353
File: apps/web/lib/features/task/task-input.tsx:812-815
Timestamp: 2024-11-20T19:56:12.313Z
Learning: In `apps/web/lib/features/task/task-input.tsx`, prefer using `useRef` over `useState` for `assignees` in the `AssigneesSelect` component to prevent re-renders on change.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:45.111Z
Learning: In `apps/web/components/ui/sidebar.tsx`, modifications to the keyboard shortcut implementation within `React.useEffect` can cause build errors. The current implementation has been validated by shadcn-ui and should remain unchanged.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:77-87
Timestamp: 2024-10-25T15:15:35.107Z
Learning: In `apps/web/components/ui/sidebar.tsx`, keyboard shortcut accessibility has already been reviewed and approved by shadcn-ui; further suggestions in this area are unnecessary.
Learnt from: CREDO23
PR: ever-co/ever-teams#3392
File: apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx:42-51
Timestamp: 2024-12-05T09:04:08.049Z
Learning: In the `GroupBySelect` component (`apps/web/app/[locale]/reports/weekly-limit/components/group-by-select.tsx`), only one option can be selected at a time; two options cannot be selected simultaneously.
Learnt from: CREDO23
PR: ever-co/ever-teams#3185
File: apps/web/lib/settings/task-statuses-form.tsx:187-199
Timestamp: 2024-11-07T14:04:24.336Z
Learning: In `apps/web/lib/settings/task-statuses-form.tsx`, when generating colors in the `getRandomColor` function, prefer to keep generating them randomly to have more than five colors, even if it might affect color accessibility.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3199
File: apps/web/app/stores/team-tasks.ts:39-40
Timestamp: 2024-10-28T17:23:01.110Z
Learning: The `favoriteTasksAtom` in `apps/web/app/stores/team-tasks.ts` is important for future implementations and should not be removed, even if it appears unused currently.
Learnt from: NdekoCode
PR: ever-co/ever-teams#3189
File: apps/web/components/ui/sidebar.tsx:14-19
Timestamp: 2024-10-25T15:16:53.869Z
Learning: In `apps/web/components/ui/sidebar.tsx`, cookie configuration enhancements including `secure` and `httpOnly` flags, and making cookie name and max age configurable via environment variables, have already been implemented in previous commits.
🧬 Code Graph Analysis (1)
apps/web/core/hooks/tasks/use-task-sizes-value.ts (2)
apps/web/core/hooks/tasks/use-map-to-task-status-values.tsx (1)
useMapToTaskStatusValues
(9-36)apps/web/core/components/tasks/task-default-status.tsx (1)
taskSizes
(103-129)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: deploy
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
apps/web/core/hooks/common/use-pagination.ts (1)
80-82
: 👍 Magic number removal looks goodReplacing the hard-coded
100
with a named constant improves readability.apps/web/core/hooks/tasks/use-task-priorities-value.ts (1)
5-7
: Cast removal is the right move
taskPriorities
already satisfies theTTaskStatus
constraint expected byuseMapToTaskStatusValues
, so the explicit cast was redundant. Good clean-up.apps/web/core/hooks/tasks/use-task-sizes-value.ts (1)
5-7
: Consistent with priorities hook – LGTMSame rationale: the cast was unnecessary and its removal keeps the API surface cleaner.
apps/web/core/components/tasks/task-sizes-dropdown.tsx (1)
8-11
: Updated JSDoc matches the actual prop typeThe new annotation is accurate and helpful. 👍
apps/web/core/components/tasks/multiple-status-dropdown.tsx (2)
135-135
: Good type safety improvement!Removing the explicit
any
type annotation allows TypeScript to infer the correctReact.MouseEvent<HTMLButtonElement>
type, which is more type-safe while maintaining the same functionality.
154-154
: Excellent type refinement!The union type
string[] | string
accurately reflects the function's actual usage patterns and is much more type-safe than the previousany
type. This makes the code more self-documenting and aligns perfectly with the function's logic that handles both array and single string inputs.
@@ -62,6 +62,8 @@ export function useScrollPagination<T>({ | |||
|
|||
$scrollableElement.current = scrollableElement || $scrollableElement.current; | |||
|
|||
const SCROLL_THRESHOLD = 100; |
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.
@CREDO23 Preferable moving SCROLL_THRESHOLD
outside the hook or exposing it as a prop, we usually store shared constants in apps/web/core/constants
, so I recommend moving SCROLL_THRESHOLD there instead of exporting it directly from the hook file.
Alternatively, exposing it as a hook parameter with a default value is fine if flexibility is needed.
@@ -26,7 +26,7 @@ export function TimesheetView({ | |||
); | |||
} | |||
|
|||
if (loading !== undefined && loading == false && data.length === 0) { | |||
if (loading !== undefined && loading === false && data.length === 0) { |
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.
@CREDO23, loading !== undefined && loading === false
is redundant.
We can simplify it to loading === false, since false is already strictly defined, so we can have if (loading === false && data.length === 0)
@@ -7,8 +7,7 @@ import { StatusDropdown } from './task-status'; | |||
|
|||
/** | |||
* Task dropdown that lets you select a task size | |||
* @param {IClassName} - IClassName - This is the interface that the component will accept. | |||
* @returns A React component | |||
* @param {TTaskStatusesDropdown<'size'>} props - Props for the task sizes dropdown component | |||
*/ | |||
export function TaskSizesDropdown({ |
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.
@CREDO23, On line 24
, const taskSizesValue = useMapToTaskStatusValues(taskSizes as TTaskStatus[], false);
, the cast taskSizes as TTaskStatus[] is likely unnecessary if useTaskSizes()
already returns the correct type.
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.
Also @CREDO23 , this branch ETP-42-review-apply-relevant-ai-suggestions-from-pr-3938
is currently not up to date with develop
Since we follow git-flow, let's sync with develop
before merging to avoid conflicts and ensure all recent changes are considered in this branch too.
Description
✅ Checklist
Summary by CodeRabbit
Bug Fixes
Documentation
Refactor