feat: unified Settings drawer matching design philosophy#485
Conversation
Replaces the MahApps MetroWindow settings dialog with a right-side settings drawer at the app-window level, matching the Channels (#479) and Devices (#484) panes. Preferences are a genuine separate surface but not a destructive fork, so the drawer pattern fits the design philosophy better than a modal. - New IsAppSettingsOpen + AppSettings property on DaqifiViewModel, and Toggle/Close commands replacing ShowDAQiFiSettingsDialogCommand - Drawer appended to MainWindow root Grid at ZIndex=20 so it overlays tab content and in-pane drawers; scrim click and X dismiss - CSV delimiter uses a segmented COMMA/SEMICOLON toggle instead of a ComboBox — only two options and direct manipulation reads better - SettingsViewModel upgraded to ObservableObject with bool selectors so the segmented toggle binds two-way - Deletes SettingsDialog.xaml/.cs and the dialog-service invocation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Drawer width 420 → 380 to match the Channels and Devices pane drawers. - Settings cog in the title bar is now a ToggleButton two-way-bound to IsAppSettingsOpen so it carries visible active state while the drawer is open; the drawer's scrim/X still close it via CloseAppSettings. - Removes the now-dead ToggleAppSettingsCommand. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Review Summary by QodoReplace settings modal with unified right-side drawer
WalkthroughsDescription• Replace modal settings dialog with right-side drawer at app-window level • Add IsAppSettingsOpen flag and AppSettings property to DaqifiViewModel • Convert settings cog to ToggleButton with two-way binding to drawer state • Upgrade SettingsViewModel to ObservableObject with bool selectors for CSV delimiter • Replace ComboBox with segmented toggle for comma/semicolon delimiter selection • Remove SettingsDialog.xaml/.cs and dialog service invocation Diagramflowchart LR
A["Settings Cog<br/>ToggleButton"] -- "IsAppSettingsOpen" --> B["App Settings<br/>Drawer"]
B -- "CloseAppSettingsCommand" --> A
C["SettingsViewModel<br/>ObservableObject"] -- "IsCommaDelimiter<br/>IsSemicolonDelimiter" --> D["Segmented Toggle<br/>RadioButtons"]
D -- "Two-way Binding" --> C
File Changes1. Daqifi.Desktop/View/SettingsDialog.xaml
|
Code Review by Qodo
1.
|
- Lazy-construct AppSettings in DaqifiViewModel to avoid DaqifiSettings disk IO during startup and unit tests - Add XML doc on AppSettings property - Convert inline-brace setters in SettingsViewModel to Allman style - Shorten long ToolTip line in MainWindow.xaml under 120 chars - Add trailing newline to MainWindow.xaml Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Addressed Qodo summary-only findings in 1e4c8b2:
|
📊 Code Coverage ReportSummarySummary
CoverageDAQiFi - 16.7%
Daqifi.Desktop.Common - 30.8%
Daqifi.Desktop.IO - 100%
Coverage report generated by ReportGenerator • View full report in build artifacts |
Summary
Replaces the MahApps MetroWindow settings dialog with a right-side drawer at the app-window level, completing the trio with the Channels pane (#479) and Devices pane (#484). Settings are a separate surface but not a destructive fork, so the drawer reads better than a modal under docs/design-philosophy.md principle #4.
IsAppSettingsOpenflag +AppSettings(aSettingsViewModel) onDaqifiViewModel; drawer inMainWindow.xamlatPanel.ZIndex="20"so it overlays tabs and in-pane drawers; scrim click and × dismiss viaCloseAppSettingsCommand.ToggleButtontwo-way bound toIsAppSettingsOpen, mirroring the adjacentdebugtoggle — the button carries visible active state while the drawer is open (principle DA-102: Desktop app benchmarking tool #7, ambient status).COMMA ,/SEMICOLON ;toggle instead of a ComboBox — two options, direct manipulation (principle trying dependabot on a traditional .net app #4).SettingsViewModelis nowObservableObjectwith bool selectors so the segmented toggle binds two-way.SettingsDialog.xaml/.xaml.csand theDialogServiceinvocation.Design philosophy notes
Drawer is 380px to match Channels (#479) and Devices (#484) — one visual system (principle #9). The dark palette is now duplicated a third time at the MainWindow level; consolidating the three surfaces into a shared
ResourceDictionaryremains the #479 follow-up.Test plan
PREFERENCESkicker,Settingstitle,EXPORTsection label + divider, CSV delimiter rowCOMMA ,andSEMICOLON ;selects exclusively; selected segment gets the active surface fill%CommonApplicationData%\DAQifi\DAQifiConfiguration.xml🤖 Generated with Claude Code