Repository navigation
Switch to the pen when choosing a drawing color - #460
Conversation
Don't include screenshots that contain only plain text. |
jserv
left a comment
There was a problem hiding this comment.
Rebase latest main branch and explain how the CI result changes.
The gates (browser) failure here is Strict delayed judge language restoration respects end in tests/browser/strict-selection.test.js. This branch did not break it: the test was flaky on main itself. After End it waited for the ending overlay, but its room has no interviewer, so the offline summary replaced that overlay a moment later and a loaded runner missed the window. #461 (merge b0059b2) fixed the test by pausing a fake clock before End, and main passes the browser lane again at that commit. This branch is based on a commit before b0059b2, so it still runs the old test. After rebasing, reply here with the new CI result, and if anything still fails, say whether it comes from this branch or also fails on main.
jserv
left a comment
There was a problem hiding this comment.
Before asking someone to review, you MUST resolve any regressions flagged by GitHub Actions.
jserv
left a comment
There was a problem hiding this comment.
Rebase latest main branch.
The gates (browser) failure here is the lobby fits on one screen instead of a wall of problems (tests/browser/lobby.test.js). This branch did not cause it: the lobby overflowed the 800px viewport by 5px on CI fonts on main itself. #478 fixed that (trimmed the credits spacing in web/styles.css and hardened the test), so rebasing picks up the fix.
After the rebase, confirm gates (browser) is green. If it still fails on a different test, explain that failure in a comment.
ColtenOuO
left a comment
There was a problem hiding this comment.
The rest of the changes look good to me.
Choosing a color while erasing leaves the eraser active, so drawing still erases instead of using the selected color. Make selecting a color return to the pen and keep the toolbar state consistent.
The existing regression test starts by selecting Eraser without first drawing or erasing a stroke. Add those steps to match the reported interaction and the requested reproduction sequence. Verify that the extended test fails against the upstream board implementation and passes with the fix. Production code is unchanged.
Check the initial color and red selection exclusively, so stale pressed states on other colors cannot pass the browser test.
|
Thank @Aa99841 for contributing! |
|
Although this has already been merged, just a quick reminder that changes addressing review comments don't need separate commits, please just amend the previous commit and update the commit message accordingly. |
Selecting a pen color in Example drawing currently leaves Eraser active, so subsequent strokes keep erasing. Make color selection activate Pen and synchronize the tool and color buttons' aria-pressed states. Selecting Eraser preserves the chosen color for the next Pen stroke.
Add a browser regression test covering drawing, erasing, selecting a color, and drawing again. It checks the resulting stroke's color and width, toolbar selection, and preservation of the selected color when switching tools.
Validation
taskset -c 0-3 ./scripts/test.shpassed the complete gate with exit code 0: all 1741 Node tests passed without skips, and the remaining checks, including the dependency advisory scan, completed successfully. No tests were excluded, and no assertions or timeouts were changed.Before
Selecting a color leaves Eraser active.
test_before.mp4
After
Selecting a color activates Pen and draws in that color.
test_case.mp4
Closes #437
Summary by cubic
Selecting a drawing color while Eraser is active now switches to Pen, so the next stroke draws in the selected color instead of erasing. Tool and color buttons'
aria-pressedstates stay synchronized, and choosing Eraser still preserves the selected color for the next Pen stroke.Adds a browser regression test covering drawing, erasing, picking a color, and drawing again. It verifies the resulting stroke's color and width, toolbar selection, and color preservation across tool switches.
Written for commit 557e6c5. Summary will update on new commits.