Skip to content
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
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/api/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@
"optional": false
},
{
"name": "close",
"name": "closed",
"type": "OutputEmitterRef<void>",
"description": "",
"optional": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
[(query)]="searchQuery"
[results]="searchResults()"
(threadSelected)="onSearchSelect($event)"
(close)="paletteOpen.set(false)"
(closed)="paletteOpen.set(false)"
/>

<chat-debug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export type ChatSidenavMode = 'expanded' | 'collapsed' | 'drawer';
(click)="openChange.emit(false)"
></button>
}
<aside
<nav
class="chat-sidenav"
role="navigation"
aria-label="Sidebar navigation"
tabindex="-1"
(keydown.escape)="onEscape()"
>
<div class="chat-sidenav__header">
Expand Down Expand Up @@ -96,7 +96,7 @@ export type ChatSidenavMode = 'expanded' | 'collapsed' | 'drawer';
<div class="chat-sidenav__account">
<ng-content select="[sidenavAccount]" />
</div>
</aside>
</nav>
`,
})
export class ChatSidenavComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('ChatHistorySearchPaletteComponent', () => {
it('Esc emits close', () => {
const fixture = render();
let emits = 0;
fixture.componentInstance.close.subscribe(() => emits++);
fixture.componentInstance.closed.subscribe(() => emits++);
const input = fixture.nativeElement.querySelector('input') as HTMLInputElement;
input.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
expect(emits).toBe(1);
Expand All @@ -123,7 +123,7 @@ describe('ChatHistorySearchPaletteComponent', () => {
it('Scrim click emits close', () => {
const fixture = render();
let emits = 0;
fixture.componentInstance.close.subscribe(() => emits++);
fixture.componentInstance.closed.subscribe(() => emits++);
const scrim = fixture.nativeElement.querySelector('.chat-history-search-palette__scrim') as HTMLButtonElement;
scrim.click();
expect(emits).toBe(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let paletteInstanceCounter = 0;
type="button"
class="chat-history-search-palette__scrim"
aria-label="Close search"
(click)="close.emit()"
(click)="closed.emit()"
></button>
<div
class="chat-history-search-palette"
Expand Down Expand Up @@ -64,7 +64,7 @@ let paletteInstanceCounter = 0;
type="button"
class="chat-history-search-palette__close"
aria-label="Close"
(click)="close.emit()"
(click)="closed.emit()"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<line x1="18" y1="6" x2="6" y2="18"/>
Expand Down Expand Up @@ -116,8 +116,7 @@ export class ChatHistorySearchPaletteComponent {
readonly placeholder = input<string>('Search conversations');

readonly threadSelected = output<string>();
// eslint-disable-next-line @angular-eslint/no-output-native
readonly close = output<void>();
readonly closed = output<void>();

protected readonly activeIndex = signal<number>(0);
protected readonly listId = `chat-history-search-palette__results-${++paletteInstanceCounter}`;
Expand Down Expand Up @@ -155,7 +154,7 @@ export class ChatHistorySearchPaletteComponent {
protected onInputKeydown(e: KeyboardEvent): void {
if (e.key === 'Escape') {
e.preventDefault();
this.close.emit();
this.closed.emit();
return;
}
if (e.key === 'ArrowDown') {
Expand Down
Loading