From a9cd4ced6075eebbc4774df64a70d317c4a2eaae Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Tue, 1 Sep 2026 21:30:16 +0200 Subject: [PATCH] feat: match the search tab chrome to the mail page sidebar #641 --- components/global-search/search-facets.tsx | 43 ++++++++++++++------ components/global-search/search-tab-body.tsx | 8 ++-- locales/ar/common.json | 3 +- locales/ca/common.json | 3 +- locales/cs/common.json | 3 +- locales/da/common.json | 3 +- locales/de/common.json | 3 +- locales/en/common.json | 3 +- locales/es/common.json | 3 +- locales/fa/common.json | 3 +- locales/fr/common.json | 3 +- locales/he/common.json | 3 +- locales/hu/common.json | 3 +- locales/it/common.json | 3 +- locales/ja/common.json | 3 +- locales/ko/common.json | 3 +- locales/lv/common.json | 3 +- locales/mn/common.json | 3 +- locales/nb/common.json | 3 +- locales/nl/common.json | 3 +- locales/pl/common.json | 3 +- locales/pt/common.json | 3 +- locales/ro/common.json | 3 +- locales/ru/common.json | 3 +- locales/sk/common.json | 3 +- locales/tr/common.json | 3 +- locales/uk/common.json | 3 +- locales/zh-TW/common.json | 3 +- locales/zh/common.json | 3 +- 29 files changed, 88 insertions(+), 44 deletions(-) diff --git a/components/global-search/search-facets.tsx b/components/global-search/search-facets.tsx index a9ab2e9b5..bd82e9611 100644 --- a/components/global-search/search-facets.tsx +++ b/components/global-search/search-facets.tsx @@ -18,19 +18,38 @@ export interface SearchFacetsProps { onFlatChange: (flat: boolean) => void; } +/** Section title, styled like the mail sidebar's section rows. */ +function FacetSection({ title, first, children }: { title: string; first?: boolean; children: React.ReactNode }) { + return ( +
+
+ {title} +
+ {children} +
+ ); +} + +/** One facet row, styled like a mail sidebar folder row (start-border selection marker). */ function FacetButton({ active, label, count, onClick }: { active: boolean; label: string; count?: string; onClick: () => void }) { return ( ); } @@ -45,9 +64,8 @@ export function SearchFacets({ const total = SEARCH_KINDS.reduce((sum, kind) => sum + kindCounts[kind], 0); const anyMore = SEARCH_KINDS.some((kind) => kindHasMore[kind]); return ( -
-
-

{t('scope_label')}

+
+ onScopeChange(kind)} /> ))} -
+ {accounts.length > 1 && ( -
-

{t('account_label')}

+ onAccountChange(null)} /> {accounts.map((account) => ( onAccountChange(account.localAccountId)} /> ))} -
+ )} -
+ onFlatChange(false)} /> onFlatChange(true)} /> -
+
); } diff --git a/components/global-search/search-tab-body.tsx b/components/global-search/search-tab-body.tsx index 7d0a60d7d..17c5d1dbe 100644 --- a/components/global-search/search-tab-body.tsx +++ b/components/global-search/search-tab-body.tsx @@ -90,8 +90,8 @@ export function SearchTabBody({ tabId, data }: SearchTabBodyProps) { const handleOpen = (hit: GlobalSearchHit) => { void openHit(hit, { proShell: true }); }; return ( -
-