-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event display endpoint #210
Conversation
app.state.publisher_id = $publisher.data('publisher-id'); | ||
|
||
// todo: make eventsArePolygons a property of a publisher | ||
app.eventsArePolygons = $publisher.data('publisher-title').match(/Leaf Collection/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to make this matching less "magical"? Leaf Collection might not be the only polygon point of interest. Is this something that could/should be moved to the Publisher model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bigfleet definitely. The magical matching is a weirdbeard holdover from a polygon proof of concept last year.
I'll put something together for this PR that works more generally.
Without totally having thought about this, is it related at all to #212 ? |
@eeeschwartz This looks good, I'm going to evaluate on my laptop before merging. If that checks out, I'll get it deployed along with bringing Tulsa online. |
Thanks @bigfleet! If you want to test against the production leaf collection dataset, you could:
|
e123ad7
to
349729a
Compare
@bigfleet I fixed the conflict in |
A new use case
This is a step towards a use case we've found useful in the city of Lexington:
Our example is for notifications when leaf collection crews visit your neighborhood. Here's a GIF of the Citygram UI for this dataset.
Thanks to Citygram's backend flexibility, making this work is minor UI issue. Citygram triggers notifications equally well for any intersection:
The proposed change
This PR irons out a kink in the way Citygram displays events during sign-up:
Rather than change the way the Citygram works on the server-side, this PR let's a given publisher fetch events from a specified endpoint if desired. In our case, a citygram-services endpoint with a slightly different format works perfectly.
A side perk is that this would allow a standard publisher to display more than 7 days of events or change the wording of the Leaflet pop-up during sign-up, for example.
Any thoughts welcome.