adunkman / dc311rn.com

Quickly check the status of a DC 311 service request
https://www.dc311rn.com
MIT License
6 stars 0 forks source link

Better link unfurling. #1

Closed adunkman closed 6 years ago

adunkman commented 6 years ago

When linking to a specific service request, it would be nice if we could do a better job of unfurling the link previews. Here’s what it looks like now:

image

It would be cool if we could show the status of the service request right there. We may not be able to do this reliably (I think this data might be cached by Twitter/other services). At least we can show the location of the service request (maybe the map can be the image) and some basic details that we don’t expect to change. I’m thinking something like:

image

adunkman commented 6 years ago

This will be a little involved, since I believe this requires us to generate different HTML (meta tags, specifically) server-side for these views. We’re currently doing this client-side.

adunkman commented 6 years ago

Completed by switching hosts from S3 to Heroku and pushing the request to DC311 to the backend instead of on the client. This let us set the proper meta tags. Went with a shorter description, and I’ll likely tweak the date format going forward, but it’s good enough for now!

image