Skip to content
Closed
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
8 changes: 4 additions & 4 deletions apps/website/content/docs/chat/api/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3414,14 +3414,14 @@
{
"name": "ChatSidenavScrimComponent",
"kind": "class",
"description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n<chat-sidenav> so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n <chat-sidenav-scrim [open]=\"drawerOpen()\" (close)=\"drawerOpen.set(false)\" />\n <chat-sidenav [(open)]=\"drawerOpen\" ...></chat-sidenav>",
"description": "Backdrop scrim for chat-sidenav's drawer mode, rendered as a sibling of\n<chat-sidenav> so its z-index sits cleanly between the page content\nand the drawer host (escapes the drawer host's stacking context).\n\nUsage:\n <chat-sidenav-scrim [open]=\"drawerOpen()\" (closed)=\"drawerOpen.set(false)\" />\n <chat-sidenav [(open)]=\"drawerOpen\" ...></chat-sidenav>",
"params": [],
"examples": [],
"properties": [
{
"name": "close",
"name": "closed",
"type": "OutputEmitterRef<void>",
"description": "Fires when the user clicks the backdrop.",
"description": "Fires when the user clicks the backdrop. Past-tense to avoid collision with native DOM close event.",
"optional": false
},
{
Expand Down Expand Up @@ -7160,4 +7160,4 @@
},
"examples": []
}
]
]
21 changes: 0 additions & 21 deletions cockpit/chat/subagents/angular/e2e/subagents.spec.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<chat-sidenav-scrim
[open]="sidenavMode() === 'drawer' && drawerOpen()"
(close)="drawerOpen.set(false)"
(closed)="drawerOpen.set(false)"
/>
<chat-sidenav
[threads]="visibleThreads()"
Expand Down
2 changes: 1 addition & 1 deletion libs/chat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngaf/chat",
"version": "0.0.44",
"version": "0.0.45",
"exports": {
"./chat.css": "./chat.css",
"./themes/default-dark.css": "./themes/default-dark.css",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ describe('ChatSidenavScrimComponent', () => {
expect(btn.getAttribute('aria-label')).toBe('Close conversations');
});

it('emits (close) on click', () => {
it('emits (closed) on click', () => {
fx.componentRef.setInput('open', true);
fx.detectChanges();
let closed = false;
fx.componentInstance.close.subscribe(() => { closed = true; });
fx.componentInstance.closed.subscribe(() => { closed = true; });
const btn = fx.nativeElement.querySelector('button.chat-sidenav-scrim__button') as HTMLButtonElement;
btn.click();
expect(closed).toBe(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core
* and the drawer host (escapes the drawer host's stacking context).
*
* Usage:
* <chat-sidenav-scrim [open]="drawerOpen()" (close)="drawerOpen.set(false)" />
* <chat-sidenav-scrim [open]="drawerOpen()" (closed)="drawerOpen.set(false)" />
* <chat-sidenav [(open)]="drawerOpen" ...></chat-sidenav>
*/
@Component({
Expand Down Expand Up @@ -43,6 +43,8 @@ import { ChangeDetectionStrategy, Component, input, output } from '@angular/core
export class ChatSidenavScrimComponent {
/** When true, render the backdrop button covering the viewport. */
readonly open = input<boolean>(false);
/** Fires when the user clicks the backdrop. */
readonly close = output<void>();
/** Fires when the user clicks the backdrop. Past-tense to avoid
* collision with the native DOM `close` event (per
* `@angular-eslint/no-output-native`). */
readonly closed = output<void>();
}