Skip to content
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

Closed
wants to merge 51 commits into from
Closed

new alerts front end #1846

wants to merge 51 commits into from

Conversation

struan
Copy link
Member

@struan struan commented Oct 31, 2024

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

struan and others added 18 commits October 22, 2024 16:22
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.
@struan struan changed the title Alert front end small fixes Small fixes and improvements to new alerts front end Oct 31, 2024
@lucascumsille
Copy link
Contributor

lucascumsille commented Nov 18, 2024

@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

  • Is it possible to move the "MP is mentioned" from the keywords section. If it's too much hassle I should add a message in the MP section telling users the MP mention is in the key word section.
  • Change secondary buttons inside the accordions and MP sections to outline ones, so the page is not so saturated with colours
  • Move icons from right side to left to provide better context to users.
  • "Abandon changes" button has a green border
  • "Delete All" will delete everything so I need to move it back to the very top of the page.
  • "Delete all" We should add a confirm dialogue letting people know that this will delete every single alert, keywords and MPs ones.
  • "Delete all" update copy to something more clear like "Delete all alerts", so the button doesn't need a context to be understood.
  • If I remove the alert when a MP speaks and still have the "mentioned" one, then it's move from the MP section to the keyword section. Is it possible to make it stay in the same place, that probably will be a bit confusing for some users.
Screen.Recording.2024-12-04.at.07.33.53.mov
  • Currently we have some empty space on the right side, not sure if Alex would like some announcements or CTAs to go there.
Screenshot 2024-12-04 at 08 04 39
  • Add back arrow icon to "Back" button

Create Alert: Keywords

  • I want to check with Struan if I'm missing something in the journey, but so far so good.
  • I'll "Search tips" currently on /alerts on this create alert page, it will be more useful when creating an alert
  • When in related terms section, it would be nice that when we press the "all" option it adds a check mark to all of them, but if removed then it should keep the original terms checked,
  • In the "Edit Alert" it would be nice to enable the "Search tips" like in the "Create Alert" one. Currently there is a conditional, preventing this to show up, but I think we can just delete it.
  • Currently I can only exclude one keyword when editing/creating an alert.
Screenshot 2024-12-04 at 07 59 31

Create Alert : MPs

  • When creating an alert for MPs using the search postcode, it should display the MP and the member of other assemblies, like we currently do when using a post code in the search bar.
Screenshot 2024-12-04 at 10 54 41
  • Check styling for the above when ready.

struan and others added 11 commits December 3, 2024 10:54
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.
@struan
Copy link
Member Author

struan commented Dec 3, 2024

We previously immediately created an alert if you put in a post code so I retained that behaviour.

@struan struan changed the base branch from alert-front-end-vector-suggestions to master December 17, 2024 10:30
@struan struan changed the title Small fixes and improvements to new alerts front end new alerts front end Dec 17, 2024
@struan
Copy link
Member Author

struan commented Dec 17, 2024

Closing in favour of #1851 which tidies all this up into some sensible commits.

@struan struan closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants