NYCPlanning / labs-zola

NYC Planning's Zoning and Land Use App
https://zola.planning.nyc.gov
Other
77 stars 27 forks source link

Adding a Share Button to ZoLa #1126

Open lavingiasa opened 1 year ago

lavingiasa commented 1 year ago

Is your feature request related to a problem? Please describe. Often times, I will find an exact tax lot or other entity that I want to share (example). I can send someone the URL, but they tend to be incredibly long because they have a number of URL parameters relating to the map instead of the tax lot information on the right hand side pane. In apps that do not shorten URLs, this looks incredibly jarring

image

https://zola.planning.nyc.gov/l/lot/3/2407/7503?aerial-year=aerials-2016&layer-groups=%5B%22building-footprints%22%2C%22commercial-overlays%22%2C%22street-centerlines%22%2C%22subway%22%2C%22tax-lots%22%2C%22zoning-districts%22%5D&print=false&search=true&selectedFirm=%5B%22A%22%2C%22Shaded%20X%22%2C%22V%22%5D&selectedOverlays=%5B%22C1-1%22%2C%22C1-2%22%2C%22C1-3%22%2C%22C1-4%22%2C%22C1-5%22%2C%22C2-1%22%2C%22C2-2%22%2C%22C2-3%22%2C%22C2-4%22%2C%22C2-5%22%5D&selectedPfirm=%5B%22A%22%2C%22Shaded%20X%22%2C%22V%22%5D&selectedZoning=%5B%22BP%22%2C%22C1%22%2C%22C2%22%2C%22C3%22%2C%22C4%22%2C%22C5%22%2C%22C6%22%2C%22C7%22%2C%22C8%22%2C%22M1%22%2C%22M2%22%2C%22M3%22%2C%22PA%22%2C%22R1%22%2C%22R10%22%2C%22R2%22%2C%22R3%22%2C%22R4%22%2C%22R5%22%2C%22R6%22%2C%22R7%22%2C%22R8%22%2C%22R9%22%5D&shouldRefresh=false#18.62/40.713021/-73.9591182

Describe the solution you'd like I would love to add a little "share" button on the ride hand side pane that copies a version of the URL without the URL params. For example, https://zola.planning.nyc.gov/l/lot/3/2407/7503 gives the user what they would want to share.

Example UI; image

Describe alternatives you've considered

  1. A link shortener for the whole URL could also be used, but that seems like unnecessary technical complexity
  2. The icon could also be the copy icon image

Additional context None

lavingiasa commented 1 year ago

I looked a little closer at the code and think this UI would be easier to implement and maybe easier to understand (ideally it would look more like a button, but this is just an example):

Code to update: https://github.com/NYCPlanning/labs-zola/blob/f290e19c71b1303825df85754b5e2df89245c26e/app/templates/components/layer-record-views/tax-lot.hbs#L23-L36 UI: image