Prototype Evaluation Sheet Generator

Prototype Evaluation Sheet Generator

Project Comet - Usability Evaluation

2025-10-28
Jane Doe (UX Researcher)
3

Average Performance Summary (Scale 1-5)

N/A
Average Success Score
N/A
Average Usability Rating
N/A
Average User Confidence

Prototype Health (Averages)

Detailed Task Evaluation

Task Success (1-5) Usability (1-5) Confidence (1-5) Notes

Session Setup

Add New Task Evaluation

Current Evaluations

No evaluations logged yet.

"; } appState.evaluations.forEach(eval => { const item = document.createElement("div"); item.className = "pes-evaluation-item"; item.innerHTML = ` Task: ${eval.task} (Success: ${eval.success}/5) `; evaluationsList.appendChild(item); }); } function renderDashboardTab() { const averages = calculateAverages(); projectTitleDisplay.textContent = appState.projectName; displayDate.textContent = appState.sessionDate; displayTester.textContent = appState.tester; totalTasks.textContent = averages.count; avgSuccess.textContent = averages.count > 0 ? averages.success : 'N/A'; avgUsability.textContent = averages.count > 0 ? averages.usability : 'N/A'; avgConfidence.textContent = averages.count > 0 ? averages.confidence : 'N/A'; // Update Chart updateRadarChart(averages); // Render Table logTableBody.innerHTML = ""; if (appState.evaluations.length === 0) { logTableBody.innerHTML = "No tasks evaluated yet."; return; } appState.evaluations.forEach(eval => { const tr = document.createElement("tr"); tr.innerHTML = ` ${eval.task} ${eval.success} ${eval.usability} ${eval.confidence} ${eval.notes || '---'} `; logTableBody.appendChild(tr); }); } // --- Event Handlers --- // Update Dashboard Button updateBtn.addEventListener("click", () => { appState.projectName = configProject.value; appState.sessionDate = configDate.value; appState.tester = configTester.value; saveState(); renderDashboardTab(); showTab(0); }); // Add Evaluation addEvalBtn.addEventListener("click", () => { const task = evalTaskInput.value.trim(); const success = parseInt(evalSuccessInput.value); const usability = parseInt(evalUsabilityInput.value); const confidence = parseInt(evalConfidenceInput.value); const notes = evalNotesInput.value.trim(); if (!task || isNaN(success) || isNaN(usability) || isNaN(confidence)) { alert("Please enter the Task Name and all three numeric ratings (1-5)."); return; } if (success < 1 || success > 5 || usability < 1 || usability > 5 || confidence < 1 || confidence > 5) { alert("Ratings must be between 1 and 5."); return; } const newEval = { id: Date.now(), task: task, success: success, usability: usability, confidence: confidence, notes: notes }; appState.evaluations.push(newEval); saveState(); renderConfigTab(); // Clear form evalTaskInput.value = ""; evalNotesInput.value = ""; // Reset ratings to default/average start evalSuccessInput.value = "3"; evalUsabilityInput.value = "3"; evalConfidenceInput.value = "3"; }); // Remove Evaluation (Event Delegation) evaluationsList.addEventListener("click", (e) => { if (e.target.classList.contains("pes-remove-btn")) { const id = parseInt(e.target.dataset.id); appState.evaluations = appState.evaluations.filter(eval => eval.id !== id); saveState(); renderConfigTab(); } }); // PDF Download pdfBtn.addEventListener("click", () => { const { jsPDF } = window.jspdf; const fileName = `${appState.projectName.replace(/ /g, '_')}_Evaluation_Sheet.pdf`; html2canvas(exportArea, { scale: 2, useCORS: true, backgroundColor: '#ffffff' }).then(canvas => { const imgData = canvas.toDataURL('image/png'); const doc = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pdfWidth = doc.internal.pageSize.getWidth(); const pdfHeight = doc.internal.pageSize.getHeight(); const imgProps = doc.getImageProperties(imgData); const imgWidth = imgProps.width; const imgHeight = imgProps.height; const margin = 40; const usableWidth = pdfWidth - (2 * margin); const ratio = usableWidth / imgWidth; let scaledHeight = imgHeight * ratio; // For multi-page export (required for lengthy reports) let heightLeft = scaledHeight; let position = margin; doc.addImage(imgData, 'PNG', margin, position, usableWidth, scaledHeight); heightLeft -= (pdfHeight - (2 * margin)); // Subtract first page content area while (heightLeft > 0) { position = margin - heightLeft; doc.addPage(); doc.addImage(imgData, 'PNG', margin, position, usableWidth, scaledHeight); heightLeft -= (pdfHeight - (2 * margin)); } doc.save(fileName); }).catch(err => { console.error("PES PDF Error:", err); // alert("An error occurred while generating the PDF."); // Per spec }); }); // --- Local Storage --- function saveState() { try { localStorage.setItem("pesAppState", JSON.stringify(appState)); } catch (e) { console.warn("PES: Could not save state."); } } function loadState() { try { const storedState = localStorage.getItem("pesAppState"); if (storedState) appState = JSON.parse(storedState); } catch (e) { console.warn("PES: Could not load state."); } } // --- Initial Load --- loadState(); renderConfigTab(); renderDashboardTab(); showTab(0); });
Scroll to Top