From 1d00a3a68f7c67aad2ee5a0bf02116985494721a Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Thu, 23 Apr 2026 13:27:21 +0200 Subject: [PATCH] refactor(report): retire the Generate Report modal (Task 5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the plan at docs/plans/2026-04-23-inline-filters-plan.md Task 5, the now-redundant configuration modal goes away: core/templates/core/_report_config_modal.html → deleted (160 lines) core/templates/core/index.html: - Dashboard 'Generate Report' tile → plain link to /report/?from_month={% now 'Y-m' %}&to_month={% now 'Y-m' %} so the click lands on the report page with the current month pre-filled. - Modal {% include %} at EOF removed. core/templates/core/report.html: - Both 'New Report' buttons (header + bottom action bar) deleted; comments updated to say the pills ARE the new-report interface. - {% include 'core/_report_config_modal.html' %} removed. - Stale 'Task 5 will delete...' comment on the Choices.js CDN block updated. Konrad's exact ask (Checkpoint 1 feedback): 'Does it make sense to have this popup window for reports? Don't you think clicking on generate report should just default to current month and open the report page where users can adjust report filters?' → Yes. The pills do exactly that, one click in. Verification: grep -rn 'reportConfigModal\|_report_config_modal' core/ returns 0 hits. 47/47 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) --- core/templates/core/_report_config_modal.html | 160 ------------------ core/templates/core/index.html | 11 +- core/templates/core/report.html | 22 +-- 3 files changed, 9 insertions(+), 184 deletions(-) delete mode 100644 core/templates/core/_report_config_modal.html diff --git a/core/templates/core/_report_config_modal.html b/core/templates/core/_report_config_modal.html deleted file mode 100644 index 104d3c0..0000000 --- a/core/templates/core/_report_config_modal.html +++ /dev/null @@ -1,160 +0,0 @@ -{% comment %} - === REPORT CONFIGURATION MODAL (shared partial) === - Renders the "Generate Report" modal and its month-vs-custom-dates - toggle script. Included by both the Dashboard (index.html) and the - Report page (report.html) so users can launch a new report from - either place without duplicating the modal HTML or the JS. - - Requires in the parent template context: - - `projects` (queryset of Project, for the project dropdown) - - `teams` (queryset of Team, for the team dropdown) - - If those are missing, the dropdowns simply show "All Projects" / - "All Teams" — no crash. -{% endcomment %} - - - - - - -{# === CHOICES.JS — multi-select enhancement (admin-only) === #} -{# Loaded CDN-only; falls back to native #} -{# elements with Choices.js. Task 5 will delete _report_config_modal.html #} -{# which currently also loads this CDN; having it here keeps the pills #} -{# functional after retirement. Falls back to native multi-select if CDN #} -{# fails. SRI hashes match the ones used in the retired modal. #} +{# The pill popovers enhance their