Use new location metadata fields - #1002
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1002 +/- ##
==========================================
+ Coverage 51.60% 52.08% +0.47%
==========================================
Files 354 354
Lines 12067 12085 +18
Branches 2172 2181 +9
==========================================
+ Hits 6227 6294 +67
+ Misses 5613 5561 -52
- Partials 227 230 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Updates the Angular web app’s location handling to support newly introduced location metadata fields (e.g., name/sublocation/city and role/precision/raw metadata), aligning the UI formatting and client-side models with the updated location schema.
Changes:
- Extend location DTO/model types with new metadata fields (name, sublocation, city, altitudeMeters, role/precision/raw metadata).
- Map Stela location fields into the app’s
LocnVODatashape, including renamingrole/precision/rawtolocationRole/locationPrecision/rawMetadata. - Prefer new location fields when rendering location display strings and when creating locations from Google Places.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/app/shared/services/api/record.repo.ts |
Adds new Stela location fields and maps role/precision/raw into the app’s renamed metadata fields during conversion. |
src/app/shared/pipes/pr-location.pipe.ts |
Updates display formatting to prefer sublocation, city, and name when present. |
src/app/models/locn-vo.ts |
Extends LocnVOData with new location metadata fields used across the app. |
src/app/file-browser/components/location-picker/location-picker.component.ts |
Populates sublocation, city, and name when creating a location from a selected Google Place. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8aacc88 to
0ef7893
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0ef7893 to
75feaaa
Compare
75feaaa to
e18814e
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
I don't see anything obviously off here! I have some questions, likely answered by your partner PRs to this one, but wanted to ask them right away.
e18814e to
07ca375
Compare
aasandei-vsp
left a comment
There was a problem hiding this comment.
LGTM, small observations.
QA InstructionsQA Testing Instructions for PR: "Use new location metadata fields"SummaryThis PR updates the web app to use new location metadata fields ( Test Environment Setup
Test Scenarios
Regression Risks
Things to Watch For
By following these steps, you should sufficiently verify the correctness of the feature and its safe integration into the application. Be on the lookout for any context where the old fields might still have been referenced, and ensure data display remains user-friendly. Generated by QA Instructions Action |
|
In my own testing: I'd like to wait until the stela endpoints for location creation are live before moving the frontend to use the new properties. |
omnignorant
left a comment
There was a problem hiding this comment.
Not 100% sure what I am testing or what the success condition should be, but I did my best to suss it out of the QA guide. The gist seems to be "does a location properly save using the current picker UI"
Location editing seems to work inconsistently. In the screen capture attached here, I seem to have determined the following:
- location seems to save on initial selection
- for records without existing location data, the changed metadata persists after a refresh;
- for records with existing location data, the metadata does not persist;
- location metadata in profile, both general and milestone persists.
Screen.Recording.2026-05-08.at.4.50.36.PM.mov
|
@omnignorant sorry for the confusion -- I pulled this off of the QA pile since we need to do some additional changes for everything to work as expected! |
5a36b6d to
143c687
Compare
143c687 to
3665fa9
Compare
|
Before we merge this I want to re-check to ensure that records with legacy location metadata work as expected. |
aasandei-vsp
left a comment
There was a problem hiding this comment.
Left a few comments, but overall looks good.
Checked all location instances that I know of(manual testing):
- Sidebar
- Archive settings --> Milestones --> Location
- Group info --> Location established
- Gallery --> current archive --> info
3665fa9 to
fcc3fd0
Compare
fcc3fd0 to
dcd2a78
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
QA findings: mostly this looks good!
An actual bug reproduction recipe:
- Choose a record with no location
- Set the location to an actual street address (I used 1600 Pennsylvania Avenue South, Minneapolis, MN, USA) and save.
- I refreshed; this might not be critical
- Change the location to one without a street address. I used Colorado National Monument, Grand Junction, Colorado.
- Refresh (this one is definitely necessary)
- After refresh, observe that the street number and name are now the previous values, so in my example I see "1600 Pennsylvania Avenue South
Grand Junction, Colorado"
Since location updates are broken altogether on main (PER-10630) this is definitely an improvement, but if we can fix it that would be ideal.
Probably related but not critical: If I search for Acadia National Park, the location that appears in the editing view (sidebar and full) is "ME, US, US"
I followed these tests, for posterity:
## Test 1 — Set a location on a file for the first time
1. Open the file browser and click on a single file that does not currently have a location set (the sidebar on the right should say "No location" or "Click to set location" next to "Location").
2. Click the "Location" row in the sidebar.
3. In the map dialog that opens, type a real address into the search box (e.g. your office address or a well-known landmark) and select it from the suggestions.
4. Confirm a pin drops on the map at the correct spot and a short address preview appears.
5. Click "Save".
**Expected result:** The dialog closes, and the sidebar now shows the address you picked next to "Location," along with a small map thumbnail.
---
## Test 2 — Set a location on a folder for the first time
1. Repeat Test 1, but select a folder instead of a file.
**Expected result:** Same as Test 1 — the folder's sidebar shows the new location and map thumbnail.
---
## Test 3 — Change an existing location
1. Select a file or folder that already has a location set (from Test 1 or 2).
2. Click the "Location" row again.
3. Search for and select a different address.
4. Click "Save".
**Expected result:** The sidebar updates to show the new address, not the old one.
---
## Test 4 — View a location in the full file details page
1. Double-click a file that has a location set to open its full details page.
2. Find the "Location" row in the details table.
**Expected result:** The same address and map thumbnail shown in the sidebar also appear here. Clicking it opens the same map dialog for editing.
---
## Test 5 — Cancel without saving
1. Select a file or folder with a known location already set.
2. Click "Location" to open the map dialog.
3. Search for and select a different address, but click "Cancel" instead of "Save."
**Expected result:** The dialog closes and the original location is unchanged — the new address you searched for was not saved.
---
## Test 6 — Set a location with limited address information
1. Select a file or folder without a location.
2. Open the location picker and search for a broad place name that doesn't have a specific street address (e.g. a city name or a large park/landmark rather than a full street address).
3. Select it and click "Save".
**Expected result:** A reasonable location still displays afterward (e.g. city and country, or coordinates) — it should not show blank, "undefined," or an error.
---
## Test 7 — Location persists after refresh
1. Set a location on a file (per Test 1) or use one already set.
2. Refresh the browser page, or navigate away to a different folder and then back.
**Expected result:** The location you set is still shown correctly — nothing reverts or disappears.
---
## Test 8 — No location set
1. Find or create a file/folder that has never had a location set.
**Expected result:** The sidebar and full details page clearly show "No location" or "Click to set location" (not blank, not an error, not leftover data from another item).
e60597d to
db7a19f
Compare
|
Apparently the way I was trying to update locations didn't align with the backend -- fixed that up so now we're properly creating a new location instead of trying to update an existing one (which in turn was triggering some location reprocessing in the PHP side). I also made two other little changes:
|
db7a19f to
47e07c6
Compare
The backend is changing which location metadata fields to store and we need to use those fields. Issue #1001 Use new location metadata fields
47e07c6 to
695534e
Compare
cecilia-donnelly
left a comment
There was a problem hiding this comment.
This looks great! Thanks for addressing my earlier comments, @slifty .
Many changes have happened since this review.
This PR modifies the web app to use the new location metadata fields for both reading and writing data.
Resolves #1001