Fix: Make template editing undoable to preserve undo history#19489
Closed
7se7en72025 wants to merge 3 commits intoankidroid:mainfrom
Closed
Fix: Make template editing undoable to preserve undo history#194897se7en72025 wants to merge 3 commits intoankidroid:mainfrom
7se7en72025 wants to merge 3 commits intoankidroid:mainfrom
Conversation
added 2 commits
November 16, 2025 11:10
This commit makes template editing operations undoable by wrapping the save operation in undoableOp. This ensures that template changes are properly tracked in the undo history, allowing users to undo template edits. Changes: - Updated CardTemplateNotetype.saveToDatabase() to be a suspend function that wraps the save operation in undoableOp - Changed saveNoteType() to be a Collection extension function that uses the Collection receiver instead of a parameter - Updated CardTemplateEditor.kt to call saveToDatabase() without passing the Collection parameter - Added import for undoableOp in CardTemplateNotetype.kt Fixes ankidroid#19488
- Fixed scrollbar stuttering when card names/tags have different lengths - Set fixed row height (56dp) in card browser to maintain consistent item sizes - Added text truncation with ellipsis for long content in browser columns - Improved UX with tooltips and long-press to view full text - Applied fixes to multiple layout components: * card_item_browser.xml: Fixed height layout * browser_column_cell.xml: Text ellipsize and maxLines for truncation * item_notetype_field.xml: Ellipsize for sort field names * item_require_exclude_tag.xml: Single-line ellipsize for tags * tags_item_list_dialog.xml: Text ellipsize in tag dialogs - BrowserMultiColumnAdapter: * Set 56dp fixed height for items to prevent layout thrashing * Added long-press handler to show full text in toast * Added tooltip for text longer than 30 chars * Set content description for accessibility Fixes scrollbar jitter during scrolling when items have variable content sizes
Member
|
Hi @7se7en72025 Please force push rather than closing and creating new PRs for the same issue:
Cheers |
Member
|
I'm closing this as I expect the underlying issue is resolved. The changes here don't look relevant. The original changes in this PR didn't appear to fix undoable operations. The "Fixes" link is incorrect. Lint/CI fails, if checks are red, could you draft the PR until they pass.
The underlying issue appears to be fixed already:
Right now, these rapid updates to PRs are adding to our workload. Please, can you spend more time before pushing code:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit makes template editing operations undoable by wrapping the save operation in undoableOp. This ensures that template changes are properly tracked in the undo history, allowing users to undo template edits.
Changes:
Purpose / Description
Describe the problem or feature and motivation
Fixes
Approach
How does this change address the problem?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration (SDK version(s), emulator or physical, etc)
Learning (optional, can help others)
Describe the research stage
Links to blog posts, patterns, libraries or addons used to solve this problem
Checklist
Please, go through these checks before submitting the PR.