From 5cdf1bc0334c1391edb77890a745f2179d69b23f Mon Sep 17 00:00:00 2001 From: ACodeGuy1002 Date: Sun, 30 Nov 2025 20:48:04 -0600 Subject: [PATCH 1/6] Start updating edit page --- src/edit/public/css/style.css | 36 +++++++++++++++++++++++++--------- src/edit/public/js/script.js | 37 ++++++++++++++++++++++++----------- src/edit/views/index.ejs | 4 ++-- 3 files changed, 55 insertions(+), 22 deletions(-) diff --git a/src/edit/public/css/style.css b/src/edit/public/css/style.css index a70ac21f..e6b43581 100644 --- a/src/edit/public/css/style.css +++ b/src/edit/public/css/style.css @@ -6,7 +6,6 @@ body { display: flex; gap: 10px; margin-bottom: 20px; - padding: 10px; /* Make sure padding aligns with other elements */ } @@ -16,36 +15,48 @@ body { display: flex; justify-content: space-between; align-items: center; - padding: 10px; border-bottom: 1px solid #ccc; flex-direction: column; margin: 5px 10px; /* Add horizontal margin to align with title */ - border: 1px solid #ddd; - border-radius: 4px; + border: 2px solid var(--accent); + background-color: var(--bg-alt); + border-radius: 10px; } .match-info { flex-grow: 1; + font-size: 1.5em; padding-left: 4px; display: flex; align-items: center; + justify-content: space-evenly; } .trash-button { background: none; border: none; cursor: pointer; - font-size: 16px; - color: red; + font-size: 1.7em; + color: var(--bg-alt); + background-color: #ff6666; margin-left: auto; display: flex; align-items: center; + height: 1.3em; + border-radius: 3em; + padding: 10px; +} + +.trash-button:hover { + background-color: #cf5353; + color: #e7e7e7; } .filter-input { padding: 8px; - border: 1px solid #ccc; + border: 2px solid var(--accent-alt); border-radius: 4px; + background-color: var(--bg-alt); flex: 1; } @@ -72,8 +83,14 @@ body { .dropdown-content { width: 100%; padding: 10px; - background-color: var(--bg); - border-top: 1px solid #ddd; + background-color: var(--bg-alt); + border-top: 2px solid var(--accent); + margin-bottom: 6px; + transition: visibility 0.5s; +} + +.dropdown-content:state(collapse) { + transition: visibility 0.5s; } .dropdown-content ul { @@ -89,6 +106,7 @@ body { .header { font: 2em/1em "Cairo"; } + #title { background-color: var(--bg); font: 2em/1em "Cairo"; diff --git a/src/edit/public/js/script.js b/src/edit/public/js/script.js index 2e016883..287e4d18 100644 --- a/src/edit/public/js/script.js +++ b/src/edit/public/js/script.js @@ -87,7 +87,7 @@ let oldAccessCode; filterContainer.classList.add("filter-container"); const scouterFilter = document.createElement("input"); - scouterFilter.placeholder = "Filter by Scouter ID"; + scouterFilter.placeholder = "Filter by Scouter Name"; scouterFilter.classList.add("filter-input"); const matchFilter = document.createElement("input"); @@ -137,17 +137,32 @@ let oldAccessCode; topRow.classList.add("match-item-top"); const dropdownButton = document.createElement("button"); - dropdownButton.textContent = "►"; + dropdownButton.textContent = "▶"; dropdownButton.classList.add("dropdown-button"); topRow.appendChild(dropdownButton); - const matchInfo = document.createElement("span"); - matchInfo.textContent = `Match: ${match.matchNumber}, Robot: ${match.robotNumber}, Scouter: ${match.scouterId}`; - matchInfo.classList.add("match-info"); - topRow.appendChild(matchInfo); + // const matchInfo = document.createElement("span"); + // matchInfo.textContent = `Match: ${match.matchNumber}, Robot: ${match.robotNumber}, Scouter: ${match.scouterId}`; + // matchInfo.classList.add("match-info"); + // topRow.appendChild(matchInfo); + + const matchNum = document.createElement("span"); + matchNum.textContent = `Match: ${match.matchNumber}`; + matchNum.classList.add("match-info"); + topRow.appendChild(matchNum); + + const matchRobot = document.createElement("span"); + matchRobot.textContent = `Robot: ${match.robotNumber}`; + matchRobot.classList.add("match-info"); + topRow.appendChild(matchRobot); + + const matchScouter = document.createElement("span"); + matchScouter.textContent = `Scouter: ${match.scouterId}`; + matchScouter.classList.add("match-info"); + topRow.appendChild(matchScouter); const trashButton = document.createElement("button"); - trashButton.textContent = "🗑️"; + trashButton.textContent = "X"; trashButton.classList.add("trash-button"); topRow.appendChild(trashButton); @@ -156,7 +171,7 @@ let oldAccessCode; // Add dropdown content after the top row const dropdownContent = document.createElement("div"); dropdownContent.classList.add("dropdown-content"); - dropdownContent.style.display = "none"; + dropdownContent.style.visibility = "collapse"; listItem.appendChild(dropdownContent); // Format and display actionQueue data @@ -176,9 +191,9 @@ let oldAccessCode; // Toggle dropdown on button click dropdownButton.onclick = () => { - const isHidden = dropdownContent.style.display === "none"; - dropdownContent.style.display = isHidden ? "block" : "none"; - dropdownButton.textContent = isHidden ? "▼" : "►"; + const isHidden = dropdownContent.style.visibility == "collapse"; + dropdownContent.style.visibility = isHidden ? "visible" : "collapse"; + dropdownButton.textContent = isHidden ? "▼" : "▶"; }; trashButton.onclick = async () => { diff --git a/src/edit/views/index.ejs b/src/edit/views/index.ejs index 2f3ec36a..a8113d2e 100644 --- a/src/edit/views/index.ejs +++ b/src/edit/views/index.ejs @@ -45,11 +45,11 @@ href="https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;700&family=Saira:wght@300;400;700&family=Tajawal:wght@300;400;700&display=swap" rel="stylesheet" /> - Match Performances + SPOT - Edit
-
Match Performances
+
Scouter Data
From 943265e62167a8a6864ea0f4c0a059a4615f502b Mon Sep 17 00:00:00 2001 From: ACoderGuy1002 Date: Tue, 9 Dec 2025 09:25:56 -0600 Subject: [PATCH 2/6] I forgot to commit --- src/edit/public/css/style.css | 25 +++++++++++++++++++------ src/edit/public/js/script.js | 16 ++++++++-------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/edit/public/css/style.css b/src/edit/public/css/style.css index e6b43581..732a73cd 100644 --- a/src/edit/public/css/style.css +++ b/src/edit/public/css/style.css @@ -23,7 +23,25 @@ body { border-radius: 10px; } -.match-info { +.match-num { + flex-grow: 1; + font-size: 1.5em; + padding-left: 4px; + display: flex; + align-items: center; + justify-content: space-evenly; +} + +.match-robot { + flex-grow: 1; + font-size: 1.5em; + padding-left: 4px; + display: flex; + align-items: center; + justify-content: space-evenly; +} + +.match-scouter { flex-grow: 1; font-size: 1.5em; padding-left: 4px; @@ -86,11 +104,6 @@ body { background-color: var(--bg-alt); border-top: 2px solid var(--accent); margin-bottom: 6px; - transition: visibility 0.5s; -} - -.dropdown-content:state(collapse) { - transition: visibility 0.5s; } .dropdown-content ul { diff --git a/src/edit/public/js/script.js b/src/edit/public/js/script.js index 287e4d18..79f2a484 100644 --- a/src/edit/public/js/script.js +++ b/src/edit/public/js/script.js @@ -137,7 +137,7 @@ let oldAccessCode; topRow.classList.add("match-item-top"); const dropdownButton = document.createElement("button"); - dropdownButton.textContent = "▶"; + dropdownButton.textContent = "►"; dropdownButton.classList.add("dropdown-button"); topRow.appendChild(dropdownButton); @@ -148,17 +148,17 @@ let oldAccessCode; const matchNum = document.createElement("span"); matchNum.textContent = `Match: ${match.matchNumber}`; - matchNum.classList.add("match-info"); + matchNum.classList.add("match-num"); topRow.appendChild(matchNum); const matchRobot = document.createElement("span"); matchRobot.textContent = `Robot: ${match.robotNumber}`; - matchRobot.classList.add("match-info"); + matchRobot.classList.add("match-robot"); topRow.appendChild(matchRobot); const matchScouter = document.createElement("span"); matchScouter.textContent = `Scouter: ${match.scouterId}`; - matchScouter.classList.add("match-info"); + matchScouter.classList.add("match-scouter"); topRow.appendChild(matchScouter); const trashButton = document.createElement("button"); @@ -171,7 +171,7 @@ let oldAccessCode; // Add dropdown content after the top row const dropdownContent = document.createElement("div"); dropdownContent.classList.add("dropdown-content"); - dropdownContent.style.visibility = "collapse"; + dropdownContent.style.display = "none"; listItem.appendChild(dropdownContent); // Format and display actionQueue data @@ -191,9 +191,9 @@ let oldAccessCode; // Toggle dropdown on button click dropdownButton.onclick = () => { - const isHidden = dropdownContent.style.visibility == "collapse"; - dropdownContent.style.visibility = isHidden ? "visible" : "collapse"; - dropdownButton.textContent = isHidden ? "▼" : "▶"; + const isHidden = dropdownContent.style.display === "none"; + dropdownContent.style.display = isHidden ? "block" : "none"; + dropdownButton.textContent = isHidden ? "▼" : "►"; }; trashButton.onclick = async () => { From 2d9960c8bd7ad2a8db8c7a8e9fbaccc5badc8c66 Mon Sep 17 00:00:00 2001 From: ACoderGuy1002 Date: Tue, 9 Dec 2025 10:04:50 -0600 Subject: [PATCH 3/6] Trying more CSS --- src/edit/public/css/style.css | 43 ++++++++++++----------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/src/edit/public/css/style.css b/src/edit/public/css/style.css index 732a73cd..18ba86f3 100644 --- a/src/edit/public/css/style.css +++ b/src/edit/public/css/style.css @@ -24,45 +24,41 @@ body { } .match-num { - flex-grow: 1; - font-size: 1.5em; - padding-left: 4px; - display: flex; - align-items: center; - justify-content: space-evenly; + margin-left: 5em; +} + +.match-scouter { + margin-right: 5em; } .match-robot { - flex-grow: 1; - font-size: 1.5em; - padding-left: 4px; - display: flex; - align-items: center; - justify-content: space-evenly; + margin-left: 10em; + margin-right: 10em; } -.match-scouter { - flex-grow: 1; - font-size: 1.5em; - padding-left: 4px; +.match-item-top { display: flex; align-items: center; - justify-content: space-evenly; + padding: 10px; + gap: 0; + width: 100%; + font-size: 1.5em; } .trash-button { background: none; border: none; cursor: pointer; - font-size: 1.7em; + font-size: 1.2em; color: var(--bg-alt); background-color: #ff6666; - margin-left: auto; display: flex; align-items: center; height: 1.3em; border-radius: 3em; padding: 10px; + margin-right: none; + padding-right: none; } .trash-button:hover { @@ -78,15 +74,6 @@ body { flex: 1; } -.match-item-top { - display: flex; - align-items: center; - padding: 10px; - gap: 0; - width: 100%; - justify-content: flex-start; -} - .dropdown-button { padding: 2px; cursor: pointer; From 53ddc8e9bb3ac974ebd687ee71959f3dd4dd9b70 Mon Sep 17 00:00:00 2001 From: ACoderGuy1002 Date: Mon, 5 Jan 2026 15:55:43 -0600 Subject: [PATCH 4/6] Committing just for branch change purposes --- src/edit/public/css/style.css | 15 ++++----------- src/edit/public/js/script.js | 6 +++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/edit/public/css/style.css b/src/edit/public/css/style.css index 18ba86f3..1cbd17ed 100644 --- a/src/edit/public/css/style.css +++ b/src/edit/public/css/style.css @@ -23,17 +23,9 @@ body { border-radius: 10px; } -.match-num { - margin-left: 5em; -} - -.match-scouter { - margin-right: 5em; -} - -.match-robot { - margin-left: 10em; - margin-right: 10em; +.match-info { + margin-left: auto; + margin-right: auto; } .match-item-top { @@ -49,6 +41,7 @@ body { background: none; border: none; cursor: pointer; + margin-left: auto; font-size: 1.2em; color: var(--bg-alt); background-color: #ff6666; diff --git a/src/edit/public/js/script.js b/src/edit/public/js/script.js index 79f2a484..fbf11bfe 100644 --- a/src/edit/public/js/script.js +++ b/src/edit/public/js/script.js @@ -148,17 +148,17 @@ let oldAccessCode; const matchNum = document.createElement("span"); matchNum.textContent = `Match: ${match.matchNumber}`; - matchNum.classList.add("match-num"); + matchNum.classList.add("match-info"); topRow.appendChild(matchNum); const matchRobot = document.createElement("span"); matchRobot.textContent = `Robot: ${match.robotNumber}`; - matchRobot.classList.add("match-robot"); + matchRobot.classList.add("match-info"); topRow.appendChild(matchRobot); const matchScouter = document.createElement("span"); matchScouter.textContent = `Scouter: ${match.scouterId}`; - matchScouter.classList.add("match-scouter"); + matchScouter.classList.add("match-info"); topRow.appendChild(matchScouter); const trashButton = document.createElement("button"); From 981a04fb58ebb31c3d12fefb148654d748182d41 Mon Sep 17 00:00:00 2001 From: ACoderGuy1002 Date: Mon, 5 Jan 2026 17:25:51 -0600 Subject: [PATCH 5/6] Committing to pull --- src/edit/public/js/script.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/edit/public/js/script.js b/src/edit/public/js/script.js index fbf11bfe..398ff29c 100644 --- a/src/edit/public/js/script.js +++ b/src/edit/public/js/script.js @@ -26,8 +26,6 @@ let oldAccessCode; tmps = [...tmps, ...qrcodeTmps]; } - console.log(tmps); - return tmps; } @@ -179,8 +177,6 @@ let oldAccessCode; const actionList = document.createElement("ul"); match.actionQueue.forEach((action, index) => { const actionItem = document.createElement("li"); - actionItem.textContent = `${index + 1}. ${action.id}`; - actionList.appendChild(actionItem); }); dropdownContent.appendChild(actionList); } else { From c2a56b54a5d5c550040bce650073347aefc34342 Mon Sep 17 00:00:00 2001 From: Luke Date: Mon, 5 Jan 2026 17:46:15 -0600 Subject: [PATCH 6/6] Work out how to display better data in /edit --- src/edit/public/js/script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/edit/public/js/script.js b/src/edit/public/js/script.js index 398ff29c..b670f79b 100644 --- a/src/edit/public/js/script.js +++ b/src/edit/public/js/script.js @@ -1,6 +1,7 @@ let oldAccessCode; (async () => { let dataset; + let transformers; console.log("Loading data..."); function showFade(element) { @@ -173,6 +174,7 @@ let oldAccessCode; listItem.appendChild(dropdownContent); // Format and display actionQueue data + if (match.actionQueue && match.actionQueue.length > 0) { const actionList = document.createElement("ul"); match.actionQueue.forEach((action, index) => {