Skip to content

Code-review follow-ups from #59: extract useClickOutside hook + revisit poll-pause scope #60

Description

@manucompiles

Deferred (non-blocking) findings from the #59 code review. Neither blocks shipping v2.10.2.

R4 (Suggest) - Duplicated outside-click logic. The Escape-key + outside-click useEffect is now reimplemented in three components: DeadlinePopover, TaskCard, and FilterPanel. Extract a useClickOutside(ref, onClose) hook (e.g. frontend/src/hooks/useClickOutside.ts) and refactor all three to use it. A bug fix in Escape/touch handling currently has to be made in three places.

R3 (Suggest) - Poll-pause scope. TasksClient pauses background polling while the desktop deadline popover is open (deadlinePopoverId === null in the pollEnabled condition). The popover holds no unsaved state, so the pause is broader than necessary. Consider dropping deadlinePopoverId from the pause condition so the list keeps refreshing during a read-only deadline selection. Low value; verify it doesn't cause the popover's task row to re-render out from under it before changing.

Source: code review on branch feature/update-task-and-edit-modal-#59. Tracking issue #59.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions