Add js message theme override to match Umami message markup

Created on 10 December 2019, about 5 years ago
Updated 30 August 2024, 5 months ago

Problem/Motivation

Messages can be added with js using Drupal.Message, see: https://www.drupal.org/node/2930536

but the markup output does not match Umami's in
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/profiles/demo_...

Claro overrides the theme function: Drupal.theme.message
https://git.drupalcode.org/project/drupal/blob/8.8.x/core/themes/claro/j...

If Umami had a similar override then js messages would look more like the twig messages.

Steps to reproduce

Proposed resolution

Add a Drupal.theme.message function for Umami to override core/misc/message.js and output markup that matches the twig template.

1. 3100083-add-js-message is actual fix branch.
2. 3100083-web-components - an experimental branch with web components. Both message methods (Drupal render and javascript theme function) use the same template.

Remaining tasks

Review

User interface changes

Before

After

API changes

NA

Data model changes

NA

Release notes snippet

📌 Task
Status

Needs review

Version

11.0 🔥

Component
Umami 

Last updated 1 day ago

Created by

🇺🇸United States zrpnr UTC-7

Live updates comments and jobs are added and updated live.
  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Merge Requests

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