-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Changed condition on which 'Add task' button is displayed (#7333) #7362
Conversation
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.
PR Summary
This pull request modifies the display logic for the 'Add task' button in the TaskGroups component, addressing issue #7333.
- Updated
TaskGroups.tsx
to show 'Add task' button only for 'TODO' status or when no 'TODO' tasks exist - Removed unused
showAddButton
prop fromTaskGroups
andObjectTasks
components - Improved UI consistency by preventing 'Add task' button display in 'Done' section
- Simplified component logic by moving button display decision to
TaskGroups
- Aligned implementation with desired behavior described in the issue
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
packages/twenty-front/src/modules/activities/tasks/components/TaskGroups.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM! Thanks @lparz1val. Wrapped constants in useMemo!
@FelixMalfait Thanks! :) |
) (twentyhq#7362) This PR addresses issue twentyhq#7333. It updates the condition for displaying the 'Add task' button. The button is now only visible for the 'TODO' section or when no 'TODO' block is present (i.e., there are no tasks in this category). Additionally, I removed the unused showAddButton, which is no longer necessary due to the updated logic. ![image](https://github.com/user-attachments/assets/571542d7-1b0f-4b91-afcf-4592490f1f72) ![image](https://github.com/user-attachments/assets/46974459-d3cd-497a-a6b6-9302cbff7716) --------- Co-authored-by: Nitin Koche <[email protected]>
This PR addresses issue #7333. It updates the condition for displaying the 'Add task' button. The button is now only visible for the 'TODO' section or when no 'TODO' block is present (i.e., there are no tasks in this category).
Additionally, I removed the unused showAddButton, which is no longer necessary due to the updated logic.