primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Component: Message - Theme: Aura light and dark variants

Open mjlux opened this issue 1 year ago • 2 comments

Describe the bug

In primeNG 17.18 the severities for <p-message> are now strictly typed. If <p-message> is used as inline message the Aura Themes are missing support for the changed severity types "warning" (was warn), "danger" (was error) and the new severity types "secondary" and "contrast"

Environment

PrimeNg 17.18 Angular 18.0 Windows 11

Reproducer

No response

Angular version

18.0

PrimeNG version

17.18

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.1

Browser(s)

No response

Steps to reproduce the behavior

Use one of the Aura themes from primeNG index.scss

@import "../../node_modules/primeng/resources/themes/aura-dark-noir/theme.css";

add p-messages as inline messages to app.component.html

<p-message severity="warning" text="Message Content"></p-message>
<p-message severity="danger" text="Message Content"></p-message>
<p-message severity="secondary" text="Message Content"></p-message>
<p-message severity="contrast" text="Message Content"></p-message>

no severity styles will apply

The following css classes are missing in _inlinemessage.scss

  • .p-inline-message-secondary
  • .p-inline-message-contrast
  • .p-inline-message-warning
  • .p-inline-message-danger

Expected behavior

The inline <p-message> should be styled according to the set severity.

mjlux avatar Jun 21 '24 18:06 mjlux

I can confirm this bug also on other themes (for example "saga-blue"), the p-messages of type warning and danger are not styled.

Another note: the documentation seems to be missing all information about the inline <p-message>, it now only talks about <p-messages>... I'm sure this wasn't the case in the PrimeNG 16 docs... am I missing something?

tarockx avatar Jun 25 '24 13:06 tarockx

Related to those https://github.com/primefaces/primeng/issues/15534 https://github.com/primefaces/primeng-sass-theme/issues/134

angularinterviews avatar Jun 26 '24 11:06 angularinterviews

Hi all,

As of 17.18.0, correct severity options for the message and toast components should be as follows:

severity: 'success' | 'info' | 'warn' | 'error' | 'secondary' | 'contrast' | undefined;

Possibly, this issue stems from a problem occurring when merging branches. We'll address the issue in 17.18.3 this week.

cetincakiroglu avatar Jul 01 '24 14:07 cetincakiroglu