Skip to content

fix(card-template-editor): keep all content above the keyboard - #21805

Merged
mikehardy merged 1 commit into
ankidroid:mainfrom
david-allison:21795
Sep 18, 2026
Merged

mikehardy merged 1 commit into
ankidroid:mainfrom
david-allison:21795

Conversation

@david-allison

@david-allison david-allison commented Sep 9, 2026

Copy link
Copy Markdown
Member

Note

Assisted-by: GPT-6 - all

Fixes

Approach

Apply keyboard insets to the bottom navigation so all content is visible

Add regression coverage for phones, tablets and switching cards.

How Has This Been Tested?

Phyiscal test on an API 37 emulator

Screenshot tests: [snipped due to edits; see output below]

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

@david-allison david-allison added this to the 2.25 release milestone Sep 9, 2026
@david-allison david-allison added the Review High Priority Request for high priority review label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

  • CardTemplateEditorScreenshotTest: 3 changes
All 3 changed screenshots

CardTemplateEditorScreenshotTest

  • keyboard_closed_compare.png
  • keyboard_compare.png
  • physical_keyboard_software_keyboard_compare.png

binding.bottomNavigation.isVisible = !softwareKeyboardVisible
val bottomInset = insets.getInsets(systemBars() or displayCutout() or ime()).bottom
view.updatePadding(
bottom = if (softwareKeyboardVisible) bottomInset else 0,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was considering:

top = if (softwareKeyboardVisible) 0 else initial.padding.top,               

But for smaller templates, the reduction of padding felt like too much of a layout shift

@david-allison

This comment was marked as resolved.

Apply keyboard insets to the bottom navigation so all content is visible

Add regression coverage for phones, tablets and switching cards.

Fixes 21795

Assisted-by: GPT-6 - all
Assisted-by: Claude Opus 5 - text fixup

@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.

tough to review - the screenshots were a difficult to parse, but it looked good when I pulled it locally for verify

@mikehardy
mikehardy added this pull request to the merge queue Sep 18, 2026
@mikehardy mikehardy added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Review High Priority Request for high priority review Needs Review labels Sep 18, 2026
Merged via the queue into ankidroid:main with commit c458a11 Sep 18, 2026
22 checks passed
@github-actions github-actions Bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Sep 18, 2026
@david-allison

Copy link
Copy Markdown
Member Author

screenshots were a difficult to parse

That's not ideal
Any nitpicks which I should handle in a follow up?

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.

Keyboard covers the template editor

2 participants