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

#15260: Messages component uses closable and id from Message #15261

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/app/components/messages/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { Subscription, timer } from 'rxjs';
role="alert"
[@messageAnimation]="{ value: 'visible', params: { showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions } }"
>
<div class="p-message-wrapper" [attr.data-pc-section]="'wrapper'">
<div class="p-message-wrapper" [attr.data-pc-section]="'wrapper'" [attr.id]="msg.id || null">
Copy link
Contributor

@rosenthalj rosenthalj Apr 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but this addresses a different issue

<span *ngIf="msg.icon" [class]="'p-message-icon pi ' + msg.icon" [attr.data-pc-section]="'icon'"> </span>
<span class="p-message-icon" *ngIf="!msg.icon">
<ng-container>
Expand All @@ -60,7 +60,7 @@ import { Subscription, timer } from 'rxjs';
<span *ngIf="msg.summary" class="p-message-summary" [attr.data-pc-section]="'summary'">{{ msg.summary }}</span>
<span *ngIf="msg.detail" class="p-message-detail" [attr.data-pc-section]="'detail'">{{ msg.detail }}</span>
</ng-template>
<button class="p-message-close p-link" (click)="removeMessage(i)" *ngIf="closable" type="button" pRipple [attr.aria-label]="closeAriaLabel" [attr.data-pc-section]="'closebutton'">
<button class="p-message-close p-link" (click)="removeMessage(i)" *ngIf="closable && (msg.closable ?? true)" type="button" pRipple [attr.aria-label]="closeAriaLabel" [attr.data-pc-section]="'closebutton'">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

<TimesIcon [styleClass]="'p-message-close-icon'" [attr.data-pc-section]="'closeicon'" />
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/doc/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@
"values": [
{
"name": "Message",
"description": "Deines valid options for the message.",
"description": "Defines valid options for the message.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

"props": [
{
"name": "severity",
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/messages/servicedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class MessagesServiceDemo {
addMultiple() {
this.messageService.addAll([
{severity:'success', summary:'Service Message', detail:'Via MessageService'},
{severity:'info', summary:'Info Message', detail:'Via MessageService'}
{ severity: 'success', summary: 'Service Message', detail: 'Via MessageService' },
{ severity: 'info', summary: 'Info Message', detail: 'Via MessageService' }
]);
}
Expand Down
Loading