Skip to content

fix(note-editor): allow toolbar button cursor at extremities - #22663

Merged
david-allison merged 1 commit into
ankidroid:mainfrom
david-allison:air/backend-bump-classloader-3f52eefe-a27
Oct 22, 2026
Merged

david-allison merged 1 commit into
ankidroid:mainfrom
david-allison:air/backend-bump-classloader-3f52eefe-a27

Conversation

@david-allison

@david-allison david-allison commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

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

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

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
@david-allison david-allison added Blocked by dependency Currently blocked by some other dependent / related change Needs Author Reply Waiting for a reply from the original author and removed Blocked by dependency Currently blocked by some other dependent / related change labels Oct 21, 2026
@david-allison david-allison reopened this Oct 22, 2026
@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Snapshot diff report vs main. Open screenshot-diff for diffs.

  • AnkiDroid/DeckPickerTabletScreenshotTest/diffs: 1 change
All 1 changed screenshots

AnkiDroid/DeckPickerTabletScreenshotTest/diffs

  • keyboard_open_compare.png

@mikehardy mikehardy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mikehardy mikehardy added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Oct 22, 2026
@david-allison
david-allison added this pull request to the merge queue Oct 22, 2026
@david-allison

Copy link
Copy Markdown
Member Author

Screenshot is a flake, this can go

Merged via the queue into ankidroid:main with commit 3aacf26 Oct 22, 2026
44 of 47 checks passed
@github-actions github-actions Bot removed the Needs Second Approval Has one approval, one more approval to merge label Oct 22, 2026
@github-actions github-actions Bot added this to the 2.26 release milestone Oct 22, 2026
@david-allison
david-allison deleted the air/backend-bump-classloader-3f52eefe-a27 branch October 22, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Note Editor Toolbar buttons: if editing, cursor is unsupported at extremities

2 participants