Files
project-work/sources/wireframe-generation-instructions.md
Eric Bell eb6677c9fa rewrote specs, added new ui generation spec
- task-brief is the essential 3 questions answers
- tdd - is the revised tdd plan
- wireframe-gen - is 1st cut at writing up the mockup instructions
- view-mockup - is the 2nd cut
2026-11-01 14:19:06 -05:00

9.6 KiB
Raw Blame History

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 (To Do, In Progress, In Review, Done, Blocked)
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 <input type="date">
End Date Date input HTML5 <input type="date">
Actions Buttons "Clear Filters" (secondary), "Apply" (primary)

3. Table Columns (Exact Order + Behavior)

Column Sortable Rendering
Title Yes <strong>task_short_description</strong><br><small>#T-{task_id}</small>
Status Yes Badge: badge-todo, badge-in-progress, badge-review, badge-done, badge-blocked
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)

.badge-todo          { background: #fff3cd; color: #856404; }
.badge-in-progress   { background: #cce5ff; color: #004085; }
.badge-review        { background: #e2d9f3; color: #5a32a3; }
.badge-done          { background: #d4edda; color: #155724; }
.badge-blocked       { background: #f8d7da; color: #721c24; }

5. Priority Indicator

<span class="priority priority-high">
  <span class="priority-indicator"></span>High
</span>
<!-- priority-medium, priority-low similarly -->
.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

{% extends "NearBeach/base.html" %}
{% block content %}
<div class="task-list-container">
  <header class="task-list-header">...</header>
  <div class="task-list-main">
    <aside class="task-list-sidebar">
      <form method="GET" class="filter-form">
        <!-- All filter fields -->
        <button type="submit" name="apply">Apply</button>
        <a href="{% url 'task_list' %}" class="btn btn-secondary">Clear</a>
      </form>
    </aside>
    <section class="task-list-table-area">
      <div class="table-header">
        <span class="results-info">Showing {{ page_obj.start_index }}–{{ page_obj.end_index }} of {{ paginator.count }} tasks</span>
        <select name="page_size" onchange="this.form.submit()">...</select>
      </div>
      <table class="task-table">
        <thead>
          <tr>
            <th><a href="?sort=created&...">Title {% if sort == 'created' %}▲{% elif sort == '-created' %}▼{% endif %}</a></th>
            <!-- ... all columns -->
          </tr>
        </thead>
        <tbody>
          {% for task in page_obj %}
          <tr>...</tr>
          {% empty %}
          <tr><td colspan="9" class="empty-state">No tasks found</td></tr>
          {% endfor %}
        </tbody>
      </table>
      <nav class="pagination">
        <!-- Prev, page numbers, Next -->
      </nav>
    </section>
  </div>
</div>
{% endblock %}

Form Handling

  • All filters in single <form method="GET"> in sidebar
  • Pagination links are <a href="?page=2&status=in_progress&..."> preserving all params
  • Page size selector: <select name="page_size" onchange="this.form.submit()">

Responsive Breakpoint

  • ≥1024px: Sidebar left, table right (flex)
  • <1024px: Sidebar stacks above table (full width)

What NOT to Include

❌ Don't Add Reason
Live collaboration indicators Not in scope
Bulk actions (checkboxes + dropdown) Future enhancement
Column visibility toggle Future enhancement
Saved filter presets Future enhancement
Real-time updates (WebSocket) Not in NearBeach
Drag-and-drop reordering Not a kanban board

Design System Consistency

Match NearBeach existing patterns:

  • Button classes: btn btn-primary, btn btn-secondary
  • Form controls: form-control class on inputs/selects
  • Table: table class with th/td padding 12px 16px
  • Badges: badge base + badge-{status} modifier
  • Colors: Use existing CSS variables or match #0366d6 (primary), #24292e (text), #e1e4e8 (borders)

Deliverable

Single HTML file (like the current wireframe) that:

  1. Renders correctly standalone (open in browser)
  2. Has all CSS embedded (no external dependencies)
  3. Includes minimal JS for sort toggle demo
  4. Uses realistic sample data (8-10 rows showing all statuses/priorities)
  5. Matches the component list above exactly

Prompt to Give the LLM

"Generate a production-ready HTML wireframe for NearBeach's Task List View at /tasks/. Use the specifications in wireframe-generation-instructions.md. The wireframe must be a single self-contained HTML file with embedded CSS/JS, matching the exact component list, status badges, priority indicators, pagination, sorting behavior, and permission-aware UI elements described. Use NearBeach's design system (btn, form-control, badge classes). Include realistic sample data demonstrating all 5 statuses and 3 priority levels. The template structure must be Django-ready (show {% for %} loops, {% if %} conditionals for permissions, form field rendering)."