From 1a146ea88567c8165a3622971ad1bb6808dd9d7d Mon Sep 17 00:00:00 2001 From: Hoang Pham Date: Mon, 19 Oct 2026 15:27:25 +0700 Subject: [PATCH] fix(search): load the deck stylesheet on the full text search page DeckProvider still pointed the full text search template at css/icons.css, which was removed in 2022. Since fulltextsearch loads provider stylesheets again, the page logs a 404 and a failed stylesheet load on every visit. Use the deck stylesheet that the app ships. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Hoang Pham --- lib/Provider/DeckProvider.php | 2 +- tests/unit/Provider/DeckProviderTest.php | 27 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/unit/Provider/DeckProviderTest.php diff --git a/lib/Provider/DeckProvider.php b/lib/Provider/DeckProvider.php index 2f9a2136a2..f0833b1aa2 100644 --- a/lib/Provider/DeckProvider.php +++ b/lib/Provider/DeckProvider.php @@ -91,7 +91,7 @@ public function setIndexOptions(IIndexOptions $options) { public function getSearchTemplate(): ISearchTemplate { /** @psalm-var ISearchTemplate */ - $template = new SearchTemplate('icon-deck', 'icons'); + $template = new SearchTemplate('icon-deck', 'deck'); return $template; } diff --git a/tests/unit/Provider/DeckProviderTest.php b/tests/unit/Provider/DeckProviderTest.php new file mode 100644 index 0000000000..287c273533 --- /dev/null +++ b/tests/unit/Provider/DeckProviderTest.php @@ -0,0 +1,27 @@ +createMock(IL10N::class), + $this->createMock(IURLGenerator::class), + $this->createMock(FullTextSearchService::class), + ); + + $css = $provider->getSearchTemplate()->getCss(); + + $this->assertFileExists(__DIR__ . '/../../../css/' . $css . '.css'); + } +}