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

Changed condition on which 'Add task' button is displayed (#7333) #7362

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

lparz1val
Copy link
Contributor

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.
image
image

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 from TaskGroups and ObjectTasks 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

Copy link
Contributor

@ehconitin ehconitin left a 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!

@ehconitin
Copy link
Contributor

@FelixMalfait Thanks! :)

@FelixMalfait FelixMalfait merged commit d7dd41e into twentyhq:main Oct 2, 2024
5 of 10 checks passed
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
) (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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants