# Wireframe Generation Instructions for Task List View *Give these to the LLM that will generate the production wireframe* --- ## Context **Project**: NearBeach (Django/Vue project management tool) **Feature**: Task List View at `/tasks/` with filtering, sorting, pagination **Permission Model**: Group-based via `ObjectAssignment` — users see only tasks from projects their groups have access to --- ## Required Wireframe Components ### 1. Page Structure ``` ┌─────────────────────────────────────────────────────────────┐ │ Header: "All Tasks" [+ New Task] btn │ ├──────────────┬──────────────────────────────────────────────┤ │ │ │ │ SIDEBAR │ MAIN TABLE AREA │ │ (280px) │ │ │ │ ┌────────────────────────────────────────┐ │ │ Filters: │ │ Results: "Showing 1–25 of 142 tasks" │ │ │ • Status │ │ Page size: [25 ▼] │ │ │ ☐ To Do │ └────────────────────────────────────────┘ │ │ ☐ In Prog │ ┌────────────────────────────────────────┐ │ │ ☐ Review │ │ ▼Title ▲Status Priority Assignee... │ │ │ ☐ Done │ │ ────────────────────────────────────── │ │ │ ☐ Blocked │ │ Task Name │ View │ │ │ • Assignee │ │ #T-1247 In Progress ●High Alex ... │ │ │ [All ▼] │ │ Task Name │ View │ │ │ • Project │ │ #T-1245 To Do ●High Sam ... │ │ │ [All ▼] │ │ ... │ │ │ • Date Range│ └────────────────────────────────────────┘ │ │ [from] │ ┌────────────────────────────────────────┐ │ │ [to] │ │ ◀ Prev 1 2 3 4 5 ... 6 Next ▶ │ │ │ [Clear] │ └────────────────────────────────────────┘ │ │ [Apply] │ │ │ │ │ └──────────────┴──────────────────────────────────────────────┘ ``` ### 2. Sidebar Filters (Exact Fields) | Filter | Type | Options Source | |--------|------|----------------| | **Status** | Multi-checkbox | `ListOfTaskStatus` model (New, Backlog, Blocked, In Progress, Test/Review, Closed — user-configurable, defaults shown) | | **Assignee** | Single select | Users with task access in user's projects + "Unassigned" | | **Project** | Single select | Projects user has `ObjectAssignment` access to | | **Start Date** | Date input | HTML5 `` | | **End Date** | Date input | HTML5 `` | | **Actions** | Buttons | "Clear Filters" (secondary), "Apply" (primary) | ### 3. Table Columns (Exact Order + Behavior) | Column | Sortable | Rendering | |--------|----------|-----------| | **Title** | Yes | `task_short_description
#T-{task_id}` | | **Status** | Yes | Badge based on `task_higher_order_status`: `badge-backlog` (New, Backlog), `badge-normal` (In Progress, Test/Review), `badge-blocked`, `badge-closed` | | **Priority** | Yes | Colored dot + text: `● High` (red), `● Medium` (orange), `● Low` (green) | | **Assignee** | Yes | `assigned_user.username` or `—` | | **Project** | Yes | `project.project_name` | | **Start Date** | Yes | `task_start_date` (YYYY-MM-DD) | | **End Date** | Yes | `task_end_date` (YYYY-MM-DD) | | **Created** | Yes | `created_date` (YYYY-MM-DD) | | **Actions** | No | `[View]` button → links to `task_information` | ### 4. Status Badge CSS Classes (Must Match — Based on Higher-Order Status) ```css .badge-backlog { background: #fff3cd; color: #856404; } /* New, Backlog */ .badge-normal { background: #cce5ff; color: #004085; } /* In Progress, Test/Review */ .badge-blocked { background: #f8d7da; color: #721c24; } /* Blocked */ .badge-closed { background: #d4edda; color: #155724; } /* Closed */ ``` Template renders: `{{ task.task_status.task_status }}` ### 5. Priority Indicator ```html High .priority-indicator { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } .priority-high .priority-indicator { background: #cb2431; } .priority-medium .priority-indicator { background: #e67e22; } .priority-low .priority-indicator { background: #28a745; } ``` ### 6. Pagination (Exact Behavior) - **Page size selector**: 10, 25, 50, 100 (default 25) - **Page numbers**: 1 2 3 4 5 … 6 (ellipsis after 5) - **Prev/Next**: Disabled on first/last page - **All links preserve**: All current filter/sort query params ### 7. Sorting Behavior - Click column header → toggles ASC/DESC - URL param: `?sort=created` (asc) or `?sort=-created` (desc) - Visual indicator: ▲ for asc, ▼ for desc (append to header text) - Default sort: `-created` (newest first) ### 8. Permission-Aware UI Elements | Element | Shown When | |---------|------------| | **+ New Task button** | `user_level >= 3` (create permission) | | **Edit/View links in Actions** | `user_level >= 1` (read permission) | | **Filter sidebar** | Always (read-only users can still filter) | --- ## Technical Requirements ### Template Structure ```html {% extends "NearBeach/base.html" %} {% block content %}
...
Showing {{ page_obj.start_index }}–{{ page_obj.end_index }} of {{ paginator.count }} tasks
{% for task in page_obj %} ... {% empty %} {% endfor %}
Title {% if sort == 'created' %}▲{% elif sort == '-created' %}▼{% endif %}
No tasks found
{% endblock %} ``` ### Form Handling - All filters in **single `
`** in sidebar - Pagination links are `` preserving all params - Page size selector: `