Skip to content

Conversation

@meesoft
Copy link
Owner

@meesoft meesoft commented Jan 29, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Thumbnail images now display on the map view above map items for improved visual identification.
  • Refactor

    • Unified geographic data handling across the application for improved consistency and maintainability.
    • Updated internal object model architecture to support interface-based types, enabling more flexible component interactions.

✏️ Tip: You can customize this high-level summary in your review settings.

@meesoft meesoft marked this pull request as ready for review January 31, 2026 20:32
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Walkthrough

This PR refactors geographic data handling from GeoTag to Location as the canonical field, and introduces an IPointItem interface. Changes span GPS tagging logic, metadata encoding/decoding, view models, and UI components. GeoTag null-checks are replaced with GeoTagPresent property, and Points/Pushpins collections are updated to use IPointItem instead of PointItem.

Changes

Cohort / File(s) Summary
GPS Tagging Logic
PhotoLocator/Gps/AutoTagger.cs, PhotoLocatorTest/Gps/AutoTaggerTest.cs, PhotoLocatorTest/AutoTagViewModelTest.cs
Replaced GeoTag null-checks with GeoTagPresent property; Location now used as the canonical geographic data source for comparisons, assignments, and best-fix selection in auto-tagging operations. Test assertions updated to validate Location instead of GeoTag.
Metadata Encoding/Decoding
PhotoLocator/JpegTransformCommands.cs, PhotoLocator/VideoTransformCommands.cs
Geotag presence detection now uses GeoTagPresent; metadata geotag source switched from GeoTag to Location when populating image metadata.
Data Model & Interface Definition
PhotoLocator/MapDisplay/MapViewModel.cs
Introduces new public IPointItem interface with Name, Location, and ThumbnailImage properties; PointItem class updated to implement IPointItem and expose ThumbnailImage property.
Picture Item View Model
PhotoLocator/PictureItemViewModel.cs
Class now implements IPointItem; public GeoTag property replaced with Location; introduced GeoTagPresent property with MemberNotNullWhen attribute; LoadMetadataAsync, SaveGeoTagAsync, and related methods updated to use Location instead of GeoTag.
Main UI View Model
PhotoLocator/MainViewModel.cs
Points and Pushpins collections changed from ObservableCollection\<PointItem\> to ObservableCollection\<IPointItem\>; all GeoTag references replaced with Location and GeoTagPresent checks; map centering and selection logic updated to use Location-based data; item instantiation adjusted to add full item references.
Map Display Components
PhotoLocator/MapDisplay/MapItemEventArgs.cs, PhotoLocator/MapDisplay/MapView.xaml.cs
MapItemEventArgs refactored to use primary constructor with IPointItem parameter; Item property type changed from PointItem to IPointItem; pattern matching in MapView.xaml.cs updated to expect IPointItem types.
Map View XAML
PhotoLocator/MapDisplay/MapView.xaml
Added Image control bound to ThumbnailImage with vertical transform offset; converted inline comment blocks to proper multi-line format; minor whitespace adjustments.
Slide Show Window
PhotoLocator/SlideShowWindow.xaml.cs
Map visibility and centering logic refactored to use Location instead of GeoTag; MapCenter set from Location, Points populated with PointItem using Location.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #50: Modifies MainViewModel and Points/Pushpins collections to align with IPointItem interface and Location-based data handling.
  • PR #33: Updates auto-tagging logic (GetBestGeoFix) to use Location-based geographic data in timestamp offset scenarios.
  • PR #41: Modifies PictureItemViewModel's LoadMetadataAsync and metadata handling to integrate with ExifHandler interface changes.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Show thumbnails on map' is directly relevant and aligns with the primary changes: adding ThumbnailImage property to MapView and binding it for display, enabling thumbnail display on the map.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch features/MapThumbnails

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@meesoft meesoft merged commit 3a0c912 into main Jan 31, 2026
5 checks passed
@meesoft meesoft deleted the features/MapThumbnails branch January 31, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants