You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- **Nav fires on mousedown, not click** — for instant (Linear-style) feel, route navigation activates on press. **Always import `Link` from `~/components/link.tsx`, never from `@tanstack/react-router`** (the two wrappers `SidebarLink`/`ConnectionResourceLink` already route through it). It's a `createLink` wrapper whose anchor fires a synthetic `.click()` on mousedown, then swallows the real follow-up click in the capture phase — telling the two apart by `e.detail` (synthetic `.click()` and keyboard Enter are `detail 0`; a real mouse click is `detail >= 1`). Guards preserve cmd/ctrl/shift/alt-click (open-in-new-tab) and skip `target=_blank`. **Menus are the exception** — base-ui `DropdownMenuItem render={<Link/>}` must pass `activateOn="click"` to keep native mouseup activation (macOS menu semantics). For imperative press-nav on plain buttons/tabs (not `<Link>`), spread `pressNavProps(fire)` from `~/lib/press-nav.ts` (`onMouseDown` on plain press + `onClick` keyboard fallback via `detail 0`); if the button has a nested click target (e.g. a tab's close ✕), give that child `onMouseDown={e => e.stopPropagation()}` so the press doesn't navigate first. Reference: `tab-bar.tsx` `Tab`.
19
20
-**Sidebar-style nav rows** (definitions nav, dialog rails): `SidebarLink`/`SidebarButton` from `~/components/sidebar-link.tsx` — `h-7 rounded-md text-sm`, solid `bg-primary` active.
20
21
- **Unified filter field** (`table/-components/toolbar/filter-search-bar.tsx`): input-styled container (`min-h-8 flex-wrap bg-input rounded-xl`, `has-[input:focus]` ring) with chips inline + bare `CommandPrimitive.Input`. Suggestion panel opens upward (`absolute bottom-full mb-2 bg-popover rounded-xl p-1`, kit `CommandList` in unstyled `CommandPrimitive`); `onMouseDown preventDefault` keeps focus. Stage machine column → operator → value; pending chip styled like committed chips minus eye/✕. Value stage adds "Suggested values" (enums via `column.availableValues`, booleans true/false) — pick applies immediately, or toggles into the comma list for `isArray`. Backspace on empty steps back / pops last chip; ⌘F focuses; Escape cancels stage then blurs. Chips are `h-5 bg-[color-mix(in_oklch,var(--input),var(--foreground)_4%)] shadow-2xs` (search icon gets `mr-1` so chips/text don't crowd it) — the foreground-mix over the field's own surface reads slightly darker in light and slightly lighter in dark (`bg-background` was rejected: darker than the field in dark mode).
21
22
-**Command palette** (`routes/-components/actions-center.tsx` + kit `CommandDialog`): shell is `top-[16svh] translate-y-0` with `max-h-[min(35rem,calc(84svh-2rem))] flex flex-col sm:max-w-xl` so it never overflows short viewports; surface is `bg-background` (from DialogContent), inner `Command` gets `bg-transparent p-0 min-h-0 flex-1`. Header is a borderless large input row (`border-b px-4`, search icon + bare `CommandPrimitive.Input``h-12 text-base`), not the boxed kit `CommandInput`. List: `flex-1 max-h-none scroll-fade scroll-py-2 p-1` (kit default `max-h-72` must be overridden). Footer: `border-t px-4 py-2 text-2xs` kbd hints. Item icons rely on kit auto `size-4` — pass `text-muted-foreground` only.
0 commit comments