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)
Announcement Feed Video

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();"

CommentFileSizeAuthor
#198 Screenshot 2023-03-23 at 14-10-43 Add content dev1-web.png4.16 KBquietone
#189 Screenshot 2023-03-20 at 3.04.13 PM.png66.92 KBsmustgrave
#184 Screenshot 2023-03-20 at 9.35.04.png89.77 KBGábor Hojtsy
#166 Reports___Drupal_and_Sebin_Abraham_Jacob_-_Drupal_-_Slack_and_development_services_yml_—_drupal.png40.04 KBmherchel
#121 voiceover.mp41.37 MBrkoller
#119 highcontrast.jpg26.68 KBrkoller
#114 3206643-114.patch89.52 KBbenjifisher
#114 interdiff-3206643-112-114.txt4.47 KBbenjifisher
#112 3206643-112.patch89.51 KBbenjifisher
#112 interdiff-3206643-110-112.txt9.29 KBbenjifisher
#110 3206643-110.patch89.48 KBbenjifisher
#110 interdiff-3206643-108-110.txt8.54 KBbenjifisher
#108 3206643-108.patch99.17 KBbenjifisher
#108 interdiff-3206643-107-108.txt6.18 KBbenjifisher
#107 3206643-107.patch99.01 KBbenjifisher
#107 3206643-99-107.diff1.84 KBbenjifisher
#99 3206643-97-reroll.patch100.4 KBmherchel
#91 interdiff_3206643_88-91.txt3.62 KBankithashetty
#91 3206643-91.patch101.62 KBankithashetty
#88 announce-88.patch101.85 KBLal_
#82 3206643-82.patch101.2 KBLal_
#80 3206643-80.patch89.71 KBLal_
#79 3206643-79.patch89.71 KBLal_
#78 3206643-78.patch89.71 KBLal_
#70 announcement-feeds-demo.gif14.15 MBAkshayAdhav
#68 3206643-68.patch94.38 KBLal_
#66 interdiff_65_66.txt17.9 KBLal_
#66 3206643-66.patch94.39 KBLal_
#65 3206643-65.patch105.04 KBLal_
#64 interdiff-58-54.txt57.8 KBLal_
#64 3206643-64.patch104.5 KBLal_
#62 Announcment-Feeds.gif18.89 MBmohit_aghera
#61 Announcment-Feeds.mp43.09 MBmohit_aghera
#58 announce-58.patch103.92 KBLal_
#57 Captura de Pantalla 2021-10-25 a les 12.25.21.png30.8 KBckrina
#54 3206643-54.patch108.02 KBLal_
#51 3206643-51.patch108 KBLal_
#48 3206643-48.patch108 KBLal_
#46 3206643-46.patch107.99 KBLal_
#44 3206643-44.patch106.42 KBLal_
#42 3206643-42.patch106.43 KBLal_
#40 3206643-40.patch85.6 KBLal_
#37 megaphone.png12.77 KBckrina
#35 projects-message.gif8.82 MBckrina
#35 links.png25.88 KBckrina
#35 icon.png19.11 KBckrina
#14 announcement-old_notification_screen_shot.png157.17 KBLal_
#14 annoucement-notification.png21.49 KBLal_
#14 annoucement-New_notification_screenshot.png155.6 KBLal_

Issue fork drupal-3206643

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hestenet created an issue. See original summary.

hestenet’s picture

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Darren Oh’s picture

This could use the Aggregator module.

hestenet’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes

mohit_aghera made their first commit to this issue’s fork.

mohit_aghera’s picture

Did initial push from the module's repository:
Commit id: 176b3cb6cbe70799a208a63da0152f8d81796ee2

mohit_aghera’s picture

Issue summary: View changes
Lal_’s picture

Adding screenshots of the current module.

mohit_aghera’s picture

Issue summary: View changes
mohit_aghera’s picture

Issue summary: View changes
hestenet’s picture

Status: Active » Needs review
Issue tags: -Needs tests +Needs change record, +Needs release note
Gábor Hojtsy’s picture

In the red dot image, the bell has a background that is different from the actual toolbar background, is that a current screenshot? The non red-dot screenshots don't seem to have that.

Gábor Hojtsy’s picture

1. Also looks like this feature is encapsulated in a module which would allow people to disable it. There I noticed this needs to be fixed in the info.yml:

description: Module for notify latest updates from drupal community

That should be more like:

description: Notifies site users about latest updates from the Drupal community

There may be more text to review, I only noticed this because I looked at how its enabled and whether it can be disabled.

2. I also noticed that this feature is entirely opt-in (not added to either install profile as far as I see). Is that intentional for this step or as a final solution?

3. Re "determine if we need to start as experimental, or can skip experimental since it is not a site-feature" from the issue summary, this is a site feature. Admin facing features are still site features? The question is how much would you expect the API to change, or if at all there is an API even.

hestenet’s picture

@Gábor - thanks for the review and catching some key items

  1. Agree on the changes to description text - your suggestion looks good.
  2. I also agree, we should likely enable this in at least the default site profile, probably all the shipping profiles.
  3. I suppose that was meant to say 'since it's not a *site building* feature' does that affect whether it needs to be experimental or not. There is no api really at this point. It points to the Drupal.org feed, and there were notions about a '2.0' version having multiple, user configurable endpoints - but I think that's out of scope.
shaal’s picture

For those interested in testing the Announce module on Drupal 9.3.x,
I created a snapshot, using DrupalPod -

  • Using issue fork - 3206643-project-messaging-channel
  • Latest commit #854ba58c
  • Installed Standard profile
  • Enabled Announce module

Username: admin
Password: admin

Click on the following link to open it -
When you see Gitpod's login screen, choose "Continue with Github".
https://gitpod.io/#snapshot/31d89281-104e-4394-85fb-acc624f5e0f0

shaal’s picture

Status: Needs review » Needs work

Based on #3052002: [meta] Replace JQuery with vanilla Javascript in core, we should avoid using jQuery in new code we're adding to core, vanilla JavaScript is probably sufficient.

Accessibility -
There is not enough color contrast in the content of announcements.

The "Announcement" component that displays and hides a dialog, should let screen-readers know about visual change, more details here - https://adrianroselli.com/2020/05/disclosure-widgets.html

andrewmacpherson’s picture

I'm concerned about the machine-name of the module: announce.

  • In Composer, this is going to be known as drupal/announce.
  • In *.info.yml files, it will be known as drupal:announce in the dependencies section.
  • The new module introduces new libraries called drupal.announce.dialog and drupal.announce.toolbar.

Meanwhile, there is already a library in core drupal.announce, which provides a Javascript API called Drupal.announce. (It's a clumsy-yet-effective tool for when there isn't a better way to convey important changes to screen reader users.)

I'm not sure if this is a hard namespace conflict which will break things. However I'm sure it amounts to a soft namespace conflict which conflates two separate core features. I expect this will lead to confusion and misunderstanding with respect to documentation/training materials, developer experience, site builder experience, and the Drupal blogosphere generally.

So I'd propose that this module needs to be renamed before being added to core. I don't think it's practical to rename the existing library because of backwards-compatibility commitments.


Re. #26: Beware of conflating dialogs and disclosure widgets. These are not the same thing at all. You mention a dialog, but the linked article does not.

Which behaviour is it: a control which invokes a dialog, or a disclosure widget? That's going to make a difference to how the change of content is conveyed.

I share the concerns about the colour contrast. We'll need measurements, but I'm pretty sure these look poor.


Only one of the messages has an associated "learn more" link. Why don't the others have this? I'm pretty sure I'd want to learn more about the security releases, say.


Some accessibility stuff...

The icons will need to be adaptable to forced-colors modes (previously a.k.a. Windows high-contrast mode). So far, we don't have any multi-colour icons in the toolbar. It's going to need a monochrome representation too.

The screenshots have a lot of dots. What is a dot supposed to signify? It's too vague I think.

The "learn more" link looks like a button, but it behaves as a link. It would be better if it looked like a link, namely underlined text rather than a 4-sided border.

The "learn more" link has _target="blank" which is a massive pain-in-the-accessible, especially since there is no warning that it will open a new window. It fails WCAG SC 3.2.5 Change On Request (level AAA). We really-really-really need to minimise the use of this attribute. In this case, let's just remove it.

I haven't done any other accessibility review yet, or even used the module, so this comment doesn't amount to sign-off.

andrewmacpherson’s picture

The templates need documentation

Lal_’s picture

Re #27 Only one of the messages has an associated "learn more" link. Why don't the others have this? I'm pretty sure I'd want to learn more about the security releases, say.The one with the sticky key as true will be acting as a featured announcement and that will have a learn more button. Whereas the other one (the one in white) instead of the learn button the title(link) will be clickable.

AaronMcHale’s picture

One big concern I have here is that this would introduce a whole new pattern in the form of the dialogue/widget/whatever-you-call-it that drops down from the "Announcements" toolbar button (I'm going to just call it "new component" in this post for simplicity).

This new component introduces a new CSS and some JavaScript, this means additional user interface elements to maintain. Core already provides the off-canvas dialogue, and I think it would be better if that were to just be used here.

The off-canvas dialogue could probably also use some love, but it does not make sense to introduce an entirely new component into Core, with its own separate CSS/JS, when what we already have a suitable component ready to be used.

The existing off-canvas dialogue has already gone through accessibility compliance and is already well integrated with Core and contrib. The idea that we should then introduce another, very similar component, with its own design, which requires its own separate long-term maintenance, makes me nervous. We should be aiming for consistency in our Core UI, not divergence.

Thanks,
-Aaron

vimaljoseph’s picture

The module is using drupal off-canvas dialogue. See https://git.drupalcode.org/project/announce/-/blob/1.x/announce.module

hestenet’s picture

I'm concerned about the machine-name of the module: announce.

* In Composer, this is going to be known as drupal/announce.
* In *.info.yml files, it will be known as drupal:announce in the
dependencies section.
* The new module introduces new libraries called drupal.announce.dialog and
drupal.announce.toolbar.

Meanwhile, there is already a library in core drupal.announce, which provides
a Javascript API called Drupal.announce. (It's a clumsy-yet-effective tool
for when there isn't a better way to convey important changes to screen
reader users.)

I'm not sure if this is a /hard/ namespace conflict which will break things.
However I'm sure it amounts to a /soft/ namespace conflict which conflates
two separate core features. I expect this will lead to confusion and
misunderstanding with respect to documentation/training materials, developer
experience, site builder experience, and the Drupal blogosphere generally.

So I'd propose that this module needs to be renamed before being added to
core. I don't think it's practical to rename the existing library because of
backwards-compatibility commitments.

------------------------------------------------------------------------------

Would 'announcements' be free of namespace collision? That seems like a small enough change and just as descriptive

AaronMcHale’s picture

The module is using drupal off-canvas dialogue. See https://git.drupalcode.org/project/announce/-/blob/1.x/announce.module

Oh thanks, that's interesting, from the screenshots in the IS it didn't look like it.

The question remains though about a lot of custom CSS. Was there a conscious decision taken not to use the default styling of the off-canvas dialogue? I'm still thinking about the fact that it's basically introducing a completely different visual style here which is unique to this particular implementation.

nod_’s picture

I opened an issue in the module queue, otherwise i think it'll be very hard to keep track of all the feedback #3233439: JS fixes. In short: JS needs some work, using dialogs API directly, not using jquery when it's not needed, using data attributes instead of classes.

Some feedback not captured in the opened issue:

  1. I would expect some validation on the link to make sure it's a Drupal/DA controlled domain that it points to. To make sure that if/when the feed itself is compromised we don't send people to a malicious URL.
  2. The experience is a bit jarring, clicking several times on the announcement link makes the bar "flash" because it's making a new request instead of updating what's in there (or not doing anything), probably needs some discussion around what we expect to happen. I would go for several clicks = toggle the sidebar (without refreshing) to keep thing in line with the other buttons of the toolbar
  3. The icon looks fuzzy to me, it's too small to have shading (or have several version based on display density). Just noticed it's a png, any reason why it's not a svg as well?
  4. There is a cache by user but if I dismiss a featured announcement it just comes back on the next page reload. I would expect the announcement to not be shown or be shown as a non-featured item. Or maybe it's a feature that it's very visible all the time
  5. The contrast ratio of the "normal" updates probably doesn't pass accessibility guidelines. It's hard to read for me at least
  6. The style is not consistent between the different theme, on claro and olivero there are difference in spacing, alignement, and even the style of the close button
  7. For the /announcement page, it should probably be rendered in the admin theme and not the frontend theme no? The announcement toolbar button should probably also be hidden when on that page. There are style missing for the focused close button when viewed as a page
  8. Thinking about it we should probably remove the close button altogether from the focused announcement, it doesn't do anything, what is needed is a way to downgrade the focused announcement to a "normal" one after a while to avoid showing the same thing all the time if there aren't many announcements.
  9. Focus style are missing for the "Learn more" button, can't see anything when it's keyboard focused

The contrib module is not in sync with this merge request, I'd advise to keep the two very close as I expect there will be a good number of comments and requests for updates. That's what being done for the CKeditor5 module, see #3201824: Roadmap to core and #3231364: Add CKEditor 5 module to Drupal core. The core merge request is generated by a script, i think it'd be a good idea to follow a similar pattern here. Issues that touch on UX always tend to take a while to get in with many discussions, it's easier to manage and follow when each point has it's own issue. (Like the accessibility feedback could have it's own issue to discuss all accessibility related implications of this new UI, without interferring with folks whose main concern is JS or PHP or CSS :)

But so far it's exciting to see this running on a site!

ckrina’s picture

FileSize
19.11 KB
25.88 KB
8.82 MB

For those willing to see it in action, here's an small gif showing the last code locally:

On a UX perspective, I'm concerned about how to better communicate visually that those are external links. Specially if it's a forced _target="blank" as @andrewmacpherson mentions. An option would be the standard external icon.

On a Design perspective, I think Design should be its own independent point in the remaining tasks list. ;)
1. First, this doesn't follow neither the current Design System Claro is implementing nor Seven's. My guess is this implementation is based on Ana Barcelona's work a while ago and the designs have evolved since then. For example, there aren't outlined buttons anymore (like the one on the blue region).
2. Another point is that links should be blue and underlined. Other visual elements should ideally be used to show that that's been "read" instead of lowering the color to gray, like block background color, icons, or just use a different elements instead of a basic link.

3. The bell icon, could be simplified to play better with the rest of the icons. On the left, the current icon. On the right, an example of a simpler icon style (no the same color tough).

On a code perspective:
1. I'd say that we shouldn't be using PNG for icons: it should be SVGs so some accessibility concerns like the ones expressed by Andrew in #27 can be addressed.
2. This is also introducing a lot of opinionated CSS (that, as @AaronMcHale mentions, will need to be maintained) that is not following existing guidelines. How will this look like on a site using Seven? I think @lauriii can actually give way better feedback here, but ideally a module should just introduce the minimum styles to make it work and let each of the admin themes add its own visual styles.
3. As you can see on the GIF I've uploaded, there's an overlap between the title and the close button on narrow screens.

Anyway, thanks for posting this here and the chance to have this feedback round with some code to test already! :)

andrewmacpherson’s picture

Re. #29:

The one with the sticky key as true will be acting as a featured announcement and that will have a learn more button. Whereas the other one (the one in white) instead of the learn button the title(link) will be clickable.

Aha, thanks. They don't look like links, which ckrina mentions in #35.


Re. #32:

Would 'announcements' be free of namespace collision? That seems like a small enough change and just as descriptive

That certainly avoids a hard namespace conflict. However I think the soft conflict is still there.

A thesaurus wasn't much help. Broadcast, notice, and update were the best alternatives I could find. Various contrib modules have already used up a lot of possible terms.

Instead of looking for an variation on "announce", could we name it after where the messages come from? Recalling the goal, emphasis mine:

The goal of this initiative is to provide a channel for messaging about the Drupal project

How about "drupal project announcement", "drupal community news", or something along those lines?

Is there any intention for this UI and/or API to convey messages which don't come from drupal.org as community announcements?


Re. #35:

On a UX perspective, I'm concerned about how to better communicate visually that those are external links. Specially if it's a forced _target="blank" as @andrewmacpherson mentions. An option would be the standard external icon.

It would be far preferable if the _target=blank wasn't used here, regardless of whether we want to tell people it's an external link.

External-link icons haven't been particularly consistent over the years, and are sometimes confused with share/send actions. I recall the UK government dropped them in favour of visible text to say it was external.

The new bell icon is excellent. I was also going to suggest using a cut-out instead of overlap. It will adapt to forced-colour modes in monochrome; the bell and circle-badge will be the same colour, with a clear separator line. That's a strong affordance that it's an additional badge applied to the bell.


Do the disks on the right hand side signify anything? I was wondering if they mean new or un-visited. I think text would convey this more clearly: "new" is what forum module uses.

ggVG

ckrina’s picture

FileSize
12.77 KB

Quick small design feedback: I think the icon that would work better to represent the purpose would be a megaphone.

Edit: Be aware the icons from The Noun Project have a license. We should create our own SVG icon.

hestenet’s picture

Issue summary: View changes

Updated the issue summary with a more detailed release notes snippet and a section on governance of the feed. Posting in this comment as well:

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.

Governance

To publish a new piece to this announcements feed should require an extra level of governance and oversight.

Proposed governance:

  • Sign off by a designated Drupal Association staff member
  • Sign off by a Drupal Core product manager (per maintainers.txt)
  • (When relevant) sign off by another key stakeholder - such as a security working group member for announcements related to security issues, for example.
Lal_’s picture

As nod_ suggested, this issue is going to follow an automated patch-based approach like #3231364: Add CKEditor 5 module to Drupal core see #3238706

Lal_’s picture

Changes fixed on this patch:
1) Add a check to confirm a particular link is generated from a Drupal/DA controlled domain.
2) Module Rename from announce to announcements_feed.
3) Replace jQuery with vanilla JS.

Lal_’s picture

Status: Needs work » Needs review

Triggering the test bot

Lal_’s picture

Lal_’s picture

Status: Needs review » Needs work

The last submitted patch, 44: 3206643-44.patch, failed testing. View results

Lal_’s picture

Status: Needs work » Needs review
FileSize
107.99 KB

Status: Needs review » Needs work

The last submitted patch, 46: 3206643-46.patch, failed testing. View results

Lal_’s picture

Unable to run this test locally due to its huge loading time. I believe this will fix it.

Lal_’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 48: 3206643-48.patch, failed testing. View results

Lal_’s picture

Lal_’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 51: 3206643-51.patch, failed testing. View results

Lal_’s picture

Status: Needs work » Needs review
FileSize
108.02 KB

Changes fixed on this patch:
1) Add a check to confirm a particular link is generated from a Drupal/DA controlled domain.
2) Module Rename from announce to announcements_feed.
3) Replace jQuery with vanilla JS.

Lal_’s picture

Status: Needs review » Needs work
andrewmacpherson’s picture

Re. #37:

At first glance this icon looked to me like an axe! I think that's a problem with 2-dimensional silhouette icons. Some of the other megaphone icons on the Noun Project page look clearer:

  • Some are 3-dimensional. The megaphone's cone shape is apparent.
  • Many have some extra lines, the common cartoon way of showing that sound is coming out of it.
  • Many have the central part which sticks out from the middle of the megaphone cone.
  • A few have a person holding the megaphone. These are verb-focused (talk) rather than noun-focused (megaphone).

I don't recall seeing a megaphone icon before. (A very similar-looking icon is a side view of a loudspeaker, which is often used for volume control.)

I don't have hard numbers, but I think the bell icon is a more common icon for "notify" or "message"?

A speech bubble is another icon which could work for announcement.

ckrina’s picture

I think there are a few things that need to be improved before considering a +1. I’m concerned with Claro’s blue and other styles forced into all themes with this CSS.

To give you an idea of what I would expect from this project minimum styles, this is how it would look like reusing the off-canvas already existing styles.

I’ve removed locally all the opinionated CSS in announcements_feed.dialog.css, like colors, and left only paddings/margins and hidden undesired visual elements like the default title pencil icon.
Claro’s visual improvements can be added later as a follow-up, or at least they shouldn't appear when Seven is enabled right now.

Also, it would be great if someone could update the summary with Testing instructions for the patch. I’d like to know how to reproduce the content shown on the summary screenshots:
- How can be added a highlighted announce? I’d love to check how this is shown without Claro styles.
- How can several announcements be added? I’d love to see how it behaves with longer and multilingual text.

Re #56 about the icon: I totally agree on a bell as a better representation for notifications, but the module descriptions says “Notifies site users about latest updates from the Drupal community”. I suggested a speaker because I understood this is not supposed to be a user or site notification feature, but a the community announcements channel.

But reading the Release notes snippet from summary the sentence “important information for site owners on older Drupal version” confuses me:
> 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.

If this is supposed to just communicate generic information (not targeted to the current site) I see this type of content different to the site/user communications/notifications. If this is supposed to be integrated at some point as “notifications” (like current site’s updates) maybe it should be something to discuss here. I wouldn't see the Toolbar icon as a blocker at this point, but I think it'd be good to make clearer what this project isn't supposed to be (a site's notification place, if I'm right).

Lal_’s picture

Lal_’s picture

Status: Needs work » Needs review
Lal_’s picture

re #57

  1. go to the module service file there you can change the url parameter...
  2. Since the announcement is tempstored wrt time you might forcefully delete it from the db so run this\Drupal::service('keyvalue.expirable')->get('announce')->delete('announcements'); on your drush php
mohit_aghera’s picture

Issue summary: View changes
FileSize
3.09 MB
mohit_aghera’s picture

Issue summary: View changes
FileSize
18.89 MB

Status: Needs review » Needs work

The last submitted patch, 58: announce-58.patch, failed testing. View results

Lal_’s picture

Status: Needs work » Needs review
FileSize
104.5 KB
57.8 KB
Lal_’s picture

Fixes form this patch includes:

  • 3243253-css-refactoring-for: Fixed css linting errors.
  • Make announcements_feed_hook_help() comply with the format expected by Drupal core.
  • CSS added to claro and seven theme to accommodate the style

Refer to the gif.

Lal_’s picture

Status: Needs review » Needs work

The last submitted patch, 66: 3206643-66.patch, failed testing. View results

Lal_’s picture

Lal_’s picture

Status: Needs work » Needs review
AkshayAdhav’s picture

FileSize
14.15 MB

CSS refactoring changes.

mohit_aghera’s picture

Issue summary: View changes
ckrina’s picture

Some CSS improvements I'd see here are:

  1. +++ b/core/modules/announcements_feed/css/announcements_feed.dialog.css
    @@ -0,0 +1,62 @@
    +  background-image: url(../images/close_announce.svg);
    

    Wouldn't it be better to just reuse/link the existing one in core under /core/misc/icons/bebebe/ex.svg? You can check how Layout Builder is implementing it.

  2. +++ b/core/modules/announcements_feed/css/announcements_feed.toolbar.css
    @@ -0,0 +1,14 @@
    +  background-image: url("../images/new-announcement-bell.svg");
    

    Maybe the red circle could be done with the ::after sub-element so there's no need to add another SVG file that looks almost the same.

3. Also, on a UX/behavior perspective about the Toolbar link: the rest of the items on the Toolbar, when they're clicked when the sub-menu is opened (like the Manage item), close the sub-menu. I would expect the same: if the Announce tray is opened when the user clicks on it, it should close the Settings Tray.

lauriii’s picture

lauriii’s picture

Version: 9.3.x-dev » 9.4.x-dev
Issue tags: +Needs issue summary update

I tried to work on the announce module this week but I found it a little hard to make significant progress on this because the high level plans for this project are still a little unclear to me. I've read the ideas queue issue #2940739: Project messaging channel in core initiative but it didn't answer all of my questions. It explains the high level goals, but doesn't really go into much detail on how we are trying to solve that. I'm wondering if some of the discussion that has happened in person has been documented somewhere outside of the issue?

There are couple of issues in the announce module issue queue that are asking clarification on some of the key concepts (#3249644: Clarify behavior of announcements, new, viewed, hiding, etc. and #3249625: Document difference between featured and standard announcements). It would be useful to work on those, and document the outcome in the module, as well as potentially adding a summary to this issue. It's important that there's enough understanding on how this new module is intended to work before it is added to core, to make sure that it can be maintained in long term.


Are we planning to add this module to standard install profile? Are there plans on enabling this module on existing sites? If we are not adding this module to standard install profile, or enabling it on existing sites, how are we getting users to enable this module on their sites? What's the value the users get out of the module that makes them install it?


The style is not consistent between the different theme, on claro and olivero there are difference in spacing, alignement, and even the style of the close button

Is there already a plan how we can make the design consistent across different themes?

nod_’s picture

To add to what lauriii wrote above it was not clear what type of communication would be pushed thought that module initially.

Would it be possible to have a list of the last 5 communications (just the titles at least) that would have made it in that feed based on the past few months? The communication style of the DA which is very US-like and doesn't work as well in the rest of the world. Are the person/team in charge of approving communications all going to be US-based or will there be a mix of locations?

AaronMcHale’s picture

Possibly a relevant issue for the recent discussion.

hestenet’s picture

Issue summary: View changes
Lal_’s picture

Lal_’s picture

Opps forgot to take the latest pull.

Lal_’s picture

Status: Needs review » Needs work

The last submitted patch, 80: 3206643-80.patch, failed testing. View results

Lal_’s picture

Status: Needs work » Needs review
FileSize
101.2 KB

Some issues fixed:

#3248673: Toggle announcement dialog on clicking toolbar link.
 #3250089 "Remove close button. 
#3249521: Various documentation fixes 
#3249860: Rename templates according to core convention
#3249629 : Simplify regex in.
#3249535: Config and state keys used are incorrect (still using old module name).
#3249661: Filtering for Drupal version is only done on newly loaded announcements.
 #3249640: Implement BEM in the twigs.
#3250091: Remove duplicate ids

#72 is addressed and resolved.

irinaz’s picture

I tested patch #3206643-82.patch and have the following results

  • I can enable module and see announcements feed without any issues
  • Only one items is visible with date in 2021, as expected from https://www.drupal.org/announcements.json
  • Items without body do not show up in feed
  • Extra drush step for is required for publishing so we can review it before something goes to every site.
hestenet’s picture

Issue summary: View changes

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

hestenet’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes

Posting a draft blog to act as the first 'official' content in the feed. The idea is this will set expectations for what site owners can expect in future posts.

https://docs.google.com/document/d/1d5Uq1ORQDy5bW_3WAyyorEVuHCtZBBB_aKMt...

Next steps

  • Need to get this issue to RTBC so we can get it committed
  • Need to review the first post with core folks according to governance policy and get it posted
Lal_’s picture

matiasmiranda’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

cilefen’s picture

Status: Reviewed & tested by the community » Needs work

The last patch does not apply to the branch.

@matiasmiranda Thanks for reviewing! It would be better to know what you did to review it and to ensure any criticism listed above has been fixed.

ankithashetty’s picture

Status: Needs work » Needs review
FileSize
101.62 KB
3.62 KB

Uploaded a rerolled patch, thanks!

Lal_’s picture

+++ b/composer.lock
--- b/core/modules/announcements_feed/tests/modules/announce_feed_test/src/Controller/AnnounceTestController.php
+++ a/core/modules/system/tests/modules/advisory_feed_test/src/Controller/AdvisoryTestController.php

hmmm is the interdiff wrong ???

xjm’s picture

Version: 9.5.x-dev » 10.1.x-dev

 

xjm’s picture

Re: #92, the diffstat also does not match the previous patch, so someone should check over the reroll carefully.

We also still need usability and accessibility signoff here before this issue is marked RTBC.

#75 also does not seem to have been addressed yet, and it's unclear to me whether IS updates addressed #74 or not either. It's also not clear to me if #72 has been addressed... etc. In general, when posting new patches or updating the IS, please also indicate which previous reviews are (or aren't) addressed by the update. Thanks!

rkoller’s picture

Status: Needs review » Needs work

I've tried to apply the patch from #91 to a fresh install of Drupal 9.5.x-dev@dev and it failed to apply unfortunately. But based on #93 a reroll might be required anyway.

In regards of the UX review I could put it on the agenda of next weeks meeting? It takes place on the 15th of july Friday at 14:00 UTC (currently 7:00am PT, 10:00am ET). Today there won't be a regular meeting it looks like and that would also have been on too short notice for someone to join to present and or for answering questions probably. Because it proofed helpful if someone familiar with an issue could find the time to attend the meeting.

mherchel’s picture

Title: Project messaging channel in core » Project messaging channel in core (as experimental)
Issue summary: View changes

Updating title and summary with new tasks

mherchel’s picture

Issue summary: View changes

Are we planning to add this module to standard install profile?

The plan is to add this eventually. This can be handled in a followup issue. First step is to get into core as experimental.

Are there plans on enabling this module on existing sites?

I think this is a great idea, however this needs to happen later in a followup issue.

Updating issue summary.

irinaz’s picture

@Lal_, would it be possible to move to Merge request instead of using patch or it is too complex at this time?

mherchel’s picture

Status: Needs work » Needs review
FileSize
100.4 KB

Re-roll of #91 for Drupal 9.5.x. Note that I removed the composer changes because of https://www.drupal.org/node/3295096

mherchel’s picture

Issue summary: View changes

Adding @todo item in issue summary:

Figure out if this is realistically going into Drupal 9, or should we just target D10

hestenet’s picture

Just as a note:

Totally separately from the technical considerations of what version we target to get this committed (and at this point, targeting 10 might be the best choice) - we may still want to consider the value of backporting for communications reasons.

Part of the reason to add this channel is so that we have some way to reach site owners who might not read Drupal news, subscribe to a newsletter, etc --- and it may aid us in future end of life - security announcements - etc. (Hence the child issue for a d7 backport even)

That conversation doesn't need to block anything though! We can revisit possible backports after we get an initial commit.

mherchel’s picture

Status: Needs review » Needs work

I reached out to @Gábor Hojtsy in Slack at https://drupal.slack.com/archives/C1BMUQ9U6/p1658422784574099

From that thread

Some committers had concerns about the contents of the feed, governance around that, etc. to be defined before any technology ends up in core. Better/more sample messages. I think @lauriii was vocal about this? If memory serves right.

We need a followup issue for this.

Some committers were concerned about the custom solution to a newfeeds basically, but since we are removing RSS support in core in Drupal 10, its probably what it is. Nevertheless agreement on that would be important. Framework managers would be appropriate for this

This can probably be done in this issue.

This could only land in Drupal 10.1, but that is not too far off, I mean the dev branch possibility. That branch is already open and with the Drupal 10 beta it should be the target for stuff anyway in about 50 days.

We'll need to re-roll this patch for Drupal 10.0.1

There were concerns about the functionality of reading tracking, etc. and how useful is it on the level its implemented now.

We should probably take care of this in this issue.

hestenet’s picture

From that thread

Some committers had concerns about the contents of the feed, governance around that, etc. to be defined before any technology ends up in core. Better/more sample messages. I think @lauriii was vocal about this? If memory serves right.

We need a followup issue for this.

We had a follow-up issue for governance that was resolved here: #3071994: Document approval process for what appears in the official Drupal project messaging feed I will update to link to the proposed first post.

benjifisher’s picture

Issue summary: View changes

Does this issue still need usability review? The issue tag is still there, but it was removed from the "Remaining tasks" in the issue summary in #84.

I tested the patch in #99, and it applies cleanly to the current 9.5.x branch. I will cross off that item from the list.

I tested giving a user the permission from this module but not permission to see the Toolbar, and the result is that my test user could not see the notifications. It might be worth mentioning that in the description (help text) for the permission, or it might be a good idea to have more than one way to view the notifications.

We discussed this issue at #3236318: Drupal Usability Meeting 2021-09-24, but it seems that none of us left a comment here to summarize the discussion. That issue has a link to a recording of the meeting.

irinaz’s picture

@benjifisher, does that mean that with patch #99 this issue status can be changed to "Needs review" or it is still "Needs work"?

benjifisher’s picture

It is too late to get this issue into Drupal 9.5 or 10.0, so this issue should target 10.1. Since the patch in #99 for 10.1.x failed static analysis, the status should still be NW.

benjifisher’s picture

FileSize
1.84 KB
99.01 KB

I am attaching a patch based on the one from #99, with merge conflicts resolved for 10.1.x. I am also attaching a diff (not an interdiff, since it is a reroll).

Running the core checks locally, I see the same failures that the testbot reported in #99, so I am asking the testbot to ignore this patch.

benjifisher’s picture

Status: Needs work » Needs review
FileSize
6.18 KB
99.17 KB

The attached patch fixes the problems detected by static analysis. +1 for the changes required by PHPStan.

The changes to the JS file are the result of

yarn run -s lint:core-js-passing --fix modules/announcements_feed/js/announcements_feed.announcement.js

(from the core/ directory).

Back to NR.

Status: Needs review » Needs work

The last submitted patch, 108: 3206643-108.patch, failed testing. View results

benjifisher’s picture

Status: Needs work » Needs review
FileSize
8.54 KB
89.48 KB

Remove all files added to the seven and stable themes.

Status: Needs review » Needs work

The last submitted patch, 110: 3206643-110.patch, failed testing. View results

benjifisher’s picture

Status: Needs work » Needs review
FileSize
9.29 KB
89.51 KB

I figured out why the tests were failing: I am testing with Drupal 10, and each test announcement specifies a version constraint: 8 or 9 or both. The tests expect to find at least one announcement (for the current version) but there are none. I suppose I could have added new test announcements, but instead I promoted 8 ->9 and 9 -> 10.

All the failing tests from #110 now pass locally, so this patch may get past the testbot.

Status: Needs review » Needs work

The last submitted patch, 112: 3206643-112.patch, failed testing. View results

benjifisher’s picture

Status: Needs work » Needs review
FileSize
4.47 KB
89.52 KB

In #112, I fixed the FunctionalJavascript tests that were failing, but my change to the fixtures also broke the Kernel tests. The attached patch fixes those.

benjifisher’s picture

Status: Needs review » Needs work
Issue tags: -Needs usability review +Needs followup

Usability review

We discussed this issue at #3236318: Drupal Usability Meeting 2021-09-24, but at that time no one left a comment here. There is a link on that issue to a recording of the discussion.

As I recall, the consensus at that meeting is that it would be better to revive a dashboard: by default, users see the dashboard when they log in, and that would be a better place to show the announcements. Seeing announcements on login may be just as effective as the link in the toolbar, and there would be less clutter in the toolbar.

We discussed this issue again at #3315240: Drupal Usability Meeting 2022-10-21. That issue will have a link to a recording. We still think that a dashboard is the better approach. This time around, there was more support for the toolbar/settings tray approach as an interim solution. There was still some concern that this approach would make it harder to switch to a dashboard in the long run, and that it adds too much clutter to the toolbar.

The main usability problem we identified is that the red dot is not an effective way to indicate that there are new announcements:

  • It is generally bad practice for color to be the only indicator.
  • The difference in shape is easy to miss.
  • The red dot is easy to miss for users with limited vision.

We considered a few alternatives, such as the number of new announcements before the word "Announcements". Using the same colors (white text on black) makes it easy to read, but that does not suggest that the number refers to the count of new announcements rather than the total. We think that putting a circle around the number, or using a light, colored background for the number, would suggest that. This is a common pattern in mail apps for mobile devices, for example.

One advantage of putting the announcements on a dashboard is that there is more room to convey the information that there are new ones.

Since we would like to see the announcements added to a dashboard as the long-term solution, there should be some way to make that happen. I am adding the tag for a follow-up issue: we should have an issue to integrate with Views, or have some other way to create an Announcements block.

Another feature request (can be a follow-up issue) is that we provide an individual option to opt out entirely, or to show the link only when there are new announcements.

We had some other suggestions that are not really related to usability. Some are more the responsibility of the release manager. We were concerned that this module does just one thing, and is not easily extensible. Perhaps the architecture could be changed: separate the job of fetching announcements from the job of adding them to the toolbar and the off-canvas dialogue. One or both of those features might be easier to use for other purposes.

In fact, the job of fetching data from an external feed used to be the job of the Aggregator module. Didn’t we just decide to remove that from Drupal core?

As work continues on this feature, keep in mind extensibility and think about transitioning to a dashboard solution. For example, there has already been discussion of supporting more than one feed. (Is there a separate issue for that yet?) Perhaps the internal data structure (the variables passed to the Twig template, not the structure of the feed) should include some identifier for the feed.

For the record, the attendees at today's usability meeting were @AaronMcHale, @benjifisher, @rkoller, @shaal, @simohell, and @worldlinemine.

AaronMcHale’s picture

irinaz’s picture

@benjifisher, thanks for posting meeting notes. It would be good to complete this feature and add to D10, and keep dashboard a separate project. I am not clear if this issue needs work (coding) or it can be tested? Thanks for all the work on this issue!

rkoller’s picture

FileSize
26.68 KB

i've taken a look at MR2889. One detail i've noticed the color contrast for the label New in red has a too low color contrast. The text has a color of red #ff0000/rgb(255,0,0) and a background color of #464646/rgb(70,70,70) which leads to a color contrast of 2,36:1 but 4,5:1 would be required (ref WCAG SC 1.4.3).

in high contrast mode in edge (on macos) the pencil disappears and the closing the sidebar button has also a low color contrast.
the announcements sidebar in forced high contrast mode in edge

and i wonder currently the announcements menu item is a link like the other top level ones but it doesnt have the role button. that way it is listed in the rotor under links instead of form controls. the advantage of having a form control like devel (in case installed), shortcuts or manage. the item is announced with for example shortcuts toggle button. and it would also be possible to announce the change of state for the sidebar like devel does with the secondary menu. on key press it announces:

tray "developement menu" opened
or
tray "developement menu" closed

currently when pressing the announcements link the sidebar title immediately gets announced followed by the first content link. having an announcement about the state might be helpful and slow things down?

mherchel’s picture

@rkoller Did you test this in D9 or D10? From what I recall, the pencil/closing icons are problems with the off-canvas menu that still exist in D9 but are fixed in D10.

rkoller’s picture

FileSize
1.37 MB

woops forgot to mention the version number. sorry. i've tested on 10.1.x-dev. went with the version the issue is targeted to.

and one addition to #119 . done a short screen recording using voiceover to illustrate the points about the toggle button and the announcements.

irinaz’s picture

@mherchel, do we need any additional information? It would be super cool to release it with D10 launch party :)

mherchel’s picture

@mherchel, do we need any additional information? It would be super cool to release it with D10 launch party :)

I refactored the CSS to use PostCSS and use the new custom properties that are now available in the D10 off-canvas dialog. This also fixes the icon not showing in the toolbar when using forced colors.

I still have a couple questions regarding the CSS and HTML, that I asked within comments within the MR above.

In addition to this, we need an issue summary update on

  • How to test out all of the functionality. How do I see featured announcements, or when there's no announcements?
  • What is this supposed to look like? The figma link above just links to one page that says "Alerts" in the toolbar. I'm guessing this is outdated, because the actual module says "Announcements".
mherchel’s picture

One bug that I noticed: If you close the announcements feed using the ESCAPE key, clicking the button to re-open it does not work.

AJV009 made their first commit to this issue’s fork.

hestenet’s picture

Issue summary: View changes

Small clean up of the issues summary - separately we need good demo materials to be able to easily answer @mherchel's questions and future questions as more iterations/chagnes are made - a DrupalPod where we can re-point the feed to the /tests/ feeds that are included in the module would be a good start.

AJV009’s picture

Hey @mherchel I have been trying to fix the bug you mentioned in #124.

Ended up with changing the `$('.announce-dialog .announce-close').on('click', function` in announcements_feed.announcement.js.

        $('.announce-dialog .announce-close').on('click', function () {
          dialog.open = false;
        });

        $(window).on('dialog:afterclose', function (event, dialog) {
          $('[data-drupal-announce-trigger]').trigger('click');
        });

Its working with a console error

Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'widget'
at Function.error (jquery.min.js?v=3.6.1:2:2616)
at HTMLDivElement. (widget.js:234:16)
at Function.each (jquery.min.js?v=3.6.1:2:3003)
at S.fn.init.each (jquery.min.js?v=3.6.1:2:1481)
at t.fn. [as dialog] (widget.js:224:10)
at Object.getContainer (off-canvas.js?v=10.1.0-dev:302:23)
at resetSize (off-canvas.js?v=10.1.0-dev:207:42)
at later (debounce.js?v=10.1.0-dev:37:23)

AJV009’s picture

Fixed it, pushing it to the issue branch, asap.

catch’s picture

For the initial commit as experimental, I think it would be good to have real content already in the feed ready to go, so that the module can pick it up as soon as it's installed. SImilarly, when going from experimental to stable, we'd want to make sure there's fresh/relevant content in the feed too. I don't know what a desirable frequency is, but whatever that is it'll need to be maintained, otherwise it'll look stale/broken.

I haven't actually reviewed the feed parsing (or the code more generally) yet, but I agree with not API-ifying it (or going back to aggregator etc.). If we want to add back an RSS parser to core, we should do that in a separate issue - Zend's parser caused us many, many issues with PHP version support and etc. so I would not want to go back to that.

Gábor Hojtsy’s picture

+++ b/core/modules/announcements_feed/tests/announce_feed/updated.json
+++ b/core/modules/announcements_feed/tests/announce_feed/updated.json
@@ -0,0 +1,47 @@
+[{
+        "id": "201",
+        "title": "new 9 - 10 Drupal 9.1.3 is available",
+        "teaser": "This release will have a community alert prototype to notify site admins about drupal updates and required information",
+        "link": "https://www.drupal.org/project/announce",
+        "sticky": true,
+        "version": "^9 | ^10",
+        "updated": "2021-01-19T07:29:38+00:00"
+},

Its not actually RSS, but a custom JSON format that is also demonstrated in the tests.

longwave’s picture

Why did we go with a custom format over something like https://www.jsonfeed.org/ ? Even if the feed URL consumed by this module will be hardcoded, using an existing format means it could be more easily parsed by other sites/software, if they wanted to. Drupal is committed to the open web and using a custom format for announcements seems the antithesis of that.

xjm’s picture

 

xjm’s picture

I am unable to identify why the code quality checks are failing, and cannot reproduce it when I run the script locally. Looking at the verbose results on dispatcher, I see this:

16:42:56 yarn run v1.22.19
16:42:56 $ node ./scripts/css/postcss-build.js --check --file /var/www/html/core/modules/announcements_feed/css/announcements_feed.toolbar.pcss.css
16:42:57 [22:42:57] '/var/www/html/core/modules/announcements_feed/css/announcements_feed.toolbar.pcss.css' is being checked.
16:42:58 [22:42:58] '/var/www/html/core/modules/announcements_feed/css/announcements_feed.toolbar.pcss.css' is not updated.
16:42:58 error Command failed with exit code 1.

Could this be some sort of bug with #3308872: Address "postcss.plugin was deprecated" warning? Or a bug in the MR's CSS that leads to it failing to detect the file? The file certainly exists in the MR.

mherchel’s picture

Just recompiled the CSS (there was one change). That may have been why it was failing 🤞

xjm’s picture

Fixing attribution.

xjm’s picture

Looks like that was it indeed; thanks @mherchel. So "X is not updated" doesn't mean "I, testbot, have nothing to review"; it means "you updated the built asset and not the source, or vice versa."

xjm’s picture

I posted #3331818: commit-code-check.sh gives unclear output when CSS is not properly rebuilt for the lack of clear debugging info from the commit check script for PostCSS linting.

drumm’s picture

Why did we go with a custom format over something like https://www.jsonfeed.org/ ?

The simple format was made to match the requirements. I was not aware of JSON Feed. It took me a minute to find the spec, here it is: https://www.jsonfeed.org/version/1.1/.

We do have at least one custom element, what version constraint the message applies to. JSON Feed's spec does have an Extensions section, so that would work.

Not much else is really required by the spec, so it would be workable, if we want to go this direction.

catch’s picture

There's a module that adds a view display plugin for json_feed https://www.drupal.org/project/json_feed with 300 users. That suggests at least some people are using json_feed with Drupal so given the change would be purely renaming some keys in the custom format to match the spec (hopefully?), that seems like a good change.

Gábor Hojtsy’s picture

I just provided feedback on the sample real first post in the google doc. In particular I think we need to explain what kind of data is collected (if any) about users of the project and how to opt out. Not necessarily all fully explained in the post but at least linked from it. See my comments in the doc https://docs.google.com/document/d/1d5Uq1ORQDy5bW_3WAyyorEVuHCtZBBB_aKMt...

fjgarlin made their first commit to this issue’s fork.

fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

I updated the issue description with testing instructions on a drupalpod instance with the latest changes and reading from the json feed from the test files. It's here: https://gitpod.io/#snapshot/828d66df-5e7e-41bf-8a32-46e84e2a9f1f (then open browser and go to the /admin/announcements_feed screen) and further details on how to change the feed or trigger the notifications as new are provided in the testing section.

Not sure what's next, who should review this or what else if needed. I'm happy to jump in wherever it's needed.

fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

Issue summary: View changes
irinaz’s picture

Issue summary: View changes
irinaz’s picture

Issue summary: View changes
fjgarlin’s picture

Issue summary: View changes
hestenet’s picture

Making a short comment for now, before I try to summarize in the issue summary what was still outstanding:

When those are complete, we set to 'Needs Review' and make sure all of the 'needs_accessibility_review' and 'needs_usability_review' etc type tags get signed off and removed. Then we move to RTBC, and can get a committer to finish this off. :)

fjgarlin’s picture

Follow up from #153:

fjgarlin’s picture

Issue summary: View changes
drumm’s picture

https://www.drupal.org/announcements.json now has the placeholder in the jsonfeed format. I think the next most important thing is to get real content into the feed, updated on a regular basis, as if this were in production.

hestenet’s picture

Pending the addition of some links, and a decision about whether to include a survey in the first post, the other feedback about the 'first post' has been addressed: https://docs.google.com/document/d/1d5Uq1ORQDy5bW_3WAyyorEVuHCtZBBB_aKMt...

hestenet’s picture

Could the reviewers who reported these issues confirm the fixes? You can follow the steps in the "Testing" session of the issue summary to use GitPod to review.

The GitPod link

✅ Color of the red button - fixed and waiting on final review confirmation
- Reviewer: @mherchel
✅ Tests were not passing (still running while I'm writing this)
- Reviewer: The bot tells us this one :)
✅ Demo needs to show more items - it points to the test data.
- Reviewer: @catch
🟡 First post feedback needs to be resolved - still outstanding, assigned to @hestenet
- Reviewer: @Gábor Hojtsy
✅ Json format needs to be refactored: refactored here on this MR and #3336530: Make announcements json feed format consistent with https://www.jsonfeed.org/version/1.1/.
- Reviewer: @longwave

From there, I think I need to reach out to the right people to clear our current issue tags:

  • Needs accessibility review
  • Needs framework manager review
  • Needs product manager review

And then after all that:

  • Needs release manager
hestenet’s picture

Status: Needs work » Needs review
catch’s picture

✅ Demo needs to show more items - it points to the test data.
- Reviewer: @catch

Unless I'm missing something, I don't think #129 is addressed.

I can still only see one post on https://www.drupal.org/announcements.json - it is saying that something is about to be added to core.

If this is merged into core as experimental, then we do not want an announcement that something is going to be added to core, because it'll already be in core, so the information will be at best outdated, at worst confusing/misleading.

The feed should have actual relevant announcements for someone who would test the experimental module, before it's committed, so that they're immediately available once it is. And then part of the process of getting this to stable/adding it to standard/umami would be that those announcements continue to be up-to-date on whatever we think a reasonable schedule is. It's the first time we've added something to core that has an actual content dependency on Drupal.org, except maybe update status in a way, and once it's on sites, unless they uninstall it, core releases can't do anything about the contents of the feed.

Gábor Hojtsy’s picture

Reviewed the suggested first post in the google doc, I still have doubts about the survey, see there. I made a couple suggestions to parts that were not yet done.

longwave’s picture

✅ Json format needs to be refactored: refactored here on this MR and #3336530: Make announcements json feed format consistent with https://www.jsonfeed.org/version/1.1/.
- Reviewer: @longwave

The changes for this on both sides mostly look good. However, reading the JSON Feed extensions spec again I have a couple of comments:

For instance, imagine a podcast directory service — call it Blue Shed Podcasts — that asks a podcaster to specify some additional information about a feed or item. A publisher would do something like this:

"_blue_shed": {
    "about": "https://blueshed-podcasts.com/json-feed-extension-docs",
    "explicit": false,
    "copyright": "1948 by George Orwell",
    "owner": "Big Brother and the Holding Company",
    "subtitle": "All shouting, all the time. Double. Plus. Good."
}

The about string is there for a human looking at the feed, so they can understand what goes in the custom extension. It’s optional, but it should appear at least once in a feed that may contain multiple uses of _blue_shed (preferably in the first use, but that’s not required).

Also, it’s good practice to name an extension with a company or service name, to provide a clue right away as to what it’s for and who made it.

Our extension is currently named _extra which isn't very descriptive. I think the extension should be named _drupal or _drupal_org (*not* _drupal.org, as that is disallowed) and we should consider an about key that links to a relevant URL - I feel strongly about the former but not so strongly about the latter; we can't easily change the extension key later, but we could add the about element at any time in the future.

fjgarlin’s picture

Addressed #162 here https://www.drupal.org/project/drupalorg/issues/3336530#comment-14912886 . I named it "_drupalorg" as that's more consistent with the naming we use in the code all over, but happy to change it as needed.

longwave’s picture

Thanks for the swift update - _drupalorg is better if that's consistent, no further comments from me on the JSON Feed side of things.

hestenet’s picture

Assigned: Unassigned » hestenet

Comments #160 and #161 both make sense to me.

Re: #160 - some specifics: The module has a test fixture which shows what something like 8-10 different types of posts would look like, just so you can see what a more full feed would look like that way. However, I can start to build more posts into the live feed, even if it isn't really in use yet... speaking of which....

Re: #161 - I think I'll take out the survey concept in the first post entirely, and just put up a post which explains the lay of the land. Then I'll look into trying to get 2 or 3 more posts together, either appropriate reposts about project news from the core news feed, or unique posts.

mherchel’s picture

The issue with the red text being inaccessible is fixed (the red was removed)

mherchel’s picture

One more issue that I noticed:

The date is currently formatted MM/DD/YYYY. However that's an americanism. Most of the world (I believe) uses DD/MM/YYYY. In Olivero, we sidestepped the issue by having a date like " 2 April, 2021".

We should also remove the leading zero from the time, and add AM/PM etc.

Thoughts on all of this?

irinaz’s picture

I support 100% using complete name for the month, not two digits, like " 2 April, 2021". @fgarlin, how difficult would it be make this change?

poker10’s picture

The date is currently formatted MM/DD/YYYY. However that's an americanism. Most of the world (I believe) uses DD/MM/YYYY.

It seems to me that the pattern of the date format (currently "short") depends on the UI settings. Sites that have this set up to DD/MM/YYYY should have also this date formatted the same:

  <div class="announcement__date">{{ announcement.timestamp | format_date('short') }}</div>
fjgarlin’s picture

Correct, it will adapt to the set up of the site, following the "short" date format. So nothing to do on that end I assume.

fjgarlin’s picture

Issue summary: View changes

VladimirAus made their first commit to this issue’s fork.

AaronMcHale’s picture

Have we established any governance or process around what messages will appear in the feed?

hestenet’s picture

@AaronMcHale:

hestenet’s picture

Spun off a child issue for approval of the first post: #3343263: Approve first project announcement in core post

Will follow this up with 2 or 3 additional posts per @catch's feedback to have multiple relevant posts during the experimental phase for this module.

hestenet’s picture

First post was published: #3343263: Approve first project announcement in core post
https://www.drupal.org/about/announcements/blog/what-to-expect-from-the-...
And is available in the feed:
https://drupal.org/announcements.json

Per @catch's feedback, the last remaining todo(apart from any final code review) is to have 2 or 3 more posts so it's not quite so empty when committed.

hestenet’s picture

The last outstanding item was requested by @catch - to create 3 initial posts.

Those posts are complete, and available in the feed: https://drupal.org/announcements.json

In accordance with the governance process the issues for each were:

I did notice we are using date modified rather than date created in the feed - we may want to change that:

Once that is resolved, hopefully someone can RTBC :)

smustgrave’s picture

Installed the module without issue
I see that off canvas opens without issue

For accessibility
When the off canvas opens focus goes to the first item.
Tabbing stays within the office canvas (3 items and X button)
Pressing X with keyboard closes off canvas and puts focus back on the announcement link.

NOT sure if there needs to be any kind of announcement made in drupal-live-announce

If not +1 from me. But needs product, framework, release manager reviews too.

fjgarlin’s picture

Follow up from #177:
* #3347981: Announcement Feed uses modified date rather than date created is ready to review + deploy
* Changes to read from that new property made in the last commit: https://git.drupalcode.org/project/drupal/-/merge_requests/2889/diffs?co...

hestenet’s picture

Cleaning up the tags to the ones I think are left. I was cleared to remove the other tags once the found issues from the last comments were resolved.

  • Product manager review - @Gabor Hojtsy has been the closest, so hopefully can +1
  • Framework manager review - @catch has given feedback, but since he's also the likely release manager, maybe @larowlan or @effulgentisa could give us a sign off on this one.
  • Release manager review - I think this will be @catch based on activity so far.
  • Release notes snippet is already included in the issue summary
  • Drafting a change record will need to happen.
AaronMcHale’s picture

Issue tags: +Needs followup

We still need follow-up issues for the usability review in comment #116. Specifically, moving the feed to be within a dashboard.

There is currently work going on to propose an initiative for Dashboards in Core. The toolbar approach still does not sit well with me, and adding the feed to a Dashboard would be a much better place to present this information.

It's probably fine for this to go in as experimental using the toolbar approach, but we should be clear that the toolbar approach may only be a temporary solution.

For anyone interested in learning more about Dashboards, feel free to join us in the #dashboard channel on Drupal Slack, and the Core Ideas issue which sets out some of the initial approach #3244581: Enhance user experience with customizable dashboards.

Gábor Hojtsy’s picture

I wanted to try this once again. I did all the steps from the issue summary to do testing. It still says

cURL error 60: SSL: no alternative certificate subject name matches target host name '8080-shaal-drupalpod-050qz7bqbvl.ws-eu86.gitpod.io' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://8080-shaal-drupalpod-050qz7bqbvl.ws-eu86.gitpod.io/core/modules/...

So it appears like the change does not actually take effect.

fjgarlin’s picture

That seems to be a drupalpod issue. I'm following up on the #drupalpod channel. Any chance you can create a brand-new environment? I just created a new one and I don't get the certificate issue when making the URL public. We can continue debugging via slack if you want too.

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Needs review » Needs work
FileSize
89.77 KB

Edited issue summary after @fjgarlin let me know where was my misunderstanding.

Also now that I have tested with the live feed, this is what I get in Chrome. The "New" marker running over the text is not good. And the order of items with the different order of dates is odd. Is this intended?

fjgarlin’s picture

I can look into both things.

fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

Status: Needs work » Needs review

Both of the reported issues have been addressed. Note that that the snapshot URL is new.

irinaz’s picture

I tested on a new snapshot and it works correctly for me, thanks! Ready to change to RTBC :)

smustgrave’s picture

Status: Needs review » Needs work
FileSize
66.92 KB

Resizing the off-canvas I was able to get the overlap still.

overlap

fjgarlin’s picture

Thanks for the additional testing @smustgrave. TIL that you can resize the off-canvas! I didn't know that.

I see two options:
1) Remove the absolute positioning of the "New" word and just place it after the title.
2) Assign a fixed width to the title so it never overlaps with the "New" word.

For option 2, it'd need to be at least a 80%/20% which does not look nice, so I'm going to do option 1.

Once done, I'll update the snapshot and make a comment here.

fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

Status: Needs work » Needs review

#189 feedback has been now addressed. I've updated the snapshot URL in the issue description and this is ready for a new round of review(s).

hestenet’s picture

Issue tags: -Needs followup

In response to #116/#181 - I've opened:

It is postponed until the dashboard model itself is scaffolded out.

We are back to:

  • Product manager review - @Gabor Hojtsy
    • ✅ Fran has resolved the display issue found in your and @smustgrave's review
  • Framework manager review - @catch has given feedback, but since he's also the likely release manager, maybe @larowlan or @effulgentisa could give us a sign off on this one.
  • Release manager review - I think this will be @catch based on activity so far.
  • ✅ Release notes snippet is already included in the issue summary
  • 🟡 Drafting a change record - started one here: https://www.drupal.org/node/3349399
larowlan’s picture

Status: Needs review » Needs work

Left a review, the main issue here is that all pages become uncacheable with Dynamic Page Cache when you enable this module, by way of the user cache context.

larowlan’s picture

quietone’s picture

I am going to start working on the easier bits of the review.

quietone’s picture

Oh, I broke the tests. :-(

Also, when I converted to constructor property promotion PHPStan through errors of the form "Constructor of class Foo has an unused parameter $bar".

quietone’s picture

One thing I do find confusing is that this is only place I know of where the pencil icon is used and it is not something that I can edit.

quietone’s picture

I have done all the easier, non frontend, bits of larowlan's review that I can. I'll step back now and let others continue.

quietone’s picture

One more thing, Can we change the module name to just 'announcements'? I found it mildly annoying to have such a long name while I working on this. Or why is '-feed' needed?

Rishabh Vishwakarma made their first commit to this issue’s fork.

poker10’s picture

@quietone - The module was renamed due to (potential) collision with other library, see comments #27, #36, #40.

larowlan’s picture

Status: Needs work » Needs review

Pushed a lazy builder and a test to ensure we're cacheable (We previously were making all pages uncacheable with DPC)

fjgarlin’s picture

Issue summary: View changes
hestenet’s picture

Issue summary: View changes

Reposting the current reviews that are needed.

  • ✅ Fran has resolved the display issue found in @mherchel's and @smustgrave's reviews - please resolve any open threads
  • Framework manager review - @larowlan has provided a bunch of feedback (along with @quietone) - @fjgarlin believes this has all been addressed - can the threads be resolved and framework review be signed off?
  • ✅ Product manager review - @Gabor Hojtsy -
  • Release manager review - I think this will be @catch based on activity so far?
  • ✅ Release notes snippet is already included in the issue summary
  • 🟡 Drafting a change record - started one here: https://www.drupal.org/node/3349399
hestenet’s picture

Issue summary: View changes
Gábor Hojtsy’s picture

There is no framework manager feedback pre-requisite to product manager reviews in Drupal. As a product manager, I already provided detailed feedback on the sample posts and my feedback on the UI were all addressed, so we should be good to remove the tag. :)

hestenet’s picture

Issue summary: View changes

Thanks, Gábor! And thanks for the context on order of operations. Even after all these years I know I don't always get the details right.

@larowlan and then @catch, I think you're up!

AaronMcHale’s picture

Re comment #198

One thing I do find confusing is that this is only place I know of where the pencil icon is used and it is not something that I can edit.

Showing pencil icon in the feed panel title

I agree, pencil is probably not the right icon as it generally implies you can edit something by clicking/tapping it.

quietone’s picture

@poker10, thanks for answering my question about the name, 'Announcements Feeds'. That makes sense to avoid conflicts.

I resolved the few issues I could. That is things I did not work on and were not front endy. I also made

However, I think the user will think of this as just 'Announcements' and that 'Feed' is not needed. For example, right now I am looking at the help page which uses 'Announcements Feed' while in the upper right hand corner I see 'Announcements'. Personally, I find that jarring. But my personal view aside would it not be better for them to be the same?

hestenet’s picture

That icon should probably be the bell shown in comment #184

@quietone - as long as the machine name remains announcements_feed - I think the display text could be 'Announcements' to address the confusion you are talking about

Maybe @fjgarlin can take care of these nits, and we can bounce back to last reviewers.

fjgarlin’s picture

I will action those two items my tomorrow morning and update the gitpod link once done.

quietone’s picture

@hestenet, Yes, that is what I was thinking.

mstrelan’s picture

As someone who has not followed this at all I thought I'd try this out. First of all the MR needs a rebase. If you install from 10.1 HEAD and switch to this branch you'll get a WSOD. A fresh install from this branch works fine.

Once that was resolved I installed the module and visited the help page to find out what to do next. It suggested that if I had permission I could click the "Announcements" button in the admin toolbar and otherwise guided me to the online help page. I could not for the life of me fine the Announcements button so I started stepping through with a debugger to see if it was working. Anyway, lo and behold, the Announcements button was there in the top right corner the whole time, I guess I was just focusing on the left hand side.

While this seems really obvious now, and I feel silly for taking so long to find it, perhaps we could get a screenshot added to the online help page so we know what to expect?

fjgarlin’s picture

@mstrelan - we are rebasing regularly but sometimes it's hard to be on top of it, especially if we are waiting for reviews. Having said that, I just rebased the MR so thanks for mentioning it.

After your comment, I thought about adjusting slightly ("...situated in the top right...") the language or adding a screenshot, but the position of the "Announcements" link might change for users with RTL, so I left it as it is for now, but I'm happy to adapt as needed if there are some suggestions that people agree on.

catch’s picture

I think the two main release management points, the feed format and having some realistic contents for testing are now covered, so we're down to regular review points rather than sign-offs as such here.

Is there a meta issue with issues required for beta and stable?

alexpott made their first commit to this issue’s fork.

quietone’s picture

I grepped core for 'sites users' and there were less than five. The help pages and module descriptions use 'users', so I changed the text.

fjgarlin’s picture

Issue summary: View changes

All the new feedback has been addressed. I also believe that all the older threads are fully addressed. I've pinged people in slack about it too.

These are the only remaining threads (at the time of writing). They need review as I followed up on them, but people did not yet close them:
- @mherchel: 4 threads
- @larowlan: 3 threads
- @alexpott: 2 threads
- @quietone: 1 thread
- @DanielVeza: 1 thread
- @fjgarlin: 1 thread (I can't resolve it - permissions)

I've also updated the gitpod snapshot in the issue description.

borisson_’s picture

I read trough the PR and looked at the test coverage and couldn't find anything that needs looks like it still needs changing.
Everything seems to be well documented as well.

I added a basic version of the change record, but that should be completed with more information.

larowlan’s picture

Status: Needs review » Needs work

Some minor items on the MR

alexpott’s picture

I've created follow-ups and #3356488: Mark Announcements Feed as stable where everything can be tracked.

fjgarlin’s picture

Status: Needs work » Needs review

All the threads were resolved and follow-ups were created were necessary (thanks @alexpott). Marking this as NR.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

We've reviewed the code extensively and the theming and markup has been reviewed by front end experts too. We have the follow-ups in place and we have a CR. I think the final MR represents a great first step from where we can build more user centred functionality for marking as read or implementing into the new dashboard initative.

I'm not sure if this should go in as beta or as alpha. As it stands I don't think that this module offers an API. All classes are final and marked as @internal. Things can be opened up in beta or once this module as stable as necessary. Maybe someone can open an issue to discuss this - similar to #3354860: Mark SDC as beta so it can be included in 10.1

longwave’s picture

Saving issue credits; apologies if I missed anyone, but as usual with long issues it is hard to get this completely right.

  • longwave committed 492062df on 10.1.x
    Issue #3206643 by fjgarlin, Lal_, AJV009, quietone, benjifisher,...
longwave’s picture

Title: Project messaging channel in core (as experimental) » Project messaging channel in core (as experimental)
Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs change record

Discussed with @catch and we agree this is beta quality as there is no public API and it is feature complete as an MVP, and therefore this is low risk to commit now as an experimental module.

Committed and pushed 492062df7c to 10.1.x. Thanks!

Also updated the change record and published it.

longwave’s picture

hestenet’s picture

Incredibly thankful to everyone involved in making this happen. Thank you, everyone!

catch’s picture

longwave’s picture

@catch I already added it to the first table after committing.

catch’s picture

Oops my brain didn't make the connection between 'project messaging' and 'announcements'.

Next question then - should we add a new core component?

Gábor Hojtsy’s picture

I think we shoul add a new component. Should it be 'announcements' or would that be confusing as well? (Make it 'project annoucements' instead or would that would confusing in another way?)

longwave’s picture

Agree with adding a component, it should probably just be "announcements_feed.module"?

Gábor Hojtsy’s picture

Component: other » announcements_feed.module

Ah good point. Added :)

bnjmnm’s picture

Adjusting credit as credit is not granted for just pressing the rebase button in Gitlab.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ressa’s picture

Thanks everyone, very cool!

I created #3363816: Show list of announcements, at least once or by default, and turn on/off in a setting to make sure that it doesn't get missed.