From 8d5e126258b37844d7b067a1a9b36d3691165c90 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 24 Dec 2025 00:17:28 +0100 Subject: [PATCH] fix: remove unused validation percentage indicator The 0% indicator next to the Run button was not providing useful feedback. Removed from HTML, CSS, and app.js. --- src/app.js | 11 ----------- src/index.html | 1 - src/main.css | 17 ----------------- 3 files changed, 29 deletions(-) diff --git a/src/app.js b/src/app.js index 5adbec9..a42b80a 100644 --- a/src/app.js +++ b/src/app.js @@ -27,7 +27,6 @@ const elements = { redoBtn: document.getElementById("redo-btn"), resetCodeBtn: document.getElementById("reset-code-btn"), hintArea: document.getElementById("hint-area"), - validationIndicators: document.querySelector(".validation-indicators-container"), editorContent: document.querySelector(".editor-content"), codeEditor: document.querySelector(".code-editor"), @@ -294,9 +293,6 @@ function loadCurrentLesson() { codeEditor.setValue(engineState.userCode); } - // Reset validation indicators - elements.validationIndicators.innerHTML = ""; - // Update Run button text based on completion status if (engineState.isCompleted) { elements.runBtn.innerHTML = 'Re-run'; @@ -389,7 +385,6 @@ function resetCode() { // Clear hints and success indicators clearHint(); resetSuccessIndicators(); - elements.validationIndicators.innerHTML = ""; } function runCode() { @@ -408,12 +403,6 @@ function runCode() { // Validate code using LessonEngine const validationResult = lessonEngine.validateCode(); - // Update validation indicators - if (validationResult.totalCases > 0) { - const percent = Math.round((validationResult.validCases / validationResult.totalCases) * 100); - elements.validationIndicators.innerHTML = `${percent}%`; - } - if (validationResult.isValid) { // Show success hint showSuccessHint(validationResult.message || "Great job! Your code works correctly."); diff --git a/src/index.html b/src/index.html index dbc61e5..8a25ddb 100644 --- a/src/index.html +++ b/src/index.html @@ -47,7 +47,6 @@ -
diff --git a/src/main.css b/src/main.css index d9c2f5b..ee15ade 100644 --- a/src/main.css +++ b/src/main.css @@ -810,23 +810,6 @@ input:checked + .toggle-slider::before { color: var(--text-color); } -/* ================= VALIDATION INDICATORS ================= */ -.validation-indicators-container { - display: flex; - gap: 4px; -} - -.validation-success-indicator { - background: var(--success-color); - color: white; - width: 18px; - height: 18px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - font-size: 10px; -} /* ================= MODAL ================= */ .modal-container {