-
Notifications
You must be signed in to change notification settings - Fork 0
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
Notifications #10
Comments
Provide the ability for a user to set up notifications based on any query that the CDP interface provides. The user would be provided with a button to "Create a notification based on these options." Notification configurations would need to be saved to some form of user account or object to enable customization of preferences over time, and the ability to unsubscribe. Independent of this, there should be a way for notification subscribers to opt in to a Mailchimp contact list to receive updates on new app features. Instantiation administrators should be able to connect a query configuration to one or more Twitter accounts, to enable a broadcast feed of new data that can be curated or split into different handles by subject area. Full presentation from hackathon Oct 14-15 here. |
Thanks again @adrmac! Will discuss this with the team and likely move this forward to a full proposal. |
How we could do this:
Pseudo-ish code: exports.legislationUpdated = functions.firestore.document('our-legislation-collection-name/{the-id-of-the-legislation-that-got-updated}').onUpdate((snap, context) => {
const beforeLegislation = snap.before.data()
const afterLegislation = snap.after.data()
// we can check and see EXACTLY what changed and only notify people if it was something important, or in accordance with their notification preferences.
// i would recommend that we also do some sort of notification collation (if you have 50 updates to legislation in a day, you don't want to send 50 emails :fearful:)
// do a query on the yet-to-be-made Users collection for whoever is wanting notifications for this legislation and send them out
}) |
So this means moving off of GH pages because we would need like a
not concerned about this. This happens as a part of the normal setup process
not sure, if it's anything like the "public read" firebase issue i have been having they may need to do something in the ui but i think this might be easier to handle automatically for them. this is an implementation detail that can be handled by good setup processes / documentation so im not concerned
this is an interesting one, I looked into the tooling a bit. the firebase cli seems to manage this for people but the challenge will be how to "ship" these files to each cookiecutter... we could submodule them into the repo maybe? but I think what we may want to do is in the new "notifications repo" (or whatever we want to call it), we publish a github action that does all these steps for them, and we can release updates to the github action.... this isn't perfect imo though because the backend repo version could get a conflicting version from the "notifications" repo. so, and this is a bit weird but we could simply include a bin script in the backend repo that clones the notifications repo at a specific tag / release. and the infrastructure job on the cookiecutters would basically do the following:
basically I am just trying to figure out "how do we keep the notifications stack in sync with the rest of the backend stack"
i depends on cost for sure... it may be a good first attempt to leave this out. just get basic user management and notifications in the web ui, then if we want to add emailing / figure out the cost of emailing, we can add later? pseudo-code comment -- linking to the backend schema: https://councildataproject.org/cdp-backend/database_schema.html and a link to the available methods: https://firebase.google.com/docs/functions/firestore-events for legislation tracking I feel like it would be exports.newMatterStatus = functions.firestore
.document("matter_status/{newMatterStatus}")
.onCreate((snap, context) => {
// construct some query to find all users interested in this document
// push a notification to each user???
}
}) What would the notifications collection look like? |
Idea / Feature
Send me a notification when an event has occurred, a topic was discussed, a bill was proposed, etc. Alert me when things happen!
Use Case / User Story
As a user I want to be notified when:
Other Notes
The text was updated successfully, but these errors were encountered: