Limit max number of messages per page

Created on 14 August 2024, 3 months ago
Updated 3 September 2024, 3 months ago

Problem/Motivation

Currently module is able to display unlimited number of messages per page using Toastify.

Steps to reproduce

Add 50 messages using code
\Drupal::service('messenger')->addStatus('Status message');

Proposed resolution

Add configurable setting to limit number of messages. If this limis is reached then do not use Toastify to show messages.

Remaining tasks

Propose code changes

āœØ Feature request
Status

Needs work

Component

Code

Created by

šŸ‡±šŸ‡¹Lithuania arpas

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

Comments & Activities

  • Issue created by @arpas
  • šŸ‡±šŸ‡¹Lithuania arpas
  • šŸ‡§šŸ‡ŖBelgium dieterholvoet Brussels

    Iā€™m curious, in what situation do you get 50+ messages on a page? And is displaying them the usual way really that much better in that case?

  • šŸ‡±šŸ‡¹Lithuania arpas

    In some cases, 50+ messages can be received per page. I.e. when the VBO finishes, I need to show a list of messages informing about the processed items. The list of messages using Toastify cannot be displayed properly because some messages do not fit in the browser window and the user cannot read important messages that disappear.

  • Status changed to Needs work 3 months ago
  • šŸ‡§šŸ‡ŖBelgium dieterholvoet Brussels

    Can you start a MR instead of uploading a patch? Patches have been deprecated for quite some time on Drupal.org. Also, the patch seems to be updating a ToastifyManager class which doesn't exist in the 8.x-1.x branch.

Production build 0.71.5 2024