-
Notifications
You must be signed in to change notification settings - Fork 165
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
Feature Flag removal of task search #1213
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
onClickSearchButton, | ||
}: TaskSearchProps) => { | ||
const [modalOpen, setModalOpen] = useState(false); | ||
const [filterDropdownModelOpen, setFilterDropdownModelOpen] = |
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.
There are 7 useState's currently in this component. This would be a good candidate to start using useReducer instead to better manage the state.
>(convertStringToOptions(inputValue)); | ||
const [onEditSelectedFilterValue, setOnEditSelectedFilterValue] = | ||
useState<string>(''); | ||
const [onEditSelectedFilterIndex, setOnEditSelectedFilterIndex] = |
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.
Is the type false | number
correct? Could the default value be -1
making the type be just number
?
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.
done
{modalOpen && ( | ||
<FilterModal | ||
dev={false} | ||
Filter |
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.
Can such a long JSX be broken down into multiple functions? That would considerably improve the readability.
import useDebounce from '@/hooks/useDebounce'; | ||
import { TaskSearchOption } from '@/interfaces/searchOptions.type'; | ||
import Options from './Suggestion/Options'; | ||
import RenderPills from './Suggestion/Pill'; |
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.
Any reason for naming this RenderPills and not just Pill ?
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.
Done
Desc : Made onEditSelectedFilterIndex to be of number type only & renamed import of Pill
Date: 31/05/2024
Developer Name: @pallabez
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes