KQ-1636 · SAVED/LENSES

Saved Lenses

A row of saved views over a chip bar and a results list where switching views is a shared-element move: chips the two views have in common are the same elements and keep their slots, arriving chips take the slots departing ones leave, the differing ones slide out on the exit ease and in on springs.snap a cascade apart, and later chips glide on springs.glide only when a replaced chip is a different width. The tab mark slides on snap. Removing a chip or adding one from Filter makes a draft whose tab earns a modified dot on snap while Save, Save as new and Revert slide in on glide; views are a tablist with arrows, Home and End, and digits 1 to 9 pick a view from anywhere in the surface.

KQ-1636 · SAVED/LENSES

Support queue

9 tickets

  • Bulk edit times outFernworks · me · normal3d overdue
  • Roles reset after updateBasinworks · me · normal3d overdue
  • Webhook retries flood the logFieldline · me · high2d overdue
  • SSO login loopsBasinworks · me · highdue today
  • Timezone shifts due datesFieldline · me · normaldue in 2d
  • Gauge sync drops overnightFieldline · me · highdue in 2d
  • Mobile app logs out hourlyFieldline · me · urgentdue in 3d
  • Map tiles fail to loadBasinworks · me · lowdue in 7d
  • CSV import skips headersFieldline · me · lowdue in 9d

my open · switch views · shared chips stay put

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/saved-lenses

Props

views
LensView[]
default defaultLensViews
Seeds the saved views ({ id, name, filters: { field, value }[] }); the surface owns saves after that and reports them.
rows
LensRow[]
default defaultLensRows
The records each view filters: { id, code, title, due, ...fields }.
fields
LensField[]
default defaultLensFields
The filterable fields and their values offered by Filter; a field of kind "due" reads due dates against now (overdue, today, this week).
value / defaultValue
string
default — / the first view
The active view id, controlled or initial.
onValueChange
(id: string) => void
default —
Fires with the new view id from the tab, arrow or digit that chose it.
onViewChange
(view, previous) => void
default —
Fires with the view switched to (including unsaved edits) and the one left.
onSaveView
(view, { asNew }) => void
default —
Fires from Save (asNew false) or Save as new (asNew true) with the saved view.
onRevert
(viewId: string) => void
default —
Fires from Revert with the view whose edits were dropped.
status
"ready" | "loading" | "error"
default "ready"
Whether the active view's results have arrived; loading, empty and failed views each get a quiet panel.
onRetry
() => void
default —
Try again was pressed on a failed view.
tabStyle
"underline" | "pill" | "boxed"
default "underline"
How the active tab is marked: an underline, a tinted pill, or a raised box; the mark slides between tabs.
chipStyle
"soft" | "outline" | "solid"
default "soft"
Chip look: a soft wash, a hairline outline, or a solid fill.
cornerRadius
number
default 8
Corner radius of chips, tabs, the menu and buttons, px (0 to 16).
accent
string
default "var(--accent-bright)"
The tab mark, chips and Save, any CSS colour.
now
number
default defaultLensNow
Today in ms, for due dates.
me
string
default "Ines Park"
Whose queue this is: an assignee chip with this value reads "Me".
title
string
default "Support queue"
The heading over the views and the surface's accessible name.
height
number
default 520
Height of the surface in px; the results scroll inside it.
disabled
boolean
default false
Views, chips and actions are inert; the surface dims.
className
string
default —
Classes for the outer surface.