:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(quill): swap pressable items for clickable card rows (#119052)
Adam Leith5d1c4dce7a56
diff --git a/frontend/src/AGENTS.md b/frontend/src/AGENTS.mdindex bc8e66ddea27..61d776d238f2 100644--- a/frontend/src/AGENTS.md+++ b/frontend/src/AGENTS.md@@ -28,6 +28,7 @@ Common reinventions and what to use instead:| a select / combobox / autocomplete | `LemonSelect`, `LemonInputSelect` || a card / panel | `LemonCard` || a modal / confirm dialog | `LemonModal` / `LemonDialog` |+| a date or time shown to a user | `TZLabel` (`lib/components/TZLabel`), not `dayjs().fromNow()`/`.format()`, in quill too |If nothing fits, say so and propose extending the existing component before adding a new one. Don't silently fork. If you do end up building custom, stay on brand: system tokens and primitives only, matching the surrounding scene's density and flatness — and none of the generic AI-generated look (purple/blue gradients, glassmorphism, gradient text, icon-tile card grids, decorative motion). The full slop-tell catalog is in the `/writing-ui-components` skill.diff --git a/frontend/src/design.md b/frontend/src/design.mdindex 46d5d6f265f9..bf718db55c47 100644--- a/frontend/src/design.md+++ b/frontend/src/design.md@@ -198,6 +198,7 @@ Use via Tailwind utilities (`bg-primary text-primary-foreground`, `border-border- ContextMenu: right-click only; never the only path to an action- Menubar: persistent app-level menus- Never Select for actions; never restyle Buttons into menu rows (use `Item variant="menuItem"`)+- A list of clickable rows (tickets, programs, recent items) → `CardGroup` of `Card size="sm"`, each holding one full-width `<button>` or `<a>`. Item has no clickable variant. `Item tone` is for callouts only, such as a warning or an incident notice- Switching views: Tabs (sections of one page; `variant="line"` for page-level) | ToggleGroup (2–4 display modes) | Select (many views, low priority)- Text and numbers:- Input: single-line text@@ -274,6 +275,7 @@ Use via Tailwind utilities (`bg-primary text-primary-foreground`, `border-border- Icons: use `IconPlus` for add and new actions, never `IconPlusSmall`. The small glyph looks undersized next to the other icons in a row of icon buttons- Body text uses the `text-xs` size: `<Text size="xs">`. `Text` defaults to `base`, so always pass `size="xs"` for body copy- Space a section's contents with the parent's `gap-*` (`gap-2` within a section). When a button sits beside the section's title, use `gap-1`, because the button makes the title row taller. Never give the contents, headings included, a bottom margin. The web app's global styles add margins to `h1`–`h6` and `p`, so pass `className="m-0"` on a `Heading`'s or `Text`'s `render` element+- An inline link inside a sentence uses the same text size as the sentence: `<Button variant="link" size="inline">`. The other `Button` sizes set a control height and their own font size, so they never match the text around them. Don't patch one with `h-auto p-0`- <TODO: remaining short imperative rules; link to detail files with "read when…">## 6. Don'tdiff --git a/frontend/src/lib/components/AgentPromptButton/AgentPromptButton.tsx b/frontend/src/lib/components/AgentPromptButton/AgentPromptButton.tsxindex 1313b38a58ad..ba5e4bec87f9 100644--- a/frontend/src/lib/components/AgentPromptButton/AgentPromptButton.tsx+++ b/frontend/src/lib/components/AgentPromptButton/AgentPromptButton.tsx@@ -65,6 +65,7 @@ const ICON_SIZE: Record<AgentPromptButtonSize, QuillButtonProps['size']> = {sm: 'icon-sm',lg: 'icon-lg',row: 'icon',+ inline: 'icon-xs',}export interface AgentPromptButtonProps {diff --git a/packages/quill/apps/storybook/__screenshots__/baseline/manifest.json b/packages/quill/apps/storybook/__screenshots__/baseline/manifest.jsonindex c6560f18e7d9..9f188a2db286 100644--- a/packages/quill/apps/storybook/__screenshots__/baseline/manifest.json+++ b/packages/quill/apps/storybook/__screenshots__/baseline/manifest.json@@ -1007,16 +1007,6 @@"dark": "dark/primitives-item--default.png"}},- "primitives-item--pressable": {- "id": "primitives-item--pressable",- "title": "Primitives/Item",- "name": "Pressable",- "importPath": "../../packages/primitives/src/item.stories.tsx",- "screenshots": {- "light": "light/primitives-item--pressable.png",- "dark": "dark/primitives-item--pressable.png"- }- },"primitives-item--group": {"id": "primitives-item--group","title": "Primitives/Item",@@ -1027,16 +1017,6 @@"dark": "dark/primitives-item--group.png"}},- "primitives-item--group-list": {- "id": "primitives-item--group-list",- "title": "Primitives/Item",- "name": "Group List",- "importPath": "../../packages/primitives/src/item.stories.tsx",- "screenshots": {- "light": "light/primitives-item--group-list.png",- "dark": "dark/primitives-item--group-list.png"- }- },"primitives-item--dropdown-in-item": {"id": "primitives-item--dropdown-in-item","title": "Primitives/Item",diff --git a/packages/quill/packages/primitives/AGENTS.md b/packages/quill/packages/primitives/AGENTS.mdindex eb28b3c40444..17051d43f8bf 100644--- a/packages/quill/packages/primitives/AGENTS.md+++ b/packages/quill/packages/primitives/AGENTS.md@@ -135,22 +135,22 @@ Don't hand-roll `<p className="text-xs text-muted-foreground">` when `<Text size## Component Catalog-| Component | Variants | Sizes | Notes |-| ------------ | ---------------------------------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Button | default, primary, secondary, outline, destructive, destructive-outline, link, link-muted | default, xs, sm, lg, icon, icon-xs, icon-sm, icon-lg, row | `loading` overlays a centered spinner and disables the button (width stays stable). `row` is the full-width, regular-weight list row that menu, combobox and autocomplete items render. `elevated` adds heavy CTA chrome — see Elevated button. |-| Badge | default, info, destructive, warning, success, completed | — | Semantic status |-| Toggle | default, outline | default, sm, lg, icon | |-| Chip | outline | sm | Use with ChipClose |-| Separator | — | — | orientation: horizontal/vertical |-| Spinner | — | — | SVG, accepts svg props |-| Skeleton | — | — | Pulsing placeholder div |-| SkeletonText | — | — | lines, minWidth, maxWidth |-| Progress | — | — | value: 0-100 |-| Slider | — | — | value, min, max |-| Avatar | — | lg, default, sm, xs | Compose `Avatar > AvatarImage + AvatarFallback`; image errors fall back to initials/icon |-| ChatGlobe | — | — | Sweeping globe for "browsing the web"; sizes from its container. Still globe under reduced motion |-| AvatarGroup | — | default, sm, xs | Row of Avatars; `stacked` overlaps + spreads on hover (no reflow), `reverse` spreads left; `size` forwards to children |-| IconStack | — | — | Fanned colored icon tiles (`IconStackItem`, `color` per product, grey default); spreads on hover. The Empty icon, or a trailing set of items after text |+| Component | Variants | Sizes | Notes |+| ------------ | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| Button | default, primary, secondary, outline, destructive, destructive-outline, link, link-muted | default, xs, sm, lg, icon, icon-xs, icon-sm, icon-lg, row, inline | `loading` overlays a centered spinner and disables the button (width stays stable). `row` is the full-width, regular-weight list row that menu, combobox and autocomplete items render. `inline` is a link inside a sentence: no height or padding, and it inherits the sentence's font size and line height. `elevated` adds heavy CTA chrome — see Elevated button. |+| Badge | default, info, destructive, warning, success, completed | — | Semantic status |+| Toggle | default, outline | default, sm, lg, icon | |+| Chip | outline | sm | Use with ChipClose |+| Separator | — | — | orientation: horizontal/vertical |+| Spinner | — | — | SVG, accepts svg props |+| Skeleton | — | — | Pulsing placeholder div |+| SkeletonText | — | — | lines, minWidth, maxWidth |+| Progress | — | — | value: 0-100 |+| Slider | — | — | value, min, max |+| Avatar | — | lg, default, sm, xs | Compose `Avatar > AvatarImage + AvatarFallback`; image errors fall back to initials/icon |+| ChatGlobe | — | — | Sweeping globe for "browsing the web"; sizes from its container. Still globe under reduced motion |+| AvatarGroup | — | default, sm, xs | Row of Avatars; `stacked` overlaps + spreads on hover (no reflow), `reverse` spreads left; `size` forwards to children |+| IconStack | — | — | Fanned colored icon tiles (`IconStackItem`, `color` per product, grey default); spreads on hover. The Empty icon, or a trailing set of items after text |---@@ -182,7 +182,7 @@ Cards can contain Items — use `ItemGroup` inside `CardContent` for a card with<FieldLabel>Members</FieldLabel><ItemGroup combined><Item- variant="pressable"+ variant="outline"render={// eslint-disable-next-line react/forbid-elements<a href="#">@@ -197,7 +197,7 @@ Cards can contain Items — use `ItemGroup` inside `CardContent` for a card with}/><Item- variant="pressable"+ variant="outline"render={// eslint-disable-next-line react/forbid-elements<a href="#">@@ -245,6 +245,8 @@ Stack cards with merged borders:</CardGroup>```+A list of clickable rows is a `CardGroup` of `Card size="sm"`, each holding one full-width `<button>` or `<a>` (Item has no clickable variant). Put `p-0` on the Card and the padding, `hover:bg-fill-hover` and an inset focus ring on the button, so the whole row is the target. Give the text column `min-w-0 flex-1` so long titles truncate instead of pushing trailing badges onto a new line. See the `ClickableRows` story in `card-group.stories.tsx`.+`size="sm"` tightens the card's gap + block padding (`0.75rem`). `flush` lets a full-bleed child (a `Table`, a chart) run corner to corner: it drops the card's section gap + bottom padding and the `CardContent`'s inline padding, while the header keeps its own padding + divider. Use it instead of hand-writing `gap-0 pb-0` on the Card and `p-0` on the CardContent.```tsx@@ -743,7 +745,7 @@ For tooltips on the tiles, use one shared tooltip (see Tooltip) so it slides bet```tsx<ItemGroup>- <Item variant="pressable">+ <Item variant="outline"><ItemMedia variant="icon"><UserIcon /></ItemMedia>@@ -758,7 +760,7 @@ For tooltips on the tiles, use one shared tooltip (see Tooltip) so it slides bet</ItemActions></Item><ItemSeparator />- <Item variant="pressable">+ <Item variant="outline"><ItemMedia variant="icon"><UserIcon /></ItemMedia>@@ -770,10 +772,10 @@ For tooltips on the tiles, use one shared tooltip (see Tooltip) so it slides bet</ItemGroup>```-Item variants: default, outline, pressable, muted, menuItem+Item variants: default, outline, muted, menuItemItem sizes: default, sm, xs`<ItemGroup>` spaces items with a gap by default; pass `combined` to merge them into one flush list (no gap, squared interior corners, collapsed shared borders, rounded outer corners — like CardGroup)-Item tones (the `tone` prop — named `tone`, not `color`, to avoid colliding with the DOM `color` attribute when Base UI render props are spread onto ItemCheckbox/ItemRadio): default, info, success, warning, completed, destructive — a semantic tint orthogonal to `variant`, designed to pair with `variant="pressable"` for colored clickable rows (e.g. `<Item variant="pressable" tone="success" render={<a href="…" />}>`)+Item tones (the `tone` prop — named `tone`, not `color`, to avoid colliding with the DOM `color` attribute when Base UI render props are spread onto ItemCheckbox/ItemRadio): default, info, success, warning, completed, destructive — a semantic tint orthogonal to `variant`, for callouts such as a warning or an incident notice (e.g. `<Item variant="outline" tone="warning">`)### Avatardiff --git a/packages/quill/packages/primitives/src/button.css b/packages/quill/packages/primitives/src/button.cssindex c6690c9698b7..375644651723 100644--- a/packages/quill/packages/primitives/src/button.css+++ b/packages/quill/packages/primitives/src/button.css@@ -368,6 +368,21 @@height: 0.75rem;}+ /* A link inside a sentence takes the sentence's type, because the other sizes set a control height and font size. */+ .quill-button--size-inline {+ gap: 0.25em;+ height: auto;+ padding: 0;+ font-size: inherit;+ line-height: inherit;+ vertical-align: baseline;+ }++ .quill-button--size-inline svg:not([class*='size-']) {+ width: 1em;+ height: 1em;+ }+.quill-button--size-lg {gap: 0.5rem;height: 2rem;diff --git a/packages/quill/packages/primitives/src/button.tsx b/packages/quill/packages/primitives/src/button.tsxindex f4cc2935c9c4..69ca03001856 100644--- a/packages/quill/packages/primitives/src/button.tsx+++ b/packages/quill/packages/primitives/src/button.tsx@@ -25,6 +25,7 @@ const buttonVariants = cva(default: 'quill-button--size-default',xs: 'quill-button--size-xs',sm: 'quill-button--size-sm',+ inline: 'quill-button--size-inline',lg: 'quill-button--size-lg',icon: 'quill-button--size-icon','icon-xs': 'quill-button--size-icon-xs',diff --git a/packages/quill/packages/primitives/src/card-group.stories.tsx b/packages/quill/packages/primitives/src/card-group.stories.tsxindex d55657a11936..b203de901bb7 100644--- a/packages/quill/packages/primitives/src/card-group.stories.tsx+++ b/packages/quill/packages/primitives/src/card-group.stories.tsx@@ -1,5 +1,6 @@import type { Meta, StoryObj } from '@storybook/react'+import { Badge } from './badge'import { Button } from './button'import { Card, CardAction, CardDescription, CardHeader, CardTitle } from './card'import { CardGroup } from './card-group'@@ -11,6 +12,7 @@ import {DropdownMenuTrigger,} from './dropdown-menu'import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from './select'+import { Text } from './text'const meta = {title: 'Primitives/Card Group',@@ -149,3 +151,41 @@ export const Multiple: Story = {)},} satisfies Story++// A list of clickable rows: each Card holds one full-width button or link, so the whole row is the target.+export const ClickableRows: Story = {+ render: () => (+ <CardGroup className="max-w-sm">+ {[+ {+ title: 'Thanks, that fixed the funnel. One more question about breakdowns',+ meta: '#1042 · 3 hours ago',+ status: 'Open',+ },+ {+ title: 'We are looking into the missing network requests',+ meta: '#1037 · 2 days ago',+ status: 'Pending',+ },+ { title: 'Glad that worked. Closing this one out.', meta: '#1001 · 20 days ago', status: 'Resolved' },+ ].map((row) => (+ <Card key={row.meta} size="sm" className="p-0">+ <button+ type="button"+ className="flex w-full min-w-0 cursor-pointer items-center gap-3 px-3 py-2.5 text-start hover:bg-fill-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30"+ >+ <span className="flex min-w-0 flex-1 flex-col gap-0.5">+ <Text size="sm" render={<span />} className="block truncate">+ {row.title}+ </Text>+ <Text size="xs" variant="muted" render={<span />} className="block truncate">+ {row.meta}+ </Text>+ </span>+ <Badge className="shrink-0">{row.status}</Badge>+ </button>+ </Card>+ ))}+ </CardGroup>+ ),+} satisfies Storydiff --git a/packages/quill/packages/primitives/src/card.stories.tsx b/packages/quill/packages/primitives/src/card.stories.tsxindex cac7f8159717..df00dbdb7160 100644--- a/packages/quill/packages/primitives/src/card.stories.tsx+++ b/packages/quill/packages/primitives/src/card.stories.tsx@@ -224,7 +224,7 @@ export const CardWithItems: Story = {<CardContent className="py-0"><ItemGroup><Item- variant="pressable"+ variant="outline"render={// eslint-disable-next-line react/forbid-elements<a href="#">@@ -239,7 +239,7 @@ export const CardWithItems: Story = {}/><Item- variant="pressable"+ variant="outline"render={// eslint-disable-next-line react/forbid-elements<a href="#">diff --git a/packages/quill/packages/primitives/src/item.css b/packages/quill/packages/primitives/src/item.cssindex b82e6d888fc9..547fa69012a3 100644--- a/packages/quill/packages/primitives/src/item.css+++ b/packages/quill/packages/primitives/src/item.css@@ -71,24 +71,6 @@border-color: transparent;}- .quill-item--variant-pressable {- border-color: var(--border);- box-shadow: var(--shadow-md);- transition:- color 0.15s ease,- background-color 0.15s ease;- }-- .quill-item--variant-pressable:hover {- z-index: 1;- }-- .quill-item--variant-pressable:not(:disabled):active {- border-width: 1px;- box-shadow: var(--shadow-sm);- translate: 0 1px;- }-.quill-item--variant-menu {border: none;}@@ -98,8 +80,7 @@background-color: var(--fill-hover);}- /* Semantic tones — orthogonal to variant, designed to pair with- `variant="pressable"`. Each sets a tint (pastel surface) + accent+ /* Semantic tones for callouts, orthogonal to variant. Each sets a tint (pastel surface) + accent(readable foreground) pair, applied via shared rules below. */.quill-item--tone-info {--quill-item-tint: color-mix(in oklab, var(--info) 50%, var(--card));@@ -151,11 +132,6 @@border-color: color-mix(in oklab, var(--quill-item-accent) 50%, transparent);}- /* Deepen the tint on hover for pressable toned items */- .quill-item--variant-pressable[data-tone]:hover {- background-color: color-mix(in oklab, var(--quill-item-accent) 12%, var(--card));- }-/* Sizes */.quill-item--size-default,.quill-item--size-sm {diff --git a/packages/quill/packages/primitives/src/item.stories.tsx b/packages/quill/packages/primitives/src/item.stories.tsxindex 2fbd71ff886f..5d1aa9a8a5fb 100644--- a/packages/quill/packages/primitives/src/item.stories.tsx+++ b/packages/quill/packages/primitives/src/item.stories.tsx@@ -1,5 +1,5 @@import type { Meta, StoryObj } from '@storybook/react'-import { BadgeCheckIcon, ChevronRightIcon } from 'lucide-react'+import { BadgeCheckIcon } from 'lucide-react'import { useState } from 'react'import { Button } from './button'@@ -60,36 +60,11 @@ export const Default: Story = {),} satisfies Story-export const Pressable: Story = {- render: () => (- <Item- variant="pressable"- size="sm"- render={- // eslint-disable-next-line react/forbid-elements- <a href="#">- <ItemMedia variant="icon">- <BadgeCheckIcon className="size-5" />- </ItemMedia>- <ItemContent>- <ItemTitle>Your profile has been verified.</ItemTitle>- <ItemDescription>A simple item with title and description.</ItemDescription>- </ItemContent>- <ItemActions>- <ChevronRightIcon className="size-4" />- </ItemActions>- </a>- }- />- ),-} satisfies Story--// Semantic `tone` is orthogonal to `variant` — here paired with `pressable`-// (the right way to build a clickable, link-like row). Each renders as an <a>.+// Semantic `tone` tints a callout: a status or warning that sits in the page, not a clickable row.export const Tones: Story = {render: () => {const tones = [- { tone: undefined, title: 'Default', description: 'Neutral pressable row' },+ { tone: undefined, title: 'Default', description: 'Neutral callout' },{ tone: 'info' as const, title: 'Info', description: 'Informational status' },{ tone: 'success' as const, title: 'Success', description: 'Completed successfully' },{ tone: 'warning' as const, title: 'Warning', description: 'Needs attention' },@@ -99,26 +74,15 @@ export const Tones: Story = {return (<ItemGroup className="max-w-md">{tones.map(({ tone, title, description }) => (- <Item- key={title}- variant="pressable"- tone={tone}- render={- // eslint-disable-next-line react/forbid-elements- <a href="#">- <ItemMedia variant="icon">- <BadgeCheckIcon className="size-5" />- </ItemMedia>- <ItemContent>- <ItemTitle>{title}</ItemTitle>- <ItemDescription>{description}</ItemDescription>- </ItemContent>- <ItemActions>- <ChevronRightIcon className="size-4" />- </ItemActions>- </a>- }- />+ <Item key={title} variant="outline" tone={tone}>+ <ItemMedia variant="icon">+ <BadgeCheckIcon className="size-5" />+ </ItemMedia>+ <ItemContent>+ <ItemTitle>{title}</ItemTitle>+ <ItemDescription>{description}</ItemDescription>+ </ItemContent>+ </Item>))}</ItemGroup>)@@ -161,49 +125,6 @@ export const Group: Story = {),} satisfies Story-export const GroupList: Story = {- render: () => (- <ItemGroup>- <Item- variant="pressable"- size="xs"- render={- // eslint-disable-next-line react/forbid-elements- <a href="#">- <ItemContent>- <ItemTitle>List link item</ItemTitle>- </ItemContent>- </a>- }- />- <Item- variant="pressable"- size="xs"- render={- // eslint-disable-next-line react/forbid-elements- <a href="#">- <ItemContent>- <ItemTitle>List link item</ItemTitle>- </ItemContent>- </a>- }- />- <Item- variant="pressable"- size="xs"- render={- // eslint-disable-next-line react/forbid-elements- <a href="#">- <ItemContent>- <ItemTitle>List link item</ItemTitle>- </ItemContent>- </a>- }- />- </ItemGroup>- ),-} satisfies Story-export const DropdownInItem: Story = {render: () => {const [open, setOpen] = useState(true)@@ -305,18 +226,14 @@ export const DropdownCheckboxesInItemWithSelectAll: Story = {const usernames = people.map((p) => p.username)const toggle = (username: string, checked: boolean): void => {- setSelected((prev) =>- checked ? [...prev, username] : prev.filter((u) => u !== username)- )+ setSelected((prev) => (checked ? [...prev, username] : prev.filter((u) => u !== username)))}return (<Item variant="outline" className="max-w-md"><ItemContent><ItemTitle>Basic Item</ItemTitle>- <ItemDescription>- Multi-select with a headless select-all action above the list.- </ItemDescription>+ <ItemDescription>Multi-select with a headless select-all action above the list.</ItemDescription></ItemContent><ItemActions><DropdownMenu open={open} onOpenChange={setOpen}>diff --git a/packages/quill/packages/primitives/src/item.tsx b/packages/quill/packages/primitives/src/item.tsxindex 1c597c3019a4..1ccb28f16ca0 100644--- a/packages/quill/packages/primitives/src/item.tsx+++ b/packages/quill/packages/primitives/src/item.tsx@@ -1,10 +1,11 @@+import './item.css'+import { mergeProps } from '@base-ui/react/merge-props'import { useRender } from '@base-ui/react/use-render'import { cva, type VariantProps } from 'class-variance-authority'import * as React from 'react'import { CheckboxIndicator } from './checkbox'-import './item.css'import { cn } from './lib/utils'import { RadioIndicator } from './radio-group'import { Separator } from './separator'@@ -42,41 +43,37 @@ const ItemSeparator = React.forwardRef<React.ComponentRef<typeof Separator>, Rea})-const itemVariants = cva(- 'quill-item item group/item flex w-full flex-wrap items-center',- {- variants: {- variant: {- default: 'quill-item--variant-default',- outline: 'quill-item--variant-outline',- pressable: 'quill-item--variant-pressable',- muted: 'quill-item--variant-muted',- menuItem: 'quill-item--variant-menu',- },- size: {- default: 'quill-item--size-default',- sm: 'quill-item--size-sm',- xs: 'quill-item--size-xs',- },- tone: {- default: '',- info: 'quill-item--tone-info',- success: 'quill-item--tone-success',- warning: 'quill-item--tone-warning',- completed: 'quill-item--tone-completed',- destructive: 'quill-item--tone-destructive',- },+const itemVariants = cva('quill-item item group/item flex w-full flex-wrap items-center', {+ variants: {+ variant: {+ default: 'quill-item--variant-default',+ outline: 'quill-item--variant-outline',+ muted: 'quill-item--variant-muted',+ menuItem: 'quill-item--variant-menu',},- defaultVariants: {- variant: 'default',- size: 'default',- tone: 'default',+ size: {+ default: 'quill-item--size-default',+ sm: 'quill-item--size-sm',+ xs: 'quill-item--size-xs',},- }-)+ tone: {+ default: '',+ info: 'quill-item--tone-info',+ success: 'quill-item--tone-success',+ warning: 'quill-item--tone-warning',+ completed: 'quill-item--tone-completed',+ destructive: 'quill-item--tone-destructive',+ },+ },+ defaultVariants: {+ variant: 'default',+ size: 'default',+ tone: 'default',+ },+})const Item = React.forwardRef<HTMLDivElement, useRender.ComponentProps<'div'> & VariantProps<typeof itemVariants>>(- function Item({ className, variant = 'default', size = 'default', tone = 'default', role, render, ...props }, ref) {+ function Item({ className, variant = 'default', size = 'default', tone = 'default', render, ...props }, ref) {return useRender({ref,defaultTagName: 'div',@@ -85,7 +82,6 @@ const Item = React.forwardRef<HTMLDivElement, useRender.ComponentProps<'div'> &'data-quill': '','data-tone': tone && tone !== 'default' ? tone : undefined,className: cn(itemVariants({ variant, size, tone, className })),- role: variant === 'pressable' ? 'link' : undefined,} as Omit<React.ComponentProps<'div'>, 'ref'>,props),diff --git a/packages/quill/packages/primitives/src/styles/layers.css b/packages/quill/packages/primitives/src/styles/layers.cssindex 10bed23b4dc5..8ac3879f176e 100644--- a/packages/quill/packages/primitives/src/styles/layers.css+++ b/packages/quill/packages/primitives/src/styles/layers.css@@ -95,7 +95,6 @@ body.is-desktop .quill-toggle,body.is-desktop .quill-accordion__trigger,body.is-desktop .quill-checkbox:not(:disabled),body.is-desktop .quill-field__label:has(> [data-slot='field']),-body.is-desktop .quill-item--variant-pressable,body.is-desktop .group\/field:has(> [role='checkbox']) .quill-label {cursor: default;}diff --git a/products/conversations/frontend/components/QuillSidePanel/QuillTicketMessages.tsx b/products/conversations/frontend/components/QuillSidePanel/QuillTicketMessages.tsxindex c501b5e78bfa..601dbeba35be 100644--- a/products/conversations/frontend/components/QuillSidePanel/QuillTicketMessages.tsx+++ b/products/conversations/frontend/components/QuillSidePanel/QuillTicketMessages.tsx@@ -12,7 +12,7 @@ import {Text,} from '@posthog/quill'-import { dayjs } from 'lib/dayjs'+import { TZLabel } from 'lib/components/TZLabel'import type { ChatMessage as TicketMessage } from '../../types'import { SupportMarkdown, SupportRichContentPreview } from '../Editor'@@ -86,7 +86,7 @@ export function QuillTicketMessages({ messages, messagesLoading }: QuillTicketMe</ChatBubble><ChatMessageFooter><Text size="xs" variant="muted" render={<span translate="no" />}>- {dayjs(message.createdAt).fromNow()}+ <TZLabel time={message.createdAt} /></Text></ChatMessageFooter></ChatMessageContent>diff --git a/products/conversations/frontend/components/QuillSidePanel/QuillTicketRow.tsx b/products/conversations/frontend/components/QuillSidePanel/QuillTicketRow.tsxindex e11f59e85575..cd88b4e25ce6 100644--- a/products/conversations/frontend/components/QuillSidePanel/QuillTicketRow.tsx+++ b/products/conversations/frontend/components/QuillSidePanel/QuillTicketRow.tsx@@ -1,6 +1,6 @@-import { Badge, Item, ItemActions, ItemContent, ItemDescription, ItemTitle, cn } from '@posthog/quill'+import { Badge, Card, Text } from '@posthog/quill'-import { dayjs } from 'lib/dayjs'+import { TZLabel } from 'lib/components/TZLabel'import { stripMarkdown } from 'lib/utils/markdown'import { type ConversationTicket, sidePanelTicketFilterLabels } from '../../types'@@ -9,32 +9,38 @@ import { ticketStatusBadgeVariant } from './ticketStatusBadgeVariant'export function QuillTicketRow({ ticket, onOpen }: { ticket: ConversationTicket; onOpen: () => void }): JSX.Element {const unread = ticket.unread_count ?? 0return (- <Item- variant="pressable"- size="sm"- render={<button type="button" onClick={onOpen} data-attr="sidebar-open-ticket" />}- >- <ItemContent>- <ItemTitle className={cn('w-full', unread > 0 && 'font-semibold')}>- <span className="truncate">+ <Card size="sm" className="p-0">+ <button+ type="button"+ onClick={onOpen}+ data-attr="sidebar-open-ticket"+ className="flex w-full min-w-0 cursor-pointer items-center gap-3 px-3 py-2.5 text-start hover:bg-fill-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30"+ >+ <span className="flex min-w-0 flex-1 flex-col gap-0.5">+ <Text+ size="sm"+ weight={unread > 0 ? 'semibold' : 'normal'}+ render={<span />}+ className="block truncate"+ >{ticket.last_message ? stripMarkdown(ticket.last_message) : 'No messages yet'}- </span>- </ItemTitle>- <ItemDescription>- {ticket.ticket_number && <span className="font-mono">#{ticket.ticket_number} · </span>}- <span translate="no">{dayjs(ticket.last_message_at ?? ticket.created_at).fromNow()}</span>- </ItemDescription>- </ItemContent>- <ItemActions>- {unread > 0 && (- <Badge variant="info" aria-label={`${unread} unread`}>- {unread}+ </Text>+ <Text size="xs" variant="muted" render={<span />} className="block truncate">+ {ticket.ticket_number && <span className="font-mono">#{ticket.ticket_number} · </span>}+ <TZLabel time={ticket.last_message_at ?? ticket.created_at} showPopover={false} />+ </Text>+ </span>+ <span className="flex shrink-0 items-center gap-1">+ {unread > 0 && (+ <Badge variant="info" aria-label={`${unread} unread`}>+ {unread}+ </Badge>+ )}+ <Badge variant={ticketStatusBadgeVariant(ticket.status)}>+ {sidePanelTicketFilterLabels[ticket.status]}</Badge>- )}- <Badge variant={ticketStatusBadgeVariant(ticket.status)}>- {sidePanelTicketFilterLabels[ticket.status]}- </Badge>- </ItemActions>- </Item>+ </span>+ </button>+ </Card>)}diff --git a/products/conversations/frontend/components/QuillSidePanel/QuillTicketsList.tsx b/products/conversations/frontend/components/QuillSidePanel/QuillTicketsList.tsxindex aa9312b3e078..51afba4b4a7d 100644--- a/products/conversations/frontend/components/QuillSidePanel/QuillTicketsList.tsx+++ b/products/conversations/frontend/components/QuillSidePanel/QuillTicketsList.tsx@@ -7,9 +7,10 @@ import {Empty,EmptyDescription,EmptyHeader,- EmptyMedia,+ IconStack,+ IconStackItem,EmptyTitle,- ItemGroup,+ CardGroup,Select,SelectContent,SelectItem,@@ -39,9 +40,11 @@ export function QuillTicketsList(): JSX.Element {return (<Empty><EmptyHeader>- <EmptyMedia variant="icon">- <IconSupport />- </EmptyMedia>+ <IconStack>+ <IconStackItem color="var(--color-product-support-light)">+ <IconSupport />+ </IconStackItem>+ </IconStack><EmptyTitle>Support chat isn't available right now</EmptyTitle><EmptyDescription>An ad blocker or network policy can stop it from loading. You can still ask PostHog AI or the@@ -85,8 +88,7 @@ export function QuillTicketsList(): JSX.Element {Switched browsers?{' '}<Buttonvariant="link"- size="xs"- className="h-auto p-0"+ size="inline"onClick={() => setView('restore')}data-attr="sidebar-recover-tickets">@@ -136,11 +138,11 @@ export function QuillTicketsList(): JSX.Element {</Button></div>) : (- <ItemGroup combined>+ <CardGroup>{filteredTickets.map((ticket: ConversationTicket) => (<QuillTicketRow key={ticket.id} ticket={ticket} onOpen={() => setCurrentTicket(ticket)} />))}- </ItemGroup>+ </CardGroup>)}</div>)diff --git a/products/wizard/frontend/library/WizardProgramList.tsx b/products/wizard/frontend/library/WizardProgramList.tsxindex 74e2662ce092..77d6e40d0e5a 100644--- a/products/wizard/frontend/library/WizardProgramList.tsx+++ b/products/wizard/frontend/library/WizardProgramList.tsx@@ -1,6 +1,8 @@import { IconSearch } from '@posthog/icons'import {Button,+ Card,+ CardGroup,Empty,EmptyDescription,EmptyHeader,@@ -8,12 +10,9 @@ import {InputGroup,InputGroupAddon,InputGroupInput,- Item,- ItemContent,- ItemDescription,- ItemGroup,- ItemTitle,Skeleton,+ Text,+ cn,} from '@posthog/quill-primitives'import type { WizardProgramApi } from '../generated/api.schemas'@@ -88,31 +87,52 @@ export function WizardProgramList({</Empty>)) : (- <ItemGroup combined>- {programs.map((program) => (- <Item- key={program.id}- variant="pressable"- className={- selectedProgram?.id === program.id- ? 'z-[1] border-ring bg-fill-selected shadow-none'- : 'shadow-none'- }- render={<button type="button" onClick={() => onSelect(program)} />}- >- <ItemContent>- <ItemTitle>{program.name}</ItemTitle>- <ItemDescription>{program.description}</ItemDescription>- </ItemContent>- <span className="shrink-0 whitespace-nowrap text-xs text-muted-foreground">- {program.supported_environments- .filter((environment) => WIZARD_LOCAL_RUNS_VISIBLE || environment === 'cloud')- .map((environment) => (environment === 'cloud' ? 'Cloud' : 'Local'))- .join(' · ')}- </span>- </Item>- ))}- </ItemGroup>+ <CardGroup>+ {programs.map((program) => {+ const selected = selectedProgram?.id === program.id+ return (+ <Card key={program.id} size="sm" className="p-0">+ <button+ type="button"+ onClick={() => onSelect(program)}+ aria-pressed={selected}+ className={cn(+ 'flex w-full min-w-0 cursor-pointer items-center gap-3 px-3 py-2.5 text-start hover:bg-fill-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30',+ selected && 'bg-fill-selected hover:bg-fill-selected'+ )}+ >+ <span className="flex min-w-0 flex-1 flex-col gap-0.5">+ <Text+ size="sm"+ weight="medium"+ render={<span />}+ className="block truncate"+ >+ {program.name}+ </Text>+ <Text size="xs" variant="muted" render={<span />} className="block">+ {program.description}+ </Text>+ </span>+ <Text+ size="xs"+ variant="muted"+ render={<span />}+ className="shrink-0 whitespace-nowrap"+ >+ {program.supported_environments+ .filter(+ (environment) =>+ WIZARD_LOCAL_RUNS_VISIBLE || environment === 'cloud'+ )+ .map((environment) => (environment === 'cloud' ? 'Cloud' : 'Local'))+ .join(' · ')}+ </Text>+ </button>+ </Card>+ )+ })}+ </CardGroup>)}</div></div>