sticky search

This commit is contained in:
tresabhi committed 2026-12-03 21:58:18 -06:00
1 parent f7703b4ae5
commit b04946ed96
6 files changed
+86 -41

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
- No return type annotations. Put `satisfies Type` on the returned expression instead.
- Wrap functions defined inside React components in `useCallback`.
- Never inline a complex type (a union of object shapes, etc.) in a signature; name it as an interface or type.
- Use a string `enum` (`Page = "page"`) instead of a union of string literals (`"page" | "dialog"`) whenever the values can be enumerated.
- In object literals, `...spread` entries come first, each on its own line, followed by a blank line, then the custom entries. A single-line object with a spread becomes multi-line.
- When an object literal's values are long expressions, compute them first into `const`s named after their keys, then build the object with shorthand (`{ name, color, tanks: [] }`). Short values stay inline.
- Always hoist values that take work to compute (a function call, math, a lookup, like `"A".charCodeAt(0)` or `1 - SCROLL_ZONE`) and don't change between iterations or calls out of loops and repeatedly called functions into a `const` above them. No exceptions. Plain literals (strings, numbers, selectors like `"[data-row]"`) cost nothing and stay inline.