65 lines
2.3 KiB
Markdown
65 lines
2.3 KiB
Markdown
# Speaking Lab Study Toolbar Polish Implementation Plan
|
|
|
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
|
|
**Goal:** Center the main sentence controls, enlarge the loop toggle, remove continue/watch-later actions from the study toolbar, and polish the study page visual consistency.
|
|
|
|
**Architecture:** Update `study.html` toolbar zones, remove now-unused visible bindings from `app.js`, and restyle the toolbar in `styles.css`. Keep existing recording, favorite, sentence navigation, and loop behavior.
|
|
|
|
**Tech Stack:** Vanilla HTML, CSS, JavaScript.
|
|
|
|
---
|
|
|
|
## Task 1: Update Toolbar Markup
|
|
|
|
**Files:**
|
|
- Modify: `F:\ooo\speaking-practice-local\study.html`
|
|
|
|
- [ ] Replace toolbar content with three zones:
|
|
- `.recording-controls`: `录音 / 停止 / 回放`
|
|
- `.sentence-controls`: `上一句 / 重播 / 下一句`
|
|
- `.study-side-actions`: enlarged loop toggle and `收藏`
|
|
|
|
## Task 2: Remove Deleted Button Bindings
|
|
|
|
**Files:**
|
|
- Modify: `F:\ooo\speaking-practice-local\app.js`
|
|
|
|
- [ ] Remove `continueBtn` and `watchLaterBtn` DOM references.
|
|
- [ ] Remove event listeners for `continueLearning` and `watchLater`.
|
|
- [ ] Remove visible text updates for `watchLaterBtn`.
|
|
- [ ] Guard or remove `renderContinueAction()` calls so no missing element is referenced.
|
|
|
|
## Task 3: Style Unified Toolbar
|
|
|
|
**Files:**
|
|
- Modify: `F:\ooo\speaking-practice-local\styles.css`
|
|
|
|
- [ ] Make `.tool-row` a three-column grid: left, center, right.
|
|
- [ ] Style `.sentence-controls` as the centered primary control group.
|
|
- [ ] Style `.recording-controls` as secondary.
|
|
- [ ] Enlarge `.toggle` inside `.study-side-actions`.
|
|
- [ ] Keep narrow viewport wrapping without horizontal overflow.
|
|
|
|
## Task 4: Verify
|
|
|
|
Run:
|
|
|
|
```powershell
|
|
node --check app.js
|
|
node --check home.js
|
|
node --check admin.js
|
|
python -m py_compile backend\main.py backend\db.py
|
|
node tests\progress-helpers.test.mjs
|
|
node tests\admin-file-input.test.mjs
|
|
```
|
|
|
|
Browser check:
|
|
|
|
- Open `http://127.0.0.1:8000/study.html`.
|
|
- Confirm `继续学习` and `稍后再看` are gone.
|
|
- Confirm `上一句 / 重播 / 下一句` are centered.
|
|
- Confirm loop toggle is larger.
|
|
- Confirm favorite remains.
|
|
- Confirm no horizontal overflow.
|