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.
This commit is contained in:
11
src/app.js
11
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 = '<img src="./gear.svg" alt="" />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.");
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
<button id="redo-btn" class="btn btn-icon" title="Redo (Ctrl+Shift+Z)">↷</button>
|
||||
<button id="reset-code-btn" class="btn btn-icon" title="Reset to initial code">⟲</button>
|
||||
</div>
|
||||
<div class="validation-indicators-container"></div>
|
||||
<button id="run-btn" class="btn btn-run">
|
||||
<img src="./gear.svg" alt="" />Run
|
||||
</button>
|
||||
|
||||
17
src/main.css
17
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 {
|
||||
|
||||
Reference in New Issue
Block a user