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

Alerts 2.0 #3

Closed
9 tasks done
slocker3 opened this issue Jul 19, 2022 · 4 comments
Closed
9 tasks done

Alerts 2.0 #3

slocker3 opened this issue Jul 19, 2022 · 4 comments
Assignees
Labels
feature Major task used to track sub-tasks

Comments

@slocker3
Copy link

slocker3 commented Jul 19, 2022

These thoughts might be for a new plugin, but I will start here. I want to focus on this plugin being more of a utility as opposed to a fully-baked post type with additional technology.

Current alerts plugin goals

  • Populate alerts in a banner on a single page or all pages depending on alert level.
  • Apply a start and end time for the alert
  • Create an archive for current and previous alerts

Goal I think the alerts plugin should focus on

  • Populate alerts in a banner on a single page or all pages depending on alert level.
  • The start and end time for an alert

I don't think a post type is necessary.

Why

I have seen a few scenarios where the alert plugin is used for general announcements (Swing the Fly) and for events (PFMC). In both cases redirects were created for the alert to point to the actual post. It would be handy allowing any post type to have the ability to populate something that is deemed important into a banner.

Approach

Settings

Once the plugin has been added to the site, somewhere in settings is a place to make a few decisions:

  1. What post types should this functionality apply to (regular posts by default -- doesn't create a new post type)
  2. Allow level names to be changed or more added (default: alert, broadcast, home highlight, normal)
  3. Have a dropdown next to each term that tells the alert what to do (1. Populate on all posts, 2. Populate only on homepage, 3. Normal)
  4. A place to toggle between two options for when there are multiple alerts - 1) Populate a single highest priority alert, or 2) Populate all alerts by priority, then newest.

Single post

  • A single post that has Alert functionality is a section in the sidebar for selecting the alert level (via the names in settings) and times for the alert to appear at the current selected level. The alert post remains even when the time has ended. The time only removes the level and sets it back to default.
  • The frontend should have a class added to body of the single post indicating the current level.

Banners

The banner should populate only the post head of the current alert. All the text should be wrapped in an a to the single post of the alert.

Note: default to only populating one post that has the highest alert level with newest date if there are multiple alerts at once. If the toggle in settings is set to show all current alerts for the banner, then they will be listed by highest alert, then date posted. No limit.

Other thoughts

  • Should the user have the option to close alerts and have that stored in the browser so that they don't see alerts that they have closed? This could be an option in settings.
  • The alert level should be a taxonomy, allowing to populate its terms into collection outputs like CAB.

Tasks

MVP

Future release

@slocker3 slocker3 added the enhancement Small improvement to existing work label Jul 19, 2022
@jeremyfelt jeremyfelt added feature Major task used to track sub-tasks and removed enhancement Small improvement to existing work labels Feb 7, 2023
@jeremyfelt jeremyfelt changed the title Rethinking alerts Alerts 2.0 Feb 7, 2023
@slocker3 slocker3 self-assigned this Feb 10, 2023
@jeremyfelt
Copy link
Member

Food for thought: how should a history of alert levels be tracked for a post?

@jeremyfelt jeremyfelt self-assigned this Feb 14, 2023
@jeremyfelt
Copy link
Member

Apply a start and end time for the alert

I've added an expiration date only now. Start time could be handled through scheduled posts.

@jeremyfelt
Copy link
Member

Create an archive for current and previous alerts

I think this can be handled by the site/project now that this is a taxonomy.

@jeremyfelt
Copy link
Member

We've shipped 2.0. The banner block can be handled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Major task used to track sub-tasks
Projects
None yet
Development

No branches or pull requests

2 participants