File-based schedule picker, side-by-side layout, display mode fixes#6
Merged
lastowl merged 4 commits intoavalonia-portfrom Apr 12, 2026
Merged
File-based schedule picker, side-by-side layout, display mode fixes#6lastowl merged 4 commits intoavalonia-portfrom
lastowl merged 4 commits intoavalonia-portfrom
Conversation
added 4 commits
April 12, 2026 16:15
) Expands file-based operating mode so users can manage multiple schedule templates instead of hand-editing a single XML file. Schedule templates folder: - FileUtils.GetScheduleTemplatesFolder() creates and returns {Documents}/OnlyT/Schedules/ on all platforms. Export current schedule: - ScheduleExporter.Export() serializes the current Talks collection to the file-based XML format (meeting > items > item elements with name, duration, editable, bell, countup, persist, closing attributes). Works from any mode — export an Auto midweek schedule, a Manual setup, or an existing file-based template. - 'Save' button on the operator page triggers the export with an auto-generated filename (mode-timestamp.xml). Schedule picker: - When File-Based mode is active, a dropdown appears above the talk list showing all .xml files in the Schedules folder. Selecting a different template saves the choice to AppOptions.SelectedScheduleFile, resets the schedule service, and reloads the talk list. - TalkScheduleFileBased.Read() now accepts an optional selectedFile parameter. If provided, it resolves the path within the Schedules folder. Falls back to the legacy talk_schedule.xml for backward compatibility when no template is selected. First-use seeding: - When the user switches to File-Based mode and the Schedules folder is empty, the current talk list is automatically exported as default.xml so there's something to start from immediately.
Clock format not updating: - TimerOutputViewModel.RefreshSettings() now calls ApplyClockHourFormat() which maps the ClockHourFormat enum to the three boolean flags (DigitalTimeFormat24Hours, ShowLeadingZero, AMPM) that the analogue clock control binds. Previously these were initialized to defaults and never updated from options. Clock mode not updating output window: - Wrap the OptionsChanged subscription in Dispatcher.UIThread.Post to guarantee property-changed notifications reach Avalonia bindings on the correct thread. The raw event fires on the calling thread (UI in practice, but not guaranteed by contract). Schedule file picker in Settings: - SettingsViewModel gains AvailableScheduleFiles + SelectedScheduleFile properties, populated when OperatingMode == ScheduleFile (either on load or when the user switches to File-Based mode). - SettingsWindow shows a 'Schedule file' combo below the OperatingMode selector, visible only in File-Based mode. The selected file is persisted to AppOptions.SelectedScheduleFile on Save.
… visibility
Clock format ComboBox blank: ClockHourFormats was a computed property
(=>) that created new ClockHourFormatItem instances on every access.
ComboBox.ItemsSource got one set, SelectedItem got a different
reference from FirstOrDefault on a fresh array — reference equality
failed so nothing appeared selected. Changed to a field initializer
({ get; } =) so the same instances are used throughout.
Display mode not updating output window: Added explicit
OnPropertyChanged calls for ShowBothClocks, ShowDigitalClockOnly,
ShowAnalogueClockOnly after ApplyClockMode in RefreshSettings.
The [NotifyPropertyChangedFor] chain on the backing fields fires
when the setters run, but the dispatched OptionsChanged path may
miss the cascade. Belt-and-suspenders: raise them explicitly too.
Export button always visible: Moved the 'Save template' button from
the file-based-only picker row to the footer icon bar. Now visible
in all modes so users can export Auto/Manual schedules as file-based
templates without first switching to File-Based mode.
…t toggle Timer output window layout: - Port the WPF side-by-side column layout for 'Both' mode: analogue clock on the left, digital timer on the right, with the split slider controlling column widths via a new GridLength converter. - Retain the vertical stack as the default (better for portrait displays). New HorizontalClockLayout option (default false) toggles between them. Checkbox in Settings > Timer Window. - Split slider now enabled only in horizontal layout with an analogue clock mode. Display mode switching: - Replace computed ShowBothClocks/ShowDigitalClockOnly/ ShowAnalogueClockOnly with explicit ObservableProperty fields to fix compiled-binding propagation issues. - Fix OptionsChanged event to iterate handlers individually so one failure doesn't skip the rest. - Add live preview: changing the clock mode combo updates the output window immediately without saving. - Direct RefreshSettings call from OperatorPageVM as fallback. Clock format: - Fix blank ComboBox: ClockHourFormats was a computed property creating new instances per access. Now a field initializer. - Add ApplyClockHourFormat to RefreshSettings mapping the enum to the three boolean flags the analogue clock control binds. File-based schedule (AntonyCorbett#21): - Schedule templates folder, ScheduleExporter utility, schedule picker in both operator page and Settings window. - Export button in footer (hidden by default, toggle in Settings). - First-use seeding: auto-exports current schedule as default.xml. Export toggle: ShowExportScheduleButton option (default off).
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.
Batch of timer output and operator enhancements. See commit messages for details.