Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error notifications in admin should not be collapsed #1032

Closed
Toutouwai opened this issue Nov 13, 2019 · 4 comments
Closed

Error notifications in admin should not be collapsed #1032

Toutouwai opened this issue Nov 13, 2019 · 4 comments

Comments

@Toutouwai
Copy link

@Toutouwai Toutouwai commented Nov 13, 2019

Short description of the issue

When multiple notifications of the same type occur in admin they are collapsed and only the first notification is shown. Error notifications should never be collapsed IMHO because errors are critical information that the user should see.

Demonstration:

$pages->addHookAfter('saveReady', function(HookEvent $event) {
    $page = $event->arguments(0);
    if($page->template == 'news_item') {
        $event->wire()->error('Error number one.');
        $event->wire()->error('Error number two.');
    }
});

2019-11-13_163052

One more thing: besides error notifications that should never be collapsed, sometimes you might want to show particular warning or notice level notifications in an uncollapsed state. Is there some way to specify that a particular notification you are issuing should never be collapsed?

Setup/Environment

  • ProcessWire version: 3.0.145
@teppokoivula

This comment has been minimized.

Copy link

@teppokoivula teppokoivula commented Nov 13, 2019

Agreed. Makes sense to hide the messages if they are identical, but if they are not then current behaviour is very likely to result in users not noticing those additional messages at all.

Is there some way to specify that a particular notification you are issuing should never be collapsed?

In case there is, I'd be interested in this as well. Just ran into this with one of my modules where I need the user to acknowledge various notices, yet currently only the first one gets displayed and others are hidden (and thus unlikely to be seen).

@ryancramerdesign

This comment has been minimized.

Copy link
Contributor

@ryancramerdesign ryancramerdesign commented Nov 15, 2019

Thanks @Toutouwai @teppokoivula I agree, I have added support for this.

@Toutouwai

This comment has been minimized.

Copy link
Author

@Toutouwai Toutouwai commented Nov 15, 2019

Thanks!

@Toutouwai Toutouwai closed this Nov 15, 2019
@ryancramerdesign

This comment has been minimized.

Copy link
Contributor

@ryancramerdesign ryancramerdesign commented Nov 15, 2019

Btw to force any notification to display on its own rather than grouped with others, you add the Notice::noGroup flag when adding it:

$this->message('Some message you must see', Notice::noGroup); 

Error notifications now do this automatically as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.