primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Message: New severity not reflected in styles

Open EinfachHans opened this issue 9 months ago • 3 comments

Describe the bug

In https://github.com/primefaces/primeng/pull/15471 new severity options were added. For the message component they were named differently before and the changes were not applied to the styles. The error and warn options are removed, but still used for styles in all the theme files. So the new danger and warning have no styling.

Environment

//

Reproducer

No response

Angular version

17.3.8

PrimeNG version

17.16.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.12.2

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

EinfachHans avatar May 10 '24 20:05 EinfachHans

After updating primeNg to the new version, we have the same problem. I can see that for message severity error is no longer supported and instead takes danger, however the component displays badly because the theme css message still uses error and not danger.

Shusty-6th avatar May 14 '24 10:05 Shusty-6th

With typescript it leads to an compile error:

error TS2322: Type '"error"' is not assignable to type '"success" | "info" | "warning" | "danger" | "help" | "primary" | "secondary" | "contrast" | null | undefined'. <p-message severity="error"

Rotzbua avatar May 14 '24 12:05 Rotzbua

Temporary solution for typescript that corrects the style, but displays an exclamation icon instead of times icon.

[severity]="$any('error')"

vinishiru avatar May 14 '24 18:05 vinishiru

This is really annoying and concerns every component with a severity input. This is a really annoying breaking change in a minor release :(

thetric avatar Jun 13 '24 12:06 thetric

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

meriturva avatar Jun 14 '24 06:06 meriturva

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