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

PATTERN: embl-notifications #169

Closed
khawkins98 opened this issue Jan 21, 2019 · 2 comments
Closed

PATTERN: embl-notifications #169

khawkins98 opened this issue Jan 21, 2019 · 2 comments

Comments

@khawkins98
Copy link
Contributor

khawkins98 commented Jan 21, 2019

Paired with #162 (FEATURE: Make vf-banner--gdpr more reusable), we need an EMBL-specific way to distribute messages without having to touch code (this is in addition to allowing bespoke message to be included in-code).

The use case is:

  • OMG something big is happening
  • We need to
    • show vf-banner--phase on /news/* /about/*
    • Show vf-banner--modal on /front
  • It should have text "{options}"

To do this we need:

  1. A notification content type in the ContentHub:
    • message: html
    • type: phase|modal
    • display paths: embl.org/about/*;embl.org/front
    • if modal
      • data-vf-js-banner-state="static|dismissable|blocking" data-vf-js-banner-esc-close="y|n"
      • data-vf-js-banner-cookie-text="Dismiss"
      • data-vf-js-banner-cookie-name="mysite_gdpr"
      • data-vf-js-banner-cookie-version="0.1"
      • data-vf-js-banner-extra-button="<a href='#'>string1</a>\<a href='#'>string2</a>">
  2. These are all dumped to a JSON file
  3. Receiving field as part of the EMBL Boilerplate
    • <div class="embl-notifications" data-embl-js-notifications></div>
  4. JavaScript that:
    • gets current path
    • pulls in JSON of all notifications
    • sees which messages should be displayed
    • injects messages as appropriate vf-baner--phase or vf-banner--modal
@khawkins98
Copy link
Contributor Author

☝️ The above will require some ContentHub work, so we should probably improvise parts 1 & 2 with some pre-made JSON so we can focus on building the embl-notifcations banner.

@khawkins98
Copy link
Contributor Author

Added to backlog.

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

No branches or pull requests

1 participant