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

@@ -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,