chore(labs): tidy the filter rail follow-ups

Drop a local-only ignore line, end the search placeholder with the
ellipsis character the other placeholders use, and put the
UrlFilterSyncOptions interface above the hook's doc comment so that
comment documents the hook.
This commit is contained in:
Marc-André Bombeck committed 2026-11-11 00:12:04 +01:00
1 parent fbbcaf4417
commit 2c63bf7a3a
13 files changed
+19 -23

No files matched your search

-4
View File
@@ -101,7 +101,3 @@ next-env.d.ts
# Mutation testing (stryker.config.mjs): reports and the sandbox copy.
/reports/mutation
/.stryker-tmp
# Local planning and code-review notes (agent output, never part of the
# public docs surface or the shipped tree).
/plans/
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Für einen Quotienten oder Index wie INR oder Cholesterin/HDL."
},
"filter": {
"searchPlaceholder": "Biomarker suchen...",
"searchPlaceholder": "Biomarker suchen…",
"searchLabel": "Biomarker suchen",
"clearSearch": "Suche leeren",
"lastMeasured": "Zuletzt gemessen",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "For a ratio or an index such as INR or cholesterol/HDL."
},
"filter": {
"searchPlaceholder": "Search biomarkers...",
"searchPlaceholder": "Search biomarkers…",
"searchLabel": "Search biomarkers",
"clearSearch": "Clear search",
"lastMeasured": "Last measured",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Para un cociente o un índice como el INR o colesterol/HDL."
},
"filter": {
"searchPlaceholder": "Buscar biomarcadores...",
"searchPlaceholder": "Buscar biomarcadores…",
"searchLabel": "Buscar biomarcadores",
"clearSearch": "Borrar búsqueda",
"lastMeasured": "Última medición",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Pour un rapport ou un indice comme l'INR ou cholestérol/HDL."
},
"filter": {
"searchPlaceholder": "Rechercher des biomarqueurs...",
"searchPlaceholder": "Rechercher des biomarqueurs…",
"searchLabel": "Rechercher des biomarqueurs",
"clearSearch": "Effacer la recherche",
"lastMeasured": "Dernière mesure",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Per un rapporto o un indice come l'INR o colesterolo/HDL."
},
"filter": {
"searchPlaceholder": "Cerca biomarcatori...",
"searchPlaceholder": "Cerca biomarcatori…",
"searchLabel": "Cerca biomarcatori",
"clearSearch": "Cancella ricerca",
"lastMeasured": "Ultima misurazione",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "INR이나 콜레스테롤/HDL 같은 비율 또는 지수에 사용해요."
},
"filter": {
"searchPlaceholder": "바이오마커 검색...",
"searchPlaceholder": "바이오마커 검색…",
"searchLabel": "바이오마커 검색",
"clearSearch": "검색어 지우기",
"lastMeasured": "마지막 측정",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Voor een verhouding of index zoals INR of cholesterol/HDL."
},
"filter": {
"searchPlaceholder": "Biomarkers zoeken...",
"searchPlaceholder": "Biomarkers zoeken…",
"searchLabel": "Biomarkers zoeken",
"clearSearch": "Zoekopdracht wissen",
"lastMeasured": "Laatst gemeten",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Dla ilorazu lub wskaźnika, np. INR albo cholesterol/HDL."
},
"filter": {
"searchPlaceholder": "Szukaj biomarkerów...",
"searchPlaceholder": "Szukaj biomarkerów…",
"searchLabel": "Szukaj biomarkerów",
"clearSearch": "Wyczyść wyszukiwanie",
"lastMeasured": "Ostatni pomiar",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Para uma razão ou um índice como INR ou colesterol/HDL."
},
"filter": {
"searchPlaceholder": "Buscar biomarcadores...",
"searchPlaceholder": "Buscar biomarcadores…",
"searchLabel": "Buscar biomarcadores",
"clearSearch": "Limpar busca",
"lastMeasured": "Última medição",
+1 -1
View File
@@ -10701,7 +10701,7 @@
"noneHint": "Для коэффициента или индекса, например МНО или холестерин/ЛПВП."
},
"filter": {
"searchPlaceholder": "Поиск биомаркеров...",
"searchPlaceholder": "Поиск биомаркеров…",
"searchLabel": "Поиск биомаркеров",
"clearSearch": "Очистить поиск",
"lastMeasured": "Последнее измерение",
@@ -37,12 +37,12 @@ describe("<LabFilterRail>", () => {
);
expect(html).toContain('data-slot="lab-filter-rail"');
expect(html).toContain('placeholder="Search biomarkers..."');
expect(html).toContain('placeholder="Search biomarkers…"');
expect(html).toContain('aria-keyshortcuts="/"');
expect(html).toMatch(/<kbd[^>]*aria-hidden="true"[^>]*>\s*\/\s*<\/kbd>/);
// The shared rail keeps search and all filter dimensions in one ordered row.
const searchIdx = html.indexOf('placeholder="Search biomarkers..."');
const searchIdx = html.indexOf('placeholder="Search biomarkers…"');
const dateRangeIdx = html.indexOf("Last measured");
const statusIdx = html.indexOf("Status");
const categoryIdx = html.indexOf("Category");
+7 -7
View File
@@ -4,6 +4,13 @@ import { useCallback, useMemo, useState } from "react";
import { setAllParams, useUrlSearch, writeUrlState } from "@/lib/url-state";
export interface UrlFilterSyncOptions {
/** A new history entry (`push`) or the current one rewritten (`replace`). */
mode?: "push" | "replace";
/** Wait two painted frames before writing (a write made while mounting). */
afterPaint?: boolean;
}
/**
* URL-owned filter state — the documents-vault pattern
* (`src/components/documents/documents-view.tsx`), extracted so the
@@ -32,13 +39,6 @@ import { setAllParams, useUrlSearch, writeUrlState } from "@/lib/url-state";
* for a list embedded under a URL that belongs to another surface (the
* type-locked insights readings subpage).
*/
export interface UrlFilterSyncOptions {
/** A new history entry (`push`) or the current one rewritten (`replace`). */
mode?: "push" | "replace";
/** Wait two painted frames before writing (a write made while mounting). */
afterPaint?: boolean;
}
export function useUrlFilterSync<T>({
parse,
serialise,