aemsites / stericycle-shared

Edge Delivery Service Site for Stericycle sites
https://www.shredit.com, https://www.stericycle.com
Apache License 2.0
0 stars 1 forks source link

Location & Drop-off - Use My Location #489

Open colinvlasak opened 1 week ago

colinvlasak commented 1 week ago

Use my locations button doesn't work on first press on mobile. Nothing happens. Have to press twice.

Device Pixel 8 Pro - Google Chrome

https://main--shredit--stericycle.aem.live/en-us/secure-shredding-services/drop-off-shredding https://main--shredit--stericycle.aem.live/en-us/service-locations

image

jindaliiita commented 2 days ago

@colinvlasak This issue occurs because the map is not fully loaded at the time the user clicks 'Use My Location.' One possible solution is to disable the search and 'Use My Location' options until the map is fully loaded. This applies to both mobile and desktop. Let me know your thoughts on this

colinvlasak commented 2 days ago

@jindaliiita what would that look like from a user perspective? Would they not see the search box and button + Use my location button until the map is loaded? Anything we can do to make the map load faster to reduce this issue?

jindaliiita commented 2 days ago

@colinvlasak, you can check the behavior here:

https://github.com/aemsites/stericycle-shared/issues/489 https://issue-489--shredit--stericycle.aem.live/en-us/service-locations

We cannot load the map on the main thread initially, as it would impact the page's Total Blocking Time (TBT). Currently, we are loading it during the delayed phase.

colinvlasak commented 1 day ago

@jindaliiita I think this could work if we can't load the map sooner.

@rwcsrichardspencer Let me know if this works for you. The buttons are blurred on load until the map is functional. Previously the buttons were active but didn't work until the map was loaded so map users think they could interact before they actually could. This is to solve that.