Once announcements feed is converted to Dashboard, implement standardized notifications

Created on 20 April 2023, over 1 year ago

Problem/Motivation

As noted by @alexpott in this review of the announcements feed, the current implementation does not store per-user notification settings, and the mark as read functionality is fairly limited and could be overlooked without a user actually *reading* the content.

I think the code above leads to unexpected behaviour. By marking everything as seen here it means if someone quickly navigates through the announcement page then all of the announcements will be marked as seen. We also have some javascript that pretends to mark the announcement as read but really it only does a visual change. Ideally that would behave more like an inbox mark as read ie. we'd be posting something back to the site to mark the announcement as read.

Also the way the limit behaves feels wrong. If there are 10 announcements and you view the page you'll see all 10. Then if another announcement is posted the last announcement will disappear. If that contained information that you wanted to recall you might be very frustrated that there is no way to view older announcements.

I realise that some of this behaviour has been debated in the contrib module for example https://www.drupal.org/project/announce/issues/3249644 but the UX of new and limit don't feel right.

However, implementing a proper solution would require:

  • New DB tables OR relying on userData service to never be deleted
  • Wiring up the controller
  • New AJAX endpoints
  • New JS for the new mark as read behavior

Proposed resolution

These are all good things to do, but because there is an outstanding proposal to convert this whole feature to be part of a more modern dashboard implementation, it seems like the next best step might be:

  • Wait for the Dashboard contributors to implement a generic notification/mark as read strategy
  • Implement that for Announcements when it is converted to this Dashboard feature.

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

Feature request
Status

Postponed

Version

10.1

Component
Dashboard 

Last updated about 1 year ago

Created by

🇺🇸United States hestenet Portland, OR 🇺🇸

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024