Introduce IFilePickerService and move SettingsModal and filter modals to EventLogExpert.Components#515
Draft
jschick04 wants to merge 1 commit intojschick/debug-log-filtersfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces an IFilePickerService abstraction to remove direct MAUI FilePicker.Default usage from modal components, supporting the ongoing lift of modals into the non-MAUI components library.
Changes:
- Added
IFilePickerService+ shared file-type constants for JSON/database picks. - Implemented
MauiFilePickerService(MainThread-wrapped) and registered it in DI. - Updated modal import flows to use the new abstraction.
Reviewed changes
Copilot reviewed 7 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/EventLogExpert/Services/MauiFilePickerService.cs | Adds MAUI implementation of the new file picker abstraction. |
| src/EventLogExpert/MauiProgram.cs | Registers IFilePickerService in DI for the MAUI head. |
| src/EventLogExpert/Components/Modals/SettingsModal.razor.cs | Switches database import to IFilePickerService. |
| src/EventLogExpert/Components/Modals/Filters/FilterGroupModal.razor.cs | Switches JSON import to IFilePickerService. |
| src/EventLogExpert/Components/Modals/Filters/FilterGroup.razor.cs | Switches JSON import to IFilePickerService. |
| src/EventLogExpert/Components/Modals/Filters/FilterCacheModal.razor.cs | Switches JSON import to IFilePickerService. |
| src/EventLogExpert.UI/Interfaces/IFilePickerService.cs | Adds the new picker abstraction and file-type constants. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9b77bbd to
f4a0b30
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 15 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/EventLogExpert.Components/Modals/SettingsModal.razor.cs:201
- The picker call uses
PickMultipleAsync, but the picker title says "Please select a database file" (singular). Consider updating the title text to reflect multi-select (e.g., "database file(s)" or "one or more database files") to avoid confusing users.
… to EventLogExpert.Components
f4a0b30 to
2f842f8
Compare
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.
Stacked on #513 — base is
jschick/debug-log-filtersbecause three of the moved modals' export paths requireIFileSaveServicefrom #513.Summary
Continues the EventLogExpert.Components library lift. Five remaining MAUI-coupled modals (
SettingsModal+ four filter modals) move into the non-MAUI Razor library after introducingIFilePickerServiceto abstract theirFilePicker.Defaultcalls.Changes
IFilePickerService(EventLogExpert.UI.Interfaces) — new abstraction mirroringIFileSaveService. Two methods:PickAsync(title, extensions): Task<string?>andPickMultipleAsync(title, extensions): Task<IReadOnlyList<string>>. StaticFilePickerServiceFileTypeswithJsonandDatabaseconstants.MauiFilePickerService(MAUI head) — implementation using MAUI EssentialsFilePicker.Default. Wraps both methods inMainThread.InvokeOnMainThreadAsync(mirrorsMauiFileSaveService); defensively filters null/emptyFullPathand null collection results.MauiProgram.cs(singleton, besideIFileSaveService).try/catchblocks for parity withSettingsModal.SettingsModal+FilterCacheModal+FilterGroup+FilterGroupModal+FilterGroupSection, plus their.razor.csand.razor.csscompanions) move fromsrc/EventLogExpert/Components/Modals/tosrc/EventLogExpert.Components/Modals/. Namespaces and razor markup unchanged.Why MAUI Essentials
FilePicker(not native WinUIFileOpenPicker)?FileOpenPickerhas noPickerTitleproperty (onlyCommitButtonText), and existing modal UX relies on titled prompts. Save-side stayed native because OneDrive neededDeferUpdates/CompleteUpdates; pick-side has no such requirement.Validation
dotnet build src/EventLogExpert.slnx— 0 warnings, 0 errorsdotnet test src/EventLogExpert.slnx— 1879/1879 pass (19 + 144 + 628 + 1088, unchanged from Add filter, virtualization, and export UI to DebugLogModal and unify file save #513)PickMultipleAsync).Stack note
After #513 merges (squash), this PR will need a manual rebase onto
mainand force-push.