Project messaging channel in core (as experimental)

Created on 31 March 2021, over 3 years ago
Updated 31 May 2023, over 1 year ago

Problem/Motivation

Per the core idea issue: #2940739: Project messaging channel in core initiative β†’

The vast majority of Drupal users do not have accounts on Drupal.org, and likely do not regularly follow Drupal project news, or engage with communications channels that promote important updates, news and events, or support for the community and association.

The goal of this initiative is to provide a channel for messaging about the Drupal project within the administrative interface of core. This channel could provide information about upcoming releases, new feature highlights, events like DrupalCon, and promote support of the project via Association membership or other programs.

Proposed resolution

Guidelines

We agreed to develop the feature using the following guidelines:

  • Follow existing core patterns where possible
  • Reuse existing visual display/layout from the settings tray
  • Provide a notification icon in the primary toolbar
  • Consume a feed from Drupal.org

For initial inclusion, the following potential features were not in scope:

  • Configurable endpoints for multiple feeds.
  • An API for extensibility by other contributed modules.

Prototype

Initial design concepts were provided here: https://www.figma.com/proto/Ws4Gk0ImaripDb4NAlTvCBtZ/Community-Alerts---...

This announcement feature has been developed as part of contrib: https://www.drupal.org/project/announce β†’

Demo

This early demo shows an example of the announcement feed during the Contrib phase. It is not up to date with the latest changes from feedback in comments in this thread.

Original demo (outdated)

Remaining tasks

Steps to get this module into core

  1. Merge into core and market it as an experimental module, according to typical process for new core features.
  2. After a successful release as experimental, if no major changes are required, mark stable in following release.
  3. Add it to the standard profile (and maybe others)
  4. Figure out if and how to enable it on existing sites.

Follow-up

User interface changes

  • Adds a notification icon to the admin toolbar
  • Adds an announcement tray with a list of the announcements pulled from the feed

API changes

  • This feature does not add any public APIs

Data model changes

  • This feature uses cache tags in the user scope to handle read/unread status of announcements.

Security considerations

Release notes snippet

Drupal core now includes an announcements feed of project news from Drupal.org. This feed of announcements is displayed in the Drupal administrative toolbar to site owners/editors, tracking read/unread status with cache tags. Announcements may include: news about upcoming Drupal features, important information for site owners on older Drupal versions, and information about supporting the Drupal project through Drupal Association programs.

D7 Backport

This is an exceptional case where a backport to Drupal 7, even this late in Drupal 7's lifecycle, is likely worth our time. The large number of legacy sites on Drupal 7 are an audience we need to be able to reach, and this may be our only way to do so.

Contributors to D9 release

tedbow, Lal_, drumm, vimaljoseph, mohit_aghera, mitthukumawat, hestnet, Abhinand Gokhala K, AkshayAdhav

Testing

Drupalpod instance: https://gitpod.io/#snapshot/697e9aac-5820-4cbc-858b-0330ceeb35ba and then navigate to /admin/announcements_feed on the browser window.

See below as the feed might not work.

You will need to select which feed you want to test. You need to override the feed_url:

  • Copy sites/example.settings.local.php to sites/default/settings.local.php
  • Uncomment the last three lines of sites/default/settings.php to include the above file
  • IMPORTANT: On drupalpod, go to the Ports tab (besides Terminal tab), then go to port 8080 and make it public. Copy the URL of your pod instance for the next step.
  • Edit the sites/development.services.yml (on drupalpod repos/drupal/sites/development.services.yml!) and add announcements_feed.feed_url: https://DRUPAL-URL/core/modules/announcements_feed/tests/announce_feed/community-feeds.json to the parameters section (replace DRUPAL-URL with the URL of your testing instance). Alternatively, remove the above line, so it defaults to https://www.drupal.org/announcements.json
  • ddev drush php:eval "\Drupal::service('user.data')->delete('announcements_feed');\Drupal::service('keyvalue.expirable')->get('announcements_feed')->deleteAll();drupal_flush_all_caches();"

To trigger the notifications as new run: ddev drush php:eval "\Drupal::service('user.data')->delete('announcements_feed');drupal_flush_all_caches();"

✨ Feature request
Status

Fixed

Version

10.1 ✨

Component
Announcements feedΒ  β†’

Last updated 8 months ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States hestenet Portland, OR πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024