From 0e270f0230ba3f16a36d67e945be03aef0ccb163 Mon Sep 17 00:00:00 2001 From: viking <163542798+Dev-v1@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:37:55 -0600 Subject: [PATCH] BeeBright 2.6 bugfix: immediate answers and floating feedback --- .../beebright-spelling-bee/frontend/src/App.jsx | 5 ++--- .../beebright-spelling-bee/frontend/src/styles.css | 6 ++++-- local/CHANGELOG.md | 5 +++++ local/release.json | 2 +- tools/test_local_ui.py | 3 ++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/App.jsx b/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/App.jsx index 9bc2333..e40cd7c 100644 --- a/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/App.jsx +++ b/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/App.jsx @@ -443,16 +443,15 @@ function App({ userId, getToken, isAdmin, onOpenSettings, onRequestList, localMo {mode === "type" &&

Type the word you hear.

} {mode === "choice" ? ( -
+
{feedback &&
{feedback === 'correct' ? : }
{feedback === 'correct' ? 'Correct' : 'Incorrect'}

Correct spelling: {currentWord}

Your choice: {answer}

}
{choices.map((choice, choiceIndex) => { const isCorrectChoice = feedback && choice.toLowerCase() === currentWord.toLowerCase(); const isWrongChoice = feedback === "incorrect" && answer === choice; - return ; + return ; })}
- {!feedback && }
) : (
setAnswer(event.target.value)} onKeyDown={(event) => event.key === "Enter" && checkAnswer()} placeholder="Type your spelling here" disabled={Boolean(feedback)} />
diff --git a/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/styles.css b/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/styles.css index b505107..8b364e5 100644 --- a/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/styles.css +++ b/BeeBright-Full-Stack/beebright-spelling-bee/frontend/src/styles.css @@ -109,7 +109,10 @@ button:disabled { cursor: not-allowed; opacity: .55; } .question-title, .prompt-sentence { margin: 30px 0 24px; font: 400 43px/1.12 "Libre Caslon Display", Georgia, serif; letter-spacing: -1.5px; } .prompt-sentence { font-size: 36px; line-height: 1.25; } .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; } -.choice-wrap > .feedback { margin: 0 0 18px; } +.choice-wrap { position: relative; isolation: isolate; } +.choice-wrap > .feedback { position: absolute; top: 50%; left: 50%; z-index: 3; width: min(400px, calc(100% - 20px)); margin: 0; transform: translate(-50%, -50%); border: 1px solid #94bba0; box-shadow: 0 18px 45px #17333a40, 0 3px 9px #17333a26; } +.choice-wrap > .feedback.incorrect { border-color: #dcae9e; } +.choice-wrap.is-answered .choices { opacity: .24; filter: blur(1px); } .feedback-copy .correct-spelling { display: block; margin-top: 4px; color: var(--ink); font-size: 22px; } .choice-next { margin-top: 22px; } .choices button { display: flex; align-items: center; gap: 13px; min-height: 64px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-weight: 600; text-align: left; } @@ -117,7 +120,6 @@ button:disabled { cursor: not-allowed; opacity: .55; } .choices button.right { border: 2px solid #5e9c6d; background: #e7f4e9; } .choices button.wrong { border: 2px solid var(--coral); background: #fff0eb; } .choices b { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #bac6c0; border-radius: 50%; color: #67777a; font-size: 10px; } -.check-button { margin-top: 16px; } .type-row { display: flex; gap: 10px; } .type-row input { flex: 1; min-width: 0; padding: 16px 18px; border: 1px solid #bdc9c3; border-radius: 9px; background: white; color: var(--ink); outline-color: var(--ink); } .hint-controls { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 31px; } diff --git a/local/CHANGELOG.md b/local/CHANGELOG.md index abcfad9..d03256d 100644 --- a/local/CHANGELOG.md +++ b/local/CHANGELOG.md @@ -1,5 +1,10 @@ # BeeBright releases +## 2.6 bugfix + +- Clicking a multiple-choice word checks it immediately. The extra Check answer button is removed from this mode. +- Correct or Incorrect appears on a raised panel in front of the dimmed choices, with the correct spelling above the selected spelling. Next word remains below the panel. + ## 2.6 - Origin hints show language paths without historical spellings, roots or cognates. Uncertain histories and compounds remain qualified instead of inventing a borrowing sequence. diff --git a/local/release.json b/local/release.json index db7b5b3..518ef6f 100644 --- a/local/release.json +++ b/local/release.json @@ -1 +1 @@ -{"name":"BeeBright","version":"2.6"} +{"name":"BeeBright","version":"2.6 bugfix"} diff --git a/tools/test_local_ui.py b/tools/test_local_ui.py index 0afa08f..3ed839d 100644 --- a/tools/test_local_ui.py +++ b/tools/test_local_ui.py @@ -85,9 +85,10 @@ def test(w): if mode=='Multiple Choice': chosen=w.evaluate_js("document.querySelector('.choices button').innerText.substring(1).trim()") w.evaluate_js("document.querySelector('.choices button').click()") - w.evaluate_js("document.querySelector('.check-button').click()") wait(w,"document.querySelector('.feedback') !== null") + assert w.evaluate_js("document.querySelector('.check-button')===null && Array.from(document.querySelectorAll('.choices button')).every(b=>b.disabled)") assert w.evaluate_js("document.querySelector('.choice-wrap > .feedback')!==null && document.querySelector('.feedback').compareDocumentPosition(document.querySelector('.choices')) & Node.DOCUMENT_POSITION_FOLLOWING") + assert w.evaluate_js("(()=>{const panel=document.querySelector('.choice-wrap > .feedback'),choices=document.querySelector('.choices'),p=panel.getBoundingClientRect(),c=choices.getBoundingClientRect();return getComputedStyle(panel).position==='absolute' && Number(getComputedStyle(panel).zIndex)>0 && getComputedStyle(choices).opacity<1 && p.topc.top && p.leftc.left;})()") assert w.evaluate_js("['Correct','Incorrect'].includes(document.querySelector('.feedback strong').innerText) && document.querySelector('.correct-spelling').innerText.length>0") assert w.evaluate_js("document.querySelectorAll('.feedback p')[0].innerText.startsWith('Correct spelling:') && document.querySelectorAll('.feedback p')[1].innerText.startsWith('Your choice:')") assert w.evaluate_js("document.querySelector('.feedback em').innerText")==chosen