From abc7aba20f35683f14b8327c147890262f58ef89 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 27 Aug 2025 14:16:07 -0600 Subject: [PATCH] Search improvements. - Now finds holidays in addition to dates and events - Emojis added to mark different result types - Matching improvements: insensitive to diacritics, finds closest holiday/date to view, concise regex matching - Avoid jumping to dates immediately while browsing the result dropdown - Improved hotkey handling Ctrl+F (always focus and select) --- src/components/HeaderControls.vue | 6 - src/components/Search.vue | 387 ++++++++++++++++++++++-------- 2 files changed, 290 insertions(+), 103 deletions(-) diff --git a/src/components/HeaderControls.vue b/src/components/HeaderControls.vue index 8bfff13..e1be02b 100644 --- a/src/components/HeaderControls.vue +++ b/src/components/HeaderControls.vue @@ -166,12 +166,6 @@ onBeforeUnmount(() => { width: 100%; padding-inline-end: 2rem; } -.header-controls :deep(.search-bar) { - flex: 1 1 clamp(14rem, 40vw, 30rem); - max-width: clamp(18rem, 40vw, 30rem); - min-width: 12rem; - margin-inline-end: auto; -} .toggle-btn { position: fixed; top: 0; diff --git a/src/components/Search.vue b/src/components/Search.vue index 9597d36..6724869 100644 --- a/src/components/Search.vue +++ b/src/components/Search.vue @@ -4,8 +4,8 @@ ref="searchInputRef" v-model="searchQuery" type="search" - placeholder="Date or event..." - aria-label="Search date and events" + placeholder="Date or Event..." + aria-label="Search dates, holidays and events" @keydown="handleSearchKeydown" />
@@ -33,7 +33,7 @@