fix(trash): key trash rows and slim the action buttons - #300
Merged
Conversation
Addresses two hardening candidates from the #298 review (PR #299): - items(trashedNotes) now passes key = { it.id }, matching every other list screen (archive, locked, search, notes). Without a key LazyColumn tracks rows by position, so restoring or deleting a note could leave the wrong row briefly visible or animate incorrectly. - The inline Restore/Delete actions switch from Button to TextButton, the standard Material 3 pattern for list-row actions. TextButton's smaller horizontal padding (~24dp less per button) leaves the title more room on narrow screens with long localized labels (e.g. German 'Wiederherstellen'), while both actions stay visible and tappable.
jeiel85
added a commit
that referenced
this pull request
Aug 13, 2026
Ships the trash-list hardening from PR #300: trash rows are keyed by note id (the last key-less items() call in the app), and the inline Restore/Delete actions are now Material 3 text buttons, giving long localized labels (e.g. German) more room for the title on narrow screens. - versionCode 125 -> 126, versionName 2.32.3 -> 2.32.4 - CHANGELOG.md and CHANGELOG.ko.md gain the v2.32.4 section - seven store-locale 126.txt: 195 characters in English, 258 at the longest, every locale keeping well below the 500 cap - landing x7 (softwareVersion, release-line, trust-ledger) and README x7 release links move to v2.32.4; the figcaption screenshot version stays at v2.23.0, which is what it documents - HISTORY.md records the two hardening candidates and their fixes (PR #300)
jeiel85
added a commit
that referenced
this pull request
Aug 13, 2026
#302) * release: v2.32.4 (versionCode 126) Ships the trash-list hardening from PR #300: trash rows are keyed by note id (the last key-less items() call in the app), and the inline Restore/Delete actions are now Material 3 text buttons, giving long localized labels (e.g. German) more room for the title on narrow screens. - versionCode 125 -> 126, versionName 2.32.3 -> 2.32.4 - CHANGELOG.md and CHANGELOG.ko.md gain the v2.32.4 section - seven store-locale 126.txt: 195 characters in English, 258 at the longest, every locale keeping well below the 500 cap - landing x7 (softwareVersion, release-line, trust-ledger) and README x7 release links move to v2.32.4; the figcaption screenshot version stays at v2.23.0, which is what it documents - HISTORY.md records the two hardening candidates and their fixes (PR #300) * fix: harden editor jump, view-state pruning, and retitle resume (#262) - Jump to end control now counts wrapped render lines, so notes made of a few long paragraphs get the control. - note_view_state rows are pruned when Open notes at leaves LAST_POSITION. - Editor position save keeps the other surface's value in memory instead of reading the row back on every debounced write. - A retitle pass interrupted by process death resumes on the next open of settings via a retitlePending flag.
jeiel85
added a commit
that referenced
this pull request
Aug 13, 2026
… mirror path (#262) (#303) * release: v2.32.4 (versionCode 126) Ships the trash-list hardening from PR #300: trash rows are keyed by note id (the last key-less items() call in the app), and the inline Restore/Delete actions are now Material 3 text buttons, giving long localized labels (e.g. German) more room for the title on narrow screens. - versionCode 125 -> 126, versionName 2.32.3 -> 2.32.4 - CHANGELOG.md and CHANGELOG.ko.md gain the v2.32.4 section - seven store-locale 126.txt: 195 characters in English, 258 at the longest, every locale keeping well below the 500 cap - landing x7 (softwareVersion, release-line, trust-ledger) and README x7 release links move to v2.32.4; the figcaption screenshot version stays at v2.23.0, which is what it documents - HISTORY.md records the two hardening candidates and their fixes (PR #300) * test: cover sync-frontmatter round-trip invariants and preview-toggle mirror path (#262) - Property-based SyncFrontmatter tests: encode->decode round-trips every field and unknown entry; decode->encode->decode leaves foreign entries and body unchanged. - PreviewToggleReachesMirrorTest (androidTest): the #219 checkbox toggle now verified to land in the note and in the synced mirror file, not just the callback and string edit.
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.
Summary
Addresses the two hardening candidates recorded for v2.32.3 in the standing tracker (#262) after the #298 trash-actions fix (PR #299). Both are small, pre-existing issues in
TrashScreen.kt— neither was introduced by the #298 fix.1. Key the trash list rows
items(trashedNotes)→items(trashedNotes, key = { it.id }).TrashScreen was the last
items()call in the app without a key — ArchiveScreen, LockedNotesScreen, NotesListScreen, SearchScreen, SyncCenterScreen and QuickSwitcherDialog all pass one. Without a key, LazyColumn tracks rows by position, so restoring or deleting a note could leave the wrong row briefly visible or animate incorrectly.Note.idis a Room@PrimaryKey(UUID), so keys are unique.2. Slim the inline action buttons
The inline Restore/Delete actions switch from
ButtontoTextButton— the standard Material 3 pattern for list-row actions. TextButton's smaller horizontal padding (~24dp less per button) leaves the title more room on narrow screens with long localized labels (e.g. German "Wiederherstellen"), while both actions stay visible and tappable. This also gives the #298 title-ellipsis fix more headroom, since the title'sweight(1f)region grows as the buttons shrink.The AlertDialog's "Delete forever" confirm stays a filled
Buttonon purpose — it is the destructive confirmation, while the inline Delete is only the entry point that opens the dialog.Verification
:app:testDebugUnitTest— passes, including the "Delete" button in the "trash bin" section not always visible #298 regression testTrashScreenTest(buttons found by text, unaffected by the style change):app:lintRelease— passesNotes