From a8fe4477f1ed7f6f6900b496206bcd545c689bc6 Mon Sep 17 00:00:00 2001 From: Tudor Date: Tue, 13 Jan 2026 15:12:11 +0000 Subject: [PATCH] Added warning about lack of progress results, moved add to compare button --- .gitignore | 1 + frontend/app.js | 61 +++++++++++++++++++++++++++++++++--------- frontend/index.html | 2 +- frontend/styles.css | 65 ++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 113 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 5ceb386..100ba7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ venv +backend/__pycache__ diff --git a/frontend/app.js b/frontend/app.js index 6eaa211..5bd3c55 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -118,6 +118,15 @@ const TERM_DEFINITIONS = { }, }; +// Warning definitions for alerts/notices +const WARNING_DEFINITIONS = { + progress_scores_unavailable: { + title: "Progress Scores Unavailable", + description: + "The DfE will not publish primary school progress measures for 2023-24 or 2024-25, as KS1 SATs were cancelled in 2020 and 2021.", + }, +}; + /** * Creates an info trigger button for a term tooltip * @param {string} termKey - Key from TERM_DEFINITIONS @@ -132,6 +141,20 @@ function createInfoTrigger(termKey) { return ``; } +/** + * Creates a warning trigger button for warning tooltips + * @param {string} warningKey - Key from WARNING_DEFINITIONS + * @returns {string} HTML string for the warning trigger + */ +function createWarningTrigger(warningKey) { + const definition = WARNING_DEFINITIONS[warningKey]; + if (!definition) return ""; + + const label = definition.title; + + return ``; +} + // Map instances (stored to allow cleanup) const schoolMaps = new Map(); @@ -1368,7 +1391,7 @@ async function openSchoolModal(urn) {