Giter Site home page Giter Site logo

alerts's People

Contributors

dependabot[bot] avatar jeremyfelt avatar philcable avatar webelaine avatar

Watchers

 avatar  avatar  avatar

alerts's Issues

A post with alert is not honoring expires

This is an issue on SMART Transit and I can duplicate it locally.

The post with an alert that has an expiration won't honor the expiration and holds onto the alert level. This prevents the ability to use the alert level as the mechanism to show/not show an alert through the Query Loop.

Steps to reproduce

  1. Create a post
  2. Set an alert level (you may need to create an alert level)
  3. Set alert expires to "yes"
  4. Set a time for the alert to expire
  5. Wait for the time to expire.
  6. Check to see if the post still has the alert level associated to it.

Create `alerts/alert-banner` block

The first use case for this block is as a banner at the top of all views.

Block attributes

  • Display n alerts
  • Order by:
    • Most recent (default)
    • Alert level
      • Select from available alert levels and drag to reorder

Alerts 2.0

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.