fix: react-doctor small categories 68→72 (a11y+perf+style, 21 fixes)

- no-outline-none (2): add focus-visible outline to inline-styled inputs
- no-redundant-roles (2): drop role="list" on <ul>
- click-events-have-key-events (2): convert div backdrops to buttons
- no-static-element-interactions (2): add role+tabIndex+onKeyDown to clickable divs
- rendering-svg-precision (2): round SVG path decimals
- no-tiny-text (2): 11px → 12px on CommandPalette hints
- js-set-map-lookups (4→1): Sets for visibleItems, regex for keyword match
- no-gray-on-colored-background (4): use color-matched text instead of stone-400/900
- no-transition-all (4): list specific properties in transition shorthand
This commit is contained in:
Nora
2026-06-26 03:54:30 -06:00
parent 8f61fed997
commit f6bf91951e
15 changed files with 63 additions and 38 deletions
+14 -5
View File
@@ -173,6 +173,15 @@ class MockQueryBuilder<T extends Record<string, unknown> = Record<string, unknow
let filtered: unknown[] = [];
for (const filter of this.filters) {
const inSet = filter.op === "in" && Array.isArray(filter.value)
? new Set(filter.value as unknown[])
: null;
const likeNeedle = filter.op === "like" && typeof filter.value === "string"
? (filter.value as string).replace(/%/g, "")
: null;
const ilikeNeedle = filter.op === "ilike" && typeof filter.value === "string"
? (filter.value as string).replace(/%/g, "").toLowerCase()
: null;
filtered = filtered.filter((row) => {
const r = row as Record<string, unknown>;
const rowValue = r[filter.column];
@@ -196,17 +205,17 @@ class MockQueryBuilder<T extends Record<string, unknown> = Record<string, unknow
case "like":
return (
typeof rowValue === "string" &&
rowValue.includes((filter.value as string).replace(/%/g, ""))
likeNeedle !== null &&
rowValue.includes(likeNeedle)
);
case "ilike":
return (
typeof rowValue === "string" &&
rowValue
.toLowerCase()
.includes((filter.value as string).replace(/%/g, "").toLowerCase())
ilikeNeedle !== null &&
rowValue.toLowerCase().includes(ilikeNeedle)
);
case "in":
return Array.isArray(filter.value) && filter.value.includes(rowValue);
return inSet !== null && inSet.has(rowValue);
default:
return true;
}