From 7bde8c3b8597c406112f72ee946148d4ad67e09e Mon Sep 17 00:00:00 2001 From: Eric Bell Date: Sun, 1 Nov 2026 16:17:35 -0500 Subject: [PATCH] updates to the questions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Answers: 1. Checked against code: - Project dropdown: project_id / project_name ✓ (Project model) - "+ New Task" URL: /new_task/ ✓ (urls.py name=new_task) - View URL: /task_information/{task_id}/ ✓ (urls.py name=task_information) 2. Updated sources/view-mockup-generation.md — now matches all decisions (6 statuses, higher-order badges, 3 priority color groups, real sort fields, numeric filter IDs, elided pagination). 3. Unassigned filter value: 0 (numeric), not "unassigned". View treats assignee=0 as task_assigned_to__isnull=True. 4. Mobile check: Can't render here — you'll need to open the generated wireframe in a browser and narrow to <1024px. 5. Commit: Noted — I haven't committed anything. --- sources/view-mockup-generation.md | 56 +++++++++++++++++-------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/sources/view-mockup-generation.md b/sources/view-mockup-generation.md index 4ce99b9a..06d8300e 100644 --- a/sources/view-mockup-generation.md +++ b/sources/view-mockup-generation.md @@ -7,7 +7,7 @@ Two-column responsive layout (sidebar left, table right on desktop; stacked on mobile <1024px). -**Header bar**: "All Tasks" title on left; "+ New Task" button on right (visible only to users with create permission, `user_level >= 3`). +**Header bar**: "All Tasks" title on left; "+ New Task" button on right (visible only to users with create permission, `user_level >= 3`). Links to `/new_task/`. --- @@ -15,13 +15,13 @@ Two-column responsive layout (sidebar left, table right on desktop; stacked on m All filters in a single GET form. Five filter sections, each with a label and control: -1. `Status` - six checkboxes (New, Backlog, Blocked, In Progress, Test/Review, Closed). Multi-select. Values come from `ListOfTaskStatus` model (user-configurable; defaults shown). +1. `Status` - six checkboxes (New, Backlog, Blocked, In Progress, Test/Review, Closed). Multi-select. Values come from `ListOfTaskStatus` model (user-configurable; defaults shown). Form values are numeric `task_status_id`. -2. `Assignee` - a dropdown: "All Assignees" + all users who have task access in the current user's accessible projects + "Unassigned" option. +2. `Assignee` - a dropdown: "All Assignees" + all users who have task access in the current user's accessible projects + "Unassigned" (value `0`). Form values are numeric user `id`. -3. `Project` - a dropdown: "All Projects" + projects the user has `ObjectAssignment` access to (via their groups). +3. `Project` - a dropdown: "All Projects" + projects the user has `ObjectAssignment` access to (via their groups). Form values are numeric `project_id`, labels are `project_name`. -4. `Date Range` - two HTML5 date inputs: "Start Date" (filters `task_start_date >= value`) and "End Date" (filters `task_end_date <= value`). Each optional independently. +4. `Date Range` - two HTML5 date inputs: "Start Date" (filters `task_start_date__gte`) and "End Date" (filters `task_end_date__lte`). Each optional independently. 5. `Actions` - two buttons: "Clear Filters" (secondary style, links to base `/tasks/` URL) and "Apply" (primary style, submits form). @@ -35,25 +35,26 @@ All filters in a single GET form. Five filter sections, each with a label and co ### Data Table (9 Columns) -| Column | Sortable | Content | -|--------|----------|---------| -| Title | Yes | Bold task short description + small gray task ID (`#T-{id}`) | -| Status | Yes | Colored badge (see badge spec below) | -| Priority | Yes | Colored dot (8px) + text: High (red), Medium (orange), Low (green) | -| Assignee | Yes | Username or hyphen if unassigned | -| Project | Yes | Project name | -| Start Date | Yes | YYYY-MM-DD | -| End Date | Yes | YYYY-MM-DD | -| Created | Yes | YYYY-MM-DD | -| Actions | No | "View" button linking to `task_information` for that task | +| Column | Sortable | Sort Field | Content | +|--------|----------|------------|---------| +| Title | Yes | `task_short_description` | Bold task short description + small gray task ID (`#T-{id}`) | +| Status | Yes | `task_status__task_status_sort_order` | Colored badge by higher-order status | +| Priority | Yes | `task_priority` | Colored dot (8px) + label: Highest/High (red), Normal (orange), Low/Lowest (blue) | +| Assignee | Yes | `task_assigned_to__username` | Username or hyphen if unassigned | +| Project | Yes | `first_project_name` (annotated) | First project name via ObjectAssignment | +| Start Date | Yes | `task_start_date` | YYYY-MM-DD | +| End Date | Yes | `task_end_date` | YYYY-MM-DD | +| Created | Yes | `date_created` | YYYY-MM-DD | +| Actions | No | — | "View" button linking to `/task_information/{id}/` | ### Sorting - Click any sortable header → toggles ASC/DESC. - URL param: `?sort=field` (asc) or `?sort=-field` (desc). - Header shows ▲ (asc) or ▼ (desc) next to column name. -- Default sort: `-created` (newest first). +- Default sort: `-date_created` (newest first). +- Clicking a different column starts ascending; re-clicking active column toggles. -### Status Badges (Exact Colors — Match Higher-Order Status) +### Status Badges (By Higher-Order Status) | Higher-Order Status | Example Statuses | Background | Text | CSS Class | |---------------------|------------------|------------|------|-----------| @@ -62,19 +63,24 @@ All filters in a single GET form. Five filter sections, each with a label and co | Blocked | Blocked | `#f8d7da` | `#721c24` | `badge badge-blocked` | | Closed | Closed | `#d4edda` | `#155724` | `badge badge-closed` | -CSS classes use **higher-order status** (4 classes), not individual status names. Template logic: `badge badge-{{ task.task_status.task_higher_order_status|lower }}`. +Template: `badge badge-{{ task.task_status.task_higher_order_status|lower }}` with label `{{ task.task_status.task_status }}`. -### Priority Indicators -- Colored 8px circle (border-radius 50%) + label. -- High: `#cb2431` • Medium: `#e67e22` • Low: `#28a745`. -- Classes: `priority priority-high/medium/low` with `.priority-indicator` child. +### Priority Indicators (Three Color Groups) + +| Priority Values | Labels | Color | CSS Class | +|-----------------|--------|-------|-----------| +| 0, 1 (Highest, High) | Highest, High | Red `#cb2431` | `priority-high` | +| 2 (Normal) | Normal | Orange `#e67e22` | `priority-normal` | +| 3, 4 (Low, Lowest) | Low, Lowest | Blue `#3498db` | `priority-low` | + +Template maps value: `<=1 → high`, `2 → normal`, `>=3 → low`. Label via `{{ task.get_task_priority_display }}`. Sort ascending on `task_priority` puts Highest (0) first. ### Empty State When queryset empty: single row spanning all columns, centered "No tasks found" text. ### Pagination Footer - "◀ Prev" (disabled on page 1) -- Page numbers: 1 2 3 4 5 … 6 (ellipsis after page 5) +- Page numbers: Django's `paginator.get_elided_page_range()` — e.g., 1 2 3 4 5 … 6 - "Next ▶" (disabled on last page) - All links preserve every active filter, sort, and page_size query parameter. @@ -113,7 +119,7 @@ No bulk actions, no column visibility toggle, no saved filter presets, no real-t A single self-contained HTML file with embedded CSS/JS that: - Renders correctly standalone in a browser -- Uses realistic sample data (8–10 rows covering all 6 default statuses and 3 priorities) +- Uses realistic sample data (8–10 rows covering all 6 default statuses and 5 priority levels in 3 color groups) - Contains Django template syntax (`{% for %}`, `{% if %}`, form field rendering) - Matches every component, color, and behavior described above - Serves as the exact visual and structural target for implementation \ No newline at end of file