Extract pure logic tests for WikiSyncService, MediaLibraryWatcher, FileService
Details
- WikiSyncService: promote DeriveTitleFromFilename and SanitizeFilename from
private to internal static; add 7 tests covering extension stripping, dash-to-
space conversion, space-to-dash conversion, invalid char replacement, and
round-trip consistency.
- MediaLibraryWatcher: promote ShouldIgnore and ShouldIgnoreDir from private to
internal static; add 11 tests covering hidden files, .DS_Store, temp files,
tilde backups, hidden directory segments, empty/dot paths, and normal files.
- FileService.DetectMimeType: already internal static; add 20 tests via
TestCase attributes covering images, documents, media, text, unknown
extensions, no extension, and case insensitivity.
- Add InternalsVisibleTo for PrivStack.Plugin.Files.Tests in Files csproj
(Notes csproj already had it).
Add tests for TaskToNoteService.BuildBlocksFromMarkdown and DocxExportService image helpers
Details
Extract pure logic from infrastructure classes for testing:
- TaskToNoteService.BuildBlocksFromMarkdown: changed from private to internal static,
added InternalsVisibleTo for Tasks.Tests. 9 tests covering headings (all 3 levels),
paragraphs, multi-line joining, blank line separation, bullet lines as paragraph text,
empty input fallback, mixed content sequencing, and unique block IDs.
- DocxExportService.GetImageDimensions and ParseJpegDimensions: changed from private to
internal static. 4 tests covering valid PNG dimension parsing, valid JPEG SOF0 parsing,
unrecognized format defaults, and direct ParseJpegDimensions extraction.
Extract testable pure logic from ImapSyncService, add tests
Details
Refactor ImapSyncService to expose pure static methods for testing:
- Extract ClassifyFolder(FolderAttributes, string) as internal static
overload; the private IMailFolder overload delegates to it
- Change MapSecurity from private to internal static
- MapProviderToConnectionId was already internal static
Add 22 tests in ImapSyncServiceTests covering:
- ClassifyFolder: attribute-based and name-based classification for all
folder types (Inbox, Sent, Drafts, Trash, Junk, Archive, Starred,
All, Category, Other)
- MapProviderToConnectionId: Gmail->google, Outlook->microsoft, and
throws for unsupported providers
- MapSecurity: all three EmailSecurityMode variants
MapToEmailMessage skipped — requires constructing MailKit's
IMessageSummary with internal/sealed Envelope types, not worth the
fragility for a straightforward field-mapping method.
Replace list item reorder buttons with drag-to-reorder and right-click delete
Details
Replace hover-visible up/down/remove buttons in BulletListEditor,
NumberedListEditor, and TaskListEditor with:
- Drag-to-reorder: hold and drag the list marker (bullet, number, or
checkbox) to reorder items within the same parent list. Uses Avalonia
DragDrop with 5px threshold, drop-above/drop-below indicators, and
same-parent validation to prevent cross-list moves.
- Right-click context menu: "Delete List Item" on each row, reusing
existing RemoveItem logic.
Also fixes FocusItemAtFlatIndex to handle both Grid and StackPanel
children of rowBorder (the StackPanel case occurs when ChildBlocks
are present).
Removed: CreateReorderButton, MoveItemUp, MoveItemDown methods and
all reorder-controls/reorder-btn AXAML styles.
Fix list items indented too far from left edge
Details
Remove root-level left margin from BulletListEditor (20px),
NumberedListEditor (16px), and TaskListEditor (24px) ItemsPanel
containers. Top-level list items should align with other block content
(headings, paragraphs) — the BlockWrapper handle gutter already
provides the left offset. Nesting still works via depth * 24 on each
item row.
Get notified about new releases