Skip to content

Conversation

@ngc7293
Copy link
Contributor

@ngc7293 ngc7293 commented Feb 27, 2025

Description

When adding location data to multiple assets in a row, it can be annoying to have to zoom-in from the top-level zoom everytime, especially when editing photos that were taken in close succession (e.g.: adding location to a travel photos album).

With this commit, the web UI remembers the last location picked by the user and opens the map to this location. The opened map does not include a pin. this "lastChosenLocation" is kept in the asset-editor store and is lost when refreshing the page (by design).

How Has This Been Tested?

  • Added two assets
  • Edited one asset's location using the web UI
  • Opened location editor for second asset: it show the map around the previous asset's location (but no pin)
  • Refreshed page without picking a location
  • Opened location editor for second asset: it show the top-level map.

Screenshots (if appropriate)

immich-location.mp4

API Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services)

Uses a global store to remember the last location chosen by a user when
editing asset locations. This fixes an annoyance when adding location
data to multiple assets in a row and having to zoom in the same area
everytime.
@alextran1502 alextran1502 merged commit 8b69114 into immich-app:main Feb 27, 2025
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants