Allow setting message type for message action plugin

Created on 27 February 2016, almost 9 years ago
Updated 22 April 2024, 8 months ago

Problem/Motivation

The \Drupal\Core\Action\Plugin\Action\MessageAction provides action for setting the messages but it lacks the ability to choose the type of those messages so all messages set by this action will be of 'status' type.

Proposed resolution

Provide message_type configuration option to allow user select a message type to display

Remaining tasks

review, commit

User interface changes

message action allows to select type of message (status, warning or error)

API changes

no

Data model changes

added extra configuration to message plugin
post upgrade hook & test added

Release notes snippet

message action allow configure type of message

Feature request
Status

Needs work

Version

11.0 🔥

Component
System 

Last updated 6 days ago

No maintainer
Created by

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

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.

  • 🇺🇸United States smustgrave

    Reviewing patch #10 on Drupal 10.1 with a standard install
    The post update hook worked without issue.
    Change record is included
    Has test coverage
    Post update hook is doing a before/after assertion.

    Think this is good for the next step.

  • Status changed to Needs work almost 2 years ago
  • 🇳🇿New Zealand quietone

    I am reviewing the Issue meta data.

    This is a change to the UI so adding the Usability tag.

    There is a screenshot in the issue summary but it does not state if it is before or after, or when it was made. Is this from the latest patch or something else?

    The release note snippet is a phrase, it should be explanation of the change in correct English. See Release note snippets .

    I read the change record. It is good to see a screenshot! The CR is brief, it should be expanded to explain the changes. And it should include before and after code changes, if appropriate.

    I skimmed the comments in the patch.

    +++ b/core/tests/Drupal/KernelTests/Core/Action/MessageActionTest.php
    @@ -0,0 +1,88 @@
    +   * Provides data for message types.
    

    Provides data for testMessageActionTypes.

  • 🇮🇳India anchal_gupta

    I have uploaded the patch
    Against addressed #85 comment

  • 🇫🇷France andypost

    proper component

Production build 0.71.5 2024