WIP: Location Modal UX - #1140
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1140 +/- ##
==========================================
+ Coverage 52.43% 52.64% +0.20%
==========================================
Files 355 357 +2
Lines 12134 12197 +63
Branches 2197 2206 +9
==========================================
+ Hits 6363 6421 +58
- Misses 5547 5553 +6
+ Partials 224 223 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5d6bb62 to
95ff525
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements a frontend-only UX for the “uncertain locations” modal (non-coordinate location entry), adding reusable input UI and wiring dialog open behavior based on the uncertain-locations feature flag, without persisting changes to the API.
Changes:
- Added a standalone
LocationFieldComponentwith icon + labeled input + clear affordance (and unit tests/styles). - Rebuilt
UncertainLocationPickerComponentas a standalone dialog with address-part fields, qualifier toggles, clear/save/cancel UX, and expanded test coverage. - Updated dialog launchers (EditService + ProfileEditComponent) to select the new dialog and adjust modal width when the feature flag is enabled.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/shared/components/location-field/location-field.component.ts | New standalone reusable location input component (icon/label/value/clear). |
| src/app/shared/components/location-field/location-field.component.html | Template for the reusable field (input + conditional clear button). |
| src/app/shared/components/location-field/location-field.component.scss | Styling for the field, including icon gradient fill behavior. |
| src/app/shared/components/location-field/location-field.component.spec.ts | Unit tests for rendering, binding, clear behavior, and a11y labeling. |
| src/app/models/locn-vo.ts | Introduces qualifier enum/flags and defaults alongside existing precision typing. |
| src/app/file-browser/file-browser-components.module.ts | Removes UncertainLocationPickerComponent from the NgModule now that it’s standalone. |
| src/app/file-browser/components/uncertain-location-picker/uncertain-location-picker.component.ts | Standalone uncertain-location dialog logic using signals; supports qualifiers, clear all, save/cancel. |
| src/app/file-browser/components/uncertain-location-picker/uncertain-location-picker.component.html | New dialog UX layout (gradient defs, qualifiers, fields, footer actions). |
| src/app/file-browser/components/uncertain-location-picker/uncertain-location-picker.component.scss | Dialog styling, including toggle UI, layout, and footer controls. |
| src/app/file-browser/components/uncertain-location-picker/uncertain-location-picker.component.spec.ts | Expanded unit tests for field behavior, qualifiers, prefill logic, and clear behavior. |
| src/app/core/services/edit/edit.service.ts | Chooses between legacy/new picker via feature flag and adjusts dialog width accordingly. |
| src/app/core/services/edit/edit.service.spec.ts | Updates expectations for dialog open behavior/width under the feature flag. |
| src/app/core/components/profile-edit/profile-edit.component.ts | Chooses between legacy/new picker via feature flag and adjusts dialog width accordingly. |
| src/app/core/components/profile-edit/profile-edit.component.spec.ts | Updates expectations for dialog open behavior/width under the feature flag. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div class="pr-qualifier-option"> | ||
| <span>{{ option.label }}</span> | ||
| <label class="pr-toggle"> | ||
| <input | ||
| type="checkbox" | ||
| [attr.aria-label]="option.label" | ||
| [checked]="qualifiers()[option.key]" | ||
| [disabled]=" | ||
| option.key !== LocationQualifier.Unknown && fieldsDisabled() | ||
| " | ||
| (change)="onQualifierChange(option.key)" | ||
| /> | ||
| <span class="pr-toggle-slider"></span> | ||
| </label> | ||
| </div> |
| span { | ||
| @include usual-text; | ||
| font-family: 'UsualRegular', sans-serif; | ||
| color: $PR-blue-900; | ||
| white-space: nowrap; | ||
| } |
| input:checked + .pr-toggle-slider { | ||
| background-color: $toggle-checked; | ||
| } | ||
|
|
||
| input:checked + .pr-toggle-slider::before { | ||
| transform: translateX(16px); | ||
| } | ||
|
|
||
| input:disabled + .pr-toggle-slider { | ||
| opacity: 0.5; | ||
| cursor: not-allowed; | ||
| } |
| export type LocationPrecision = 'approximate' | 'uncertain' | 'unknown'; | ||
|
|
||
| export enum LocationQualifier { | ||
| Approximate = 'approximate', | ||
| Uncertain = 'uncertain', | ||
| Unknown = 'unknown', | ||
| } |
5d7a5d2 to
f560d7a
Compare
{ commit message TBD }
Issue #1134 Create frontend-only implementation of uncertain address modal
Claude-Session: 3fc6caae-2a65-4475-8a49-f12a760fcb83
{ commit message TBD }
Issue #1134 Create frontend-only implementation of uncertain address modal
Claude-Session: 3fc6caae-2a65-4475-8a49-f12a760fcb83
{ commit message TBD }
Issue #1134 Create frontend-only implementation of uncertain address modal
Claude-Session: 3fc6caae-2a65-4475-8a49-f12a760fcb83
f560d7a to
970a8cf
Compare
This PR adds un-wired UX to the uncertain locations modal. This is focused on non-coordinate based location entry specifically.
Resolves #1134