Add keyboard shortcuts for whiteboard tools
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- css, html, javascript
- Bereich
- accessibility, frontend
Rechercherichtung
Start with the existing whiteboard keyboard event listener and tool-selection functions in web/interview.js, then inspect the toolbar markup in web/interview.html and styles in web/styles.css. Add browser coverage in tests/browser/whiteboard-shortcuts.test.js for switching tools, cycling colors and sizes, returning from text mode, and ignoring typing, repeats, and shortcuts outside the whiteboard. Done when the visible labels and all listed shortcut behaviors work.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
The whiteboard toolbar currently requires users to click the pen, eraser, or text controls to switch tools. Add keyboard shortcuts so users can switch tools and adjust pen colors or eraser sizes from the keyboard.
The toolbar should also display small, always visible key labels beside the relevant controls so users can discover the shortcuts.
Expected Behavior
- Press P to switch to the pen. If the pen is already selected, pressing P cycles through black, red, blue, and green.
- Press E to switch to the eraser. If the eraser is already selected, pressing E cycles through its available sizes.
- Press T to switch to the text tool. Pressing T again returns to the previously used pen or eraser.
- Display P, E, and T key labels beside the pen, eraser, and text controls.
- Do not trigger shortcuts while the user is typing in a text input or text label.
- Ignore held-key repeats so one press only changes the color or size once.
- Only handle these shortcuts while the user is interacting with the whiteboard.
Proposed Solution
- In
web/interview.js, handle P, E, and T key presses in the whiteboard’s existing keyboard event listener. Reuse the current tool-selection functions to switch tools, cycle pen colors or eraser sizes, and return from the text tool to the previously selected pen or eraser. Ignore repeated key events and events from text inputs or editable elements, and only respond when the user is interacting with the whiteboard. - In
web/interview.html, add always visible P, E, and T labels beside the pen, eraser, and text controls so users can discover the shortcuts. - In
web/styles.css, style the labels as small keycaps that fit the existing toolbar. - In
tests/browser/whiteboard-shortcuts.test.js, add browser tests for tool switching, color and size cycling, returning from text mode, and ignoring shortcuts while typing, holding a key, or outside the whiteboard.
Example
- Vorherrschende Sprache
- Rust
- Sterne
- 223
- Forks
- 148
- Ø Merge
- 1 T. 7 Std.
- Gemergte PRs (30 T.)
- 225
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sysprog21/codetrial
-
Show recorded scores in past attempt rowsEvtl. vergeben @liehcheng hat das vor 1 Tag übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
sysprog21/codetrial#604 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Let candidates filter problems to their saved listEvtl. vergeben @hszzt hat das heute übernommen. Offen
sysprog21/codetrial#616 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Report credits an inaccurate problem restatement as a strengthEvtl. vergeben @jserv hat das vor 1 Tag übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
sysprog21/codetrial#613 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Jim's compact card covers a text box's controls on an expanded Example drawingEvtl. vergeben @Disesfgewu hat das vor 1 Tag übernommen. Offen
sysprog21/codetrial#609 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sysprog21/codetrial
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
RustCrypto/utils#1597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
max-sixty/worktrunk#4727 · 7 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
carrick-sh/carrick#1859 ·
Maintainer antworten meist innerhalb von 1 Tag