Skip to content

Commit 33e77c5

Browse files
Add independent Pin to Dock feature and fix Save Logs to Desktop (#153)
Resolves the two problems reported in issue #142: - Dock pinning is now its own feature, decoupled from Favorites. Adds a DockPinsManager store, Pin to Dock / Unpin from Dock commands on each location, a Docked tag, and repoints GetDockBands() at the dock-pin store. Existing favorites are migrated into dock pins once so current users keep their dock content. - Save Logs to Desktop now works. RollingFileLogger writes to a writable LocalApplicationData path instead of the read-only install directory, and SaveLogsCommand always produces a zip and shows a confirmation toast. Adds DockPinsManager tests, updates existing test callers and the README. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent b193613 commit 33e77c5

28 files changed

Lines changed: 719 additions & 40 deletions

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ forecasts right from your desktop.
1919
precipitation chance, and conditions
2020
- **3-Day Forecast** — Quick glance at upcoming weather with highs, lows, and
2121
conditions
22-
- **Dock Bands** — Pin your favorite locations to the Command Palette dock for
23-
at-a-glance weather cards
22+
- **Dock Bands** — Pin a location to the Command Palette dock with the "Pin to
23+
Dock" command for an at-a-glance weather card. Dock pinning is independent
24+
from Favorites, so you can favorite a location, dock it, or both.
2425
- **Postal Code Search** — Search by postal/ZIP code or city name
2526
- **Configurable Units** — Fahrenheit/Celsius, mph/km/h, and adjustable update
2627
intervals

WeatherExtension.Tests/CommandInvocationTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@ public class CommandInvocationTests
1818
{
1919
private string _settingsPath = string.Empty;
2020
private string _favoritesPath = string.Empty;
21+
private string _dockPinsPath = string.Empty;
2122

2223

2324
[TestInitialize]
2425
public void Setup()
2526
{
2627
_settingsPath = Path.Combine(Path.GetTempPath(), $"weather-cmd-settings-{Guid.NewGuid()}.json");
2728
_favoritesPath = Path.Combine(Path.GetTempPath(), $"weather-cmd-fav-{Guid.NewGuid()}.json");
29+
_dockPinsPath = Path.Combine(Path.GetTempPath(), $"weather-cmd-dock-{Guid.NewGuid()}.json");
2830
}
2931

3032
[TestCleanup]
3133
public void Cleanup()
3234
{
33-
foreach (var path in new[] { _settingsPath, _favoritesPath })
35+
foreach (var path in new[] { _settingsPath, _favoritesPath, _dockPinsPath })
3436
{
3537
if (File.Exists(path))
3638
{
@@ -112,8 +114,8 @@ private WeatherListPage CreateListPage()
112114
new StubWeatherService(),
113115
new StubGeocodingService(),
114116
new WeatherSettingsManager(_settingsPath),
115-
116-
new FavoritesManager(_favoritesPath));
117+
new FavoritesManager(_favoritesPath),
118+
new DockPinsManager(_dockPinsPath));
117119
}
118120

119121
}

0 commit comments

Comments
 (0)