From afe6ad2192cd7568ae82422e6fc1df03154a5c2c Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 22 Jul 2026 09:23:18 -0700 Subject: [PATCH 1/3] Chore: remove unused import --- .../common/filterable-dropdown/filterable-dropdown.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts index d78711c2c..5b4ff0d12 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts +++ b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ts @@ -661,7 +661,6 @@ export class FilterableDropdownSelectionModel { imports: [ ClearableBadgeComponent, ToggleableDropdownButtonComponent, - FilterPipe, FormsModule, ReactiveFormsModule, NgxBootstrapIconsModule, From 3f9355793495ede54b4b98bc74ba5f5720bb6609 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:06:41 -0700 Subject: [PATCH 2/3] Fix (beta): prevent pdfjs offsetParent warning (#13197) --- .../common/pdf-viewer/pdf-viewer.component.spec.ts | 12 ++++++++++++ .../common/pdf-viewer/pdf-viewer.component.ts | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.spec.ts b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.spec.ts index a8c973205..3b6add68c 100644 --- a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.spec.ts +++ b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.spec.ts @@ -138,6 +138,18 @@ describe('PngxPdfViewerComponent', () => { expect(applyScaleSpy).toHaveBeenCalled() }) + it('does not reset the viewer when it is already on the requested page', async () => { + await initComponent() + + const viewer = (component as any).pdfViewer as PDFViewer + const currentPageSpy = jest.spyOn(viewer, 'currentPageNumber', 'set') + component.page = viewer.currentPageNumber + + ;(component as any).applyViewerState() + + expect(currentPageSpy).not.toHaveBeenCalled() + }) + it('dispatches find when search query changes after render', async () => { await initComponent() diff --git a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts index dba57ef2d..c86294b9d 100644 --- a/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts +++ b/src-ui/src/app/components/common/pdf-viewer/pdf-viewer.component.ts @@ -256,7 +256,9 @@ export class PngxPdfViewerComponent Math.max(Math.trunc(this.page), 1), this.pdfViewer.pagesCount ) - this.pdfViewer.currentPageNumber = nextPage + if (nextPage !== this.pdfViewer.currentPageNumber) { + this.pdfViewer.currentPageNumber = nextPage + } } if (this.page === this.lastViewerPage) { this.lastViewerPage = undefined From 5e06987102ec9707621f674ccd18c397c72db692 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 22 Jul 2026 10:15:56 -0700 Subject: [PATCH 3/3] Chore (beta): mark first batch of thumbnails as priorty for LCP warning (#13196) --- .../document-card-large.component.html | 6 +++++- .../document-card-large.component.spec.ts | 9 +++++++++ .../document-card-large/document-card-large.component.ts | 1 + .../document-card-small.component.html | 6 +++++- .../document-card-small.component.spec.ts | 9 +++++++++ .../document-card-small/document-card-small.component.ts | 1 + .../document-list/document-list.component.html | 6 ++++-- 7 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html index facd0ca27..30acc44e2 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.html @@ -2,7 +2,11 @@
@if (document()) { - + @if (priority()) { + {{ document().title | documentTitle }} thumbnail + } @else { + {{ document().title | documentTitle }} thumbnail + }
diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts index 421754618..4737f5337 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.spec.ts @@ -94,6 +94,15 @@ describe('DocumentCardLargeComponent', () => { expect(thumbnail.getAttribute('loading')).toEqual('lazy') }) + it('should prioritize the thumbnail when requested', () => { + fixture.componentRef.setInput('priority', true) + fixture.detectChanges() + const thumbnail: HTMLImageElement = + fixture.nativeElement.querySelector('img.doc-img') + expect(thumbnail.getAttribute('loading')).toEqual('eager') + expect(thumbnail.getAttribute('fetchpriority')).toEqual('high') + }) + it('should trim content', () => { expect(component.contentTrimmed).toHaveLength(503) // includes ... }) diff --git a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts index 9304d1168..d0ff0ea3e 100644 --- a/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts +++ b/src-ui/src/app/components/document-list/document-card-large/document-card-large.component.ts @@ -66,6 +66,7 @@ export class DocumentCardLargeComponent private documentService = inject(DocumentService) settingsService = inject(SettingsService) readonly selected = input(false) + readonly priority = input(false) readonly displayFields = input( DEFAULT_DISPLAY_FIELDS.map((f) => f.id) ) diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html index 7a0a507e6..4e55e4936 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.html @@ -2,7 +2,11 @@
@if (document()) { - + @if (priority()) { + {{ document().title | documentTitle }} thumbnail + } @else { + {{ document().title | documentTitle }} thumbnail + }
diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts index c6127494b..88f143d71 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.spec.ts @@ -67,6 +67,15 @@ describe('DocumentCardSmallComponent', () => { expect(thumbnail.getAttribute('loading')).toEqual('lazy') }) + it('should prioritize the thumbnail when requested', () => { + fixture.componentRef.setInput('priority', true) + fixture.detectChanges() + const thumbnail: HTMLImageElement = + fixture.nativeElement.querySelector('img.doc-img') + expect(thumbnail.getAttribute('loading')).toEqual('eager') + expect(thumbnail.getAttribute('fetchpriority')).toEqual('high') + }) + it('should display a document, limit tags to 5', () => { expect(fixture.nativeElement.textContent).toContain('Document 10') expect( diff --git a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts index 633ad3e2e..a0e8bd2ab 100644 --- a/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts +++ b/src-ui/src/app/components/document-list/document-card-small/document-card-small.component.ts @@ -66,6 +66,7 @@ export class DocumentCardSmallComponent private documentService = inject(DocumentService) settingsService = inject(SettingsService) readonly selected = input(false) + readonly priority = input(false) readonly document = input(undefined) readonly displayFields = input( DEFAULT_DISPLAY_FIELDS.map((f) => f.id) diff --git a/src-ui/src/app/components/document-list/document-list.component.html b/src-ui/src/app/components/document-list/document-list.component.html index f29d2dca8..cf2088e78 100644 --- a/src-ui/src/app/components/document-list/document-list.component.html +++ b/src-ui/src/app/components/document-list/document-list.component.html @@ -164,9 +164,10 @@ } @else { @if (list.displayMode === DisplayMode.LARGE_CARDS) {
- @for (d of list.documents; track d.id) { + @for (d of list.documents; track d.id; let i = $index) { - @for (d of list.documents; track d.id) { + @for (d of list.documents; track d.id; let i = $index) {