Repository navigation
fix(note-editor): allow toolbar button cursor at extremities - #22663
david-allison merged 1 commit into
Conversation
Editing a toolbar button did not allow either field to be blank. But this was useful: `<br>` would want the cursor to be placed afterwards. Fixes 22660 Assisted-by: GPT-6-Astra xhigh Assisted-by: GPT-6.1-Sol xhigh
|
Snapshot diff report vs
All 1 changed screenshotsAnkiDroid/DeckPickerTabletScreenshotTest/diffs
|
mikehardy
left a comment
There was a problem hiding this comment.
Assisted-by: grok-4.7-medium
Thanks for fixing the edit-toolbar blank-side case — this matches how create already behaved.
Checked out the PR branch, rebased cleanly onto current ankidroid/main, and did not push (reviewed GitHub head 0159157e36b16ea572ffb165183a6deb9709dc64). Locally ran buildSrc tests, lintAll / ktlintCheck / lint-rules:test, jacocoUnitTestReport (including new NoteEditorToolbarTest), and release emulator tests on API 36 Google APIs Play 16K (emulator-5554); all green on the rebased replay.
displayEditToolbarDialog now saves the dialog’s before/after strings as-is instead of restoring empty fields from the old button, enables Save only when at least one side is non-blank, and keeps TextWrapper caret placement at the start or end of a <br> insertion. New unit tests cover caret position and Save enabled state.
some acceptable findings, no action required, just leaving for posterity: Approach template still placeholder; commit subject could be shorter; no inline error when both fields are blank.
Screenshot changes have been detected, so leaving this for a good manual look.
|
Screenshot is a flake, this can go |
Note
Assisted-by: GPT-6-Astra xhigh
Purpose / Description
Editing a toolbar button did not allow either field to be blank.
But this was useful:
<br>would want the cursor to be placed afterwards.Fixes
Approach
How does this change address the problem?
How Has This Been Tested?
Unit tested
Checklist