Skip to content

chore(web): Polish task board layout and animation - #168

Merged
KiwiGaze merged 3 commits into
stagingfrom
chore/polish-task-board
Mar 7, 2026
Merged

chore(web): Polish task board layout and animation#168
KiwiGaze merged 3 commits into
stagingfrom
chore/polish-task-board

Conversation

@KiwiGaze

@KiwiGaze KiwiGaze commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Kanban board full-height layout: Propagated flex-1/flex-col through the container chain so the board fills the remaining viewport height and the horizontal scrollbar sits at the bottom of the screen instead of floating mid-page.
  • Inline add-task animation fix: Added mode="wait" to AnimatePresence in the inline task creation form so the "Add task" button waits for the form's exit animation to complete before appearing, eliminating the layout jump.

Files changed

File Change
task/page.tsx Added flex flex-1 flex-col to page container
task-list.tsx Conditional flex-1 flex-col when board view is active
kanban-board.tsx Added flex-1 to scrollable container
add-task-inline.tsx Added mode="wait" to AnimatePresence

Test plan

  • Switch to Kanban view — scrollbar should be at the bottom of the viewport, not floating mid-page
  • Switch to List view — layout should be unchanged (no stretching)
  • In Kanban view, click "+ Add task" → fill in title → click Cancel → the "Add task" button should appear smoothly without jumping
  • In Kanban view, click "+ Add task" → submit a task → verify task appears and form collapses cleanly
  • Test on mobile — Kanban board should still use the mobile swipe view

Summary by CodeRabbit

  • New Features
    • Added a richer Kanban task card: completion toggle, due/overdue indicator, priority chip, long-press, and delete confirmation.
  • Refactor
    • Replaced legacy task item with the new Kanban card across board and mobile views; drag overlay updated accordingly.
  • Style
    • Layout switched to flex-based, improved responsiveness and animation sequencing.
  • Chores
    • Consolidated multi-variant buttons into a single outline button (removed tooltip variants).

@coderabbitai

coderabbitai Bot commented Mar 7, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a3e4a883-d5f7-480a-8f1c-528cfdc9ba72

📥 Commits

Reviewing files that changed from the base of the PR and between c13ee75 and f51794b.

📒 Files selected for processing (3)
  • apps/web/app/(protected)/schedule/components/new-event-button.tsx
  • apps/web/app/(protected)/task/components/kanban-task-card.tsx
  • apps/web/app/(protected)/task/components/new-task-button.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/web/app/(protected)/schedule/components/new-event-button.tsx
  • apps/web/app/(protected)/task/components/new-task-button.tsx
  • apps/web/app/(protected)/task/components/kanban-task-card.tsx

Walkthrough

Adds a new KanbanTaskCard component, replaces TaskItem usages with KanbanTaskCard across kanban/draggable/mobile views, applies flex-based layout/classname changes (flex-1, flex-col, cn), switches AnimatePresence to mode="wait", and consolidates tooltip-wrapped buttons into single Buttons.

Changes

Cohort / File(s) Summary
Animation
apps/web/app/(protected)/task/components/add-task-inline.tsx
Changed AnimatePresence to mode="wait" to alter exit/enter animation sequencing.
Layout / Class composition
apps/web/app/(protected)/task/components/task-list.tsx, apps/web/app/(protected)/task/page.tsx, apps/web/app/(protected)/task/components/kanban-board.tsx
Added flex-1/flex-col classes and introduced cn for conditional classNames; updated board and motion wrappers to use flex-based responsive layout.
New Kanban card component
apps/web/app/(protected)/task/components/kanban-task-card.tsx
Added KanbanTaskCard with checkbox, title/description, due date/overdue indicator, priority chip, contextual menu (toggle/delete), long-press handling, and delete confirmation dialog.
Replace TaskItem with KanbanTaskCard
apps/web/app/(protected)/task/components/draggable-task-card.tsx, apps/web/app/(protected)/task/components/mobile-kanban-view.tsx, apps/web/app/(protected)/task/components/kanban-board.tsx
Swapped TaskItem for KanbanTaskCard; updated imports and props (adds onDelete where applicable); DragOverlay now renders KanbanTaskCard.
Button / Tooltip simplification
apps/web/app/(protected)/schedule/components/new-event-button.tsx, apps/web/app/(protected)/task/components/new-task-button.tsx
Removed Tooltip-related imports/usage and consolidated variant buttons into a single outline Button with icon and optional label; preserved onClick/disabled behavior.

Sequence Diagram(s)

mermaid
sequenceDiagram
autonumber
actor User
participant Card as KanbanTaskCard
participant Menu as ContextMenu
participant Dialog as AlertDialog
participant Parent as TaskList/Board
participant API as TaskController
User->>Card: tap / click / long-press
Card->>Menu: open contextual menu (toggle/delete)
Menu->>Dialog: request delete confirmation
Dialog->>User: show confirmation
User->>Dialog: confirm delete
Dialog->>Parent: call onDelete(taskId)
Parent->>API: delete task request
API-->>Parent: deletion result
Parent-->>Card: remove card / update state

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: layout refinements (full-height Kanban board with proper scrollbar positioning) and animation improvements (AnimatePresence mode fix) across the task board components.
Peer Dependency Consistency ✅ Passed The custom check applies only to package.json files in packages/* directories. This repository has no packages directory and no package.json changes in this PR.
Api Contract Layer Conventions ✅ Passed PR contains no modifications to Next.js API route handlers; changes are limited to UI components and layout adjustments.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/polish-task-board

Comment @coderabbitai help to get the list of available commands and usage tips.

@KiwiGaze KiwiGaze self-assigned this Mar 7, 2026
@KiwiGaze KiwiGaze added the enhancement New feature or request label Mar 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/app/`(protected)/schedule/components/new-event-button.tsx:
- Around line 13-21: The Button currently hides its text on small screens (the
<span className="hidden sm:inline">Add Event</span>) leaving only the <Plus />
icon without an accessible name; update the Button component (the <Button ...>
element that renders <Plus />) to include an accessible label for the icon-only
state by adding an aria-label (e.g., aria-label="Add Event") or using
aria-labelledby tied to the visible text span so screen readers always announce
"Add Event" while preserving the visual hide-on-small behavior; ensure the aria
attribute is set on the Button that receives onClick and disabled props.

In `@apps/web/app/`(protected)/task/components/kanban-task-card.tsx:
- Around line 173-179: The action button is hidden by CSS (opacity-0 +
group-hover:opacity-100), which breaks touch and keyboard access; in the
DropdownMenuTrigger/Button in kanban-task-card.tsx remove the hover-only
visibility classes (e.g., delete "opacity-0" and "group-hover:opacity-100") and
instead ensure the Button has a visible default state (e.g., keep
transition-opacity or set "opacity-100") and retain accessible attributes
(aria-label) and focus styles so keyboard users can tab to and see the control;
update the Button className accordingly where DropdownMenuTrigger and Button are
used.
- Around line 126-137: The card container div that uses onClick should be made
keyboard-accessible: when onClick is present, add role="button" and tabIndex={0}
(so it can be focused) and wire a keyDown handler that calls handleCardClick
when Enter or Space is pressed (preventDefault for Space to avoid page
scrolling); also ensure any visual disabled state (task.isCompleted) is
reflected via aria-disabled when appropriate. Update the same outer element that
currently has onClick, onTouchStart/onTouchEnd handlers and className checks for
task.isCompleted to include these accessibility attributes and the key handling
logic.

In `@apps/web/app/`(protected)/task/components/new-task-button.tsx:
- Around line 8-17: The icon-only button becomes inaccessible on small screens
because the visible label (<span className="hidden sm:inline">Add Task</span>)
is hidden; update the Button (the component rendering the Plus icon and the
span) to include an accessible name by adding either an aria-label="Add Task" on
the Button or inserting a visually-hidden label (e.g., <span
className="sr-only">Add Task</span>) alongside the existing span so screen
readers always get the label; ensure the Plus icon remains decorative (no alt)
and that the onClick dispatch logic (window.dispatchEvent(new
CustomEvent("task:new"))) is unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 447a0646-8e43-444a-b4e0-5019fa810734

📥 Commits

Reviewing files that changed from the base of the PR and between a70b25a and c13ee75.

📒 Files selected for processing (6)
  • apps/web/app/(protected)/schedule/components/new-event-button.tsx
  • apps/web/app/(protected)/task/components/draggable-task-card.tsx
  • apps/web/app/(protected)/task/components/kanban-board.tsx
  • apps/web/app/(protected)/task/components/kanban-task-card.tsx
  • apps/web/app/(protected)/task/components/mobile-kanban-view.tsx
  • apps/web/app/(protected)/task/components/new-task-button.tsx

Comment thread apps/web/app/(protected)/schedule/components/new-event-button.tsx
Comment thread apps/web/app/(protected)/task/components/kanban-task-card.tsx
Comment on lines +173 to +179
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon"
className="size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100"
aria-label="Task actions"
>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Keep the actions trigger visible outside hover-only paths.

The menu button stays at opacity-0 until hover. In apps/web/app/(protected)/task/components/mobile-kanban-view.tsx, this card is now used on touch devices too, so delete/actions become effectively hidden there, and keyboard users can tab to an invisible control.

Suggested fix
               <Button
                 variant="ghost"
                 size="icon"
-                className="size-6 shrink-0 opacity-0 transition-opacity group-hover:opacity-100"
+                className="size-6 shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100 focus:opacity-100"
                 aria-label="Task actions"
               >
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/app/`(protected)/task/components/kanban-task-card.tsx around lines
173 - 179, The action button is hidden by CSS (opacity-0 +
group-hover:opacity-100), which breaks touch and keyboard access; in the
DropdownMenuTrigger/Button in kanban-task-card.tsx remove the hover-only
visibility classes (e.g., delete "opacity-0" and "group-hover:opacity-100") and
instead ensure the Button has a visible default state (e.g., keep
transition-opacity or set "opacity-100") and retain accessible attributes
(aria-label) and focus styles so keyboard users can tab to and see the control;
update the Button className accordingly where DropdownMenuTrigger and Button are
used.

Comment thread apps/web/app/(protected)/task/components/new-task-button.tsx
@KiwiGaze
KiwiGaze merged commit 95bd792 into staging Mar 7, 2026
5 checks passed
@KiwiGaze
KiwiGaze deleted the chore/polish-task-board branch March 7, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant