Configures pop-ups for sign locations added to work order#343
Configures pop-ups for sign locations added to work order#343mateoclarke wants to merge 7 commits into21517-app-nextfrom
Conversation
✅ Deploy Preview for nextjs-knack-signs-markings canceled.
|
| } | ||
| /* END #233 */ | ||
|
|
||
| #view_3207 > div.kn-records-nav > div.js-filter-menu.tabs.is-toggle.is-flush > ul > li:nth-child(2) > a{ |
There was a problem hiding this comment.
All of this to the bottom of the page was in the test environment but not committed, and I didn't want to overwrite it without knowing why it was added.
| ); | ||
| const signPins = useCreateSignPins(knackSigns, setPopupInfo); | ||
|
|
||
| // Merge AGOL attributes into co-located Knack signs and filter those |
There was a problem hiding this comment.
This logic is essentially to dedupe and merge data so we don't have the problem of Knack signs and AGOL locations overlapping.
| // Merge AGOL attributes into co-located Knack signs and filter those | ||
| // AGOL features out of the layer so they don't render on top of Knack pins. | ||
| const { enrichedSigns, filteredAgolGeoJSON } = useMemo(() => { | ||
| if (!isZoomedInEnough || agolSignsGeoJSON.features.length === 0) { |
There was a problem hiding this comment.
This is the fast path short circuit if the user isn't zoomed to see AGOL layer. Or if there's no features in the AGOL geojson layer.
| }; | ||
| } | ||
|
|
||
| const COLOCATION_THRESHOLD_METERS = 5; |
There was a problem hiding this comment.
Open to feedback on this threshold should be smaller.
There was a problem hiding this comment.
my feeling is this is something to refine with user feedback, I have no idea if this is too big of a threshold in areas where there are a ton of signs close to each other.
|
Note from @ChristinaTremel after review on 4/23:
|
roseeichelmann
left a comment
There was a problem hiding this comment.
followed all the test steps and they worked as expected!
whenever you switch to Create Location, would it be possible to automatically close out of any pin popups you had selected? Bc its kind of confusing when you have a popup open and you click Create Location and the red marker is covered by the popup.
There was a problem hiding this comment.
what do you think about adding some comments that alert the app team to not touch these styles without checking with the dev team, or a comment saying that these specific styles are used in the react map integration. Something to let them know where the styles are being applied
| const raw = sessionStorage.getItem(STORAGE_KEY); | ||
| if (isLocationMode(raw)) return raw; | ||
| } catch { | ||
| // private mode / quota |
There was a problem hiding this comment.
just curious, what does "quota" mean?
chiaberry
left a comment
There was a problem hiding this comment.
🚀
this looks so slick Mateo, I missed the last PR so this is a huge jump in user experience for me.
It could be because I am on VPN, but I noticed some delay between clicking to select an existing location and getting feedback (the map reloading). I am guessing it is knack slowness, maybe some visual feedback before the map reloads, like a loading icon or something while knack is trying to process the data?
I added locations, zoomed in and out, deleted locations and checked the location details pages. all looks so good!
Associated issue
Closes cityofaustin/atd-data-tech#26881
Summary
Two related pieces of work shipped together on this branch:
1. Pop-up enhancements for sign locations added to a work order
ASSET_LOCATION_ID/ Knackfield_4461) and fall back to Spatial ID only when no Location ID is present.2. Symbology + default mode + "Add Location" button styling
ASSET_LOCATION_ID)sessionStorage.btn-primaryand is centered at the bottom of the map.Testing
Use the test Knack app
test-30-may-2024-signs-and-markings-operationsand GIS QA credentials (from 1Password).Steps to test:
1. Default mode is "Select Existing"
sessionStoragefor the Knack app origin (DevTools > Application > Storage > Clear site data), then load the Add Sign Location view on an existing work order.2. Pop-ups prefer Location ID and link to details & No lat/lng in popups
Lat/Lngrows in any popup variant.3. Co-located AGOL + Knack sign de-dup
4. Symbology
5. "Add Location" button update in "Create Location" mode
btn-primary), and is centered at the bottom of the map, not tucked into the form layout.