-
Notifications
You must be signed in to change notification settings - Fork 53
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
new alerts front end #1846
new alerts front end #1846
Conversation
Useful for doing DB things in development
Makes it easier to split out the different alert types on the alert page. Splits them into alerts with keywords, alerts for when someone speaks and alerts for the user's members.
To make it a bit easier to pick out the different parts of an alert update prettifyCritera to return the parts as a hash instead of turning it into a string.
Move things from the sidebar to the main section and update the look to split out alerts into keyword and representative alerts. Generally improve the look of them.
Also split them out and include as key in alert object so we can use them in alerts interface
This splits out the two forms to have a multi step one for keyword alerts that allows easier access to exlusions, limiting to sections and also to limit it to a speaker. The speaker only form handle the rest (search by postcode, name and constituency) but only does when x speaks.
Contains suggested related terms for searches. Used to suggest additional keywords for alerts, and eventually searches.
If you are creating a keyword alert that has related terms in the search suggestions table then offer the chance to add them to the alert.
Removes all existing entries and replaces them with the contents of the file.
Join multiple keywords with OR so any matches rather than having to match on all.
Add checkbox to match all terms rather than any term as is the default
Also fix listing your own MP's alerts
If the alert had a person in it then we weren't unsetting members or constituencies so it was still showing disambigution options after editing. Unset these to prevent that.
Makes it easier to decide what to do when we get to the alert page and to know when we're handing a form or a link from elswhere
Even if you haven't signed up for a "everything they say" alert from your MP show any "when they mention" alerts under the speaks sign up prompt. Splits the alert list into a separate template to make this easier.
@ajparsons and @struan not sure if I'll be able to finish this before going on holiday so I'll leave a few notes for when I'm back and I can have a catch up with Struan: Just in case I'll keep updating this comment during the day. Don't need to reply to this comment now, happy to have a catch up when I'm back. Alert page
Screen.Recording.2024-12-04.at.07.33.53.mov
Create Alert: Keywords
Create Alert : MPs
|
do not include any user supplied terms in the list of suggested terms and do not add any suggested terms to the user supplied list if returning to the original step
Retains any selected terms if you unselect add all. Does not retain this if you move to the next step and back though.
make sure always offer subscribing to mentions of own mp. add speaks to alert description.
If you are subscribed to any MP alerts then try to detect all other alerts for the MP and group them. Will not detect alerts for the MP's name plus another term.
We previously immediately created an alert if you put in a post code so I retained that behaviour. |
was adding a space to the front because explode was always returning an array with one entry.
If the user is somewhere with multiple representatives and they use a postcode to sign up to an MP alert then offer them a choice. If they only have one rep then just sign them up.
Closing in favour of #1851 which tidies all this up into some sensible commits. |
Update the Alerts front end. This has two sides:
The first is tidying up the display of alerts, splitting keyword and MP alerts into separate lists.
The second is a new alert sign up mechanism that makes it easier to use some of the more advanced features of alerts (limiting to a chamber, excluding terms) along with suggesting related terms where that makes sense. It also enables editing existing alerts.
MP alerts continue to use the existing mechanism.
Part of #1824