Skip to content

feat: sidebar "what's new" announcement cards#6201

Open
tsahimatsliah wants to merge 20 commits into
mainfrom
claude/sleepy-newton-72736a
Open

feat: sidebar "what's new" announcement cards#6201
tsahimatsliah wants to merge 20 commits into
mainfrom
claude/sleepy-newton-72736a

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jun 16, 2026

Copy link
Copy Markdown
Member

Changes

A Linear-style "what's new" announcement surface for the bottom of the V2 sidebar — to prominently announce a new feature/release and drive one clear action. Behind the sidebar_announcements feature flag (default off).

  • AnnouncementCard with three tiers, built from existing primitives (Card tokens, Typography, Button, CloseButton, Pill, Image):
    • Compact — icon + title (+ subtitle) + arrow; whole row links out
    • Default — badge + title + 2-line body + primary CTA + dismiss
    • Cover — cover image on top of the Default card (close overlaid with Primary, since Float is invisible over imagery)
  • AnnouncementCarousel — browsable stack with dot indicators, prev/next, "1 of N", advance-on-dismiss; renders nothing when empty
  • useSidebarAnnouncements + curated content config. Dismissal persists client-side via usePersistentState (IndexedDB, keyed by id) — this repo can't add a backend ActionType, so we follow the Brief-card pattern rather than completeAction
  • SidebarAnnouncements container wired into SidebarDesktopV2, shown only when the sidebar is expanded and on the home panel
  • Storybook: stories for every variant/state (incl. interactive carousel + empty state) and a Guidelines & anatomy docs page (sizes, padding, radius, typography, color tokens, badge, buttons, dismissal, do/don't)

Note

Content in content.tsx is placeholder copy reusing existing media.daily.dev images — swap in real announcements/cover art before enabling the flag. Guidelines are delivered as a TSX docs story (not MDX) because this Storybook 9 setup has no resolvable @storybook/blocks.

Events

Yes — three sidebar announcement tracking events:

Type event_name value
New impression announcement target_id: announcement id
New click announcement target_id: announcement id
New dismiss announcement target_id: announcement id

Experiment

Yes — feature flag sidebar_announcements (boolean, default off) gates the surface.

Manual Testing

On those affected packages:

  • Have you done sanity checks in the webapp? (flag on + layout_v2: stack shows in expanded sidebar, dismiss persists across reload, hidden when collapsed / on utility panels / when empty)
  • Storybook: Components/Announcements — variants, carousel, guidelines

Verified locally: strict typecheck guard, shared ESLint clean, AnnouncementCard.spec.tsx (4/4), and Storybook dev boots/serves the new stories.

🤖 Generated with Claude Code

Preview domain

https://claude-sleepy-newton-72736a.preview.app.daily.dev

Add a Linear-style announcement surface for the bottom of the V2 sidebar
to prominently announce new features/releases and drive a single action.

- AnnouncementCard with Compact / Default / Cover variants, built from
  existing primitives (Card tokens, Typography, Button, CloseButton, Pill)
- AnnouncementCarousel stack: dot indicators, prev/next, advance-on-dismiss
- useSidebarAnnouncements + content config; dismissal persists client-side
  via usePersistentState (no backend ActionType needed)
- SidebarAnnouncements container wired into SidebarDesktopV2, gated by the
  new sidebar_announcements feature flag and shown only in the expanded
  home panel
- Storybook stories for every variant/state + a Guidelines & anatomy page

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jun 17, 2026 7:47am
storybook Building Building Preview Jun 17, 2026 7:47am

Request Review

The badge used cabbage (brand purple) subtlest bg with brand-default text,
which rendered as low-contrast purple-on-purple. Card used a filled
surface-float that read too heavy in the sidebar.

- Badge: neutral, readable label (bg-surface-float + text-text-secondary)
- Card: transparent with a hairline border; interactive (compact) variant
  gets a subtle hover fill instead of a permanent one
- Update Guidelines spec tables to match

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsahimatsliah and others added 2 commits June 16, 2026 16:16
Pill defaults to align-self:flex-start, top-aligning the 16px badge in the
24px icon row. Set alignment="self-center" so it sits centered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the solid Primary close over the cover image with a translucent,
backdrop-blurred circular button (bg-overlay-secondary-pepper + backdrop-blur-md
+ subtle white border), matching the floating-control idiom in
ArticleFeaturedWideGridCard. Reads cleaner over imagery than a solid fill.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Match the design-system corner radius (Small icon button = rounded-10)
instead of a fully circular close, keeping the frosted-glass treatment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ~8% surface-float badge fill was nearly invisible, and in the Default
variant the leading icon pushed the badge right of the title, so the label
read as misaligned floating text.

- Badge: idiomatic flat-accent chip (bg-accent-cabbage-flat + text-brand-default)
  — a visible, theme-safe brand tint with readable text
- Default/Cover now lead with the badge (flush-left, aligned with the title);
  the inline leading icon is dropped for these variants (icon stays Compact-only)
- Drop the now-unused icon props/imports from content + stories; update Guidelines

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Polish the carousel into a proper "what's new" stack and add a playground
to explore every interaction.

- Stacked-card cue: edges of the cards behind peek under the active card
  (1–2 layers, shrinking as the stack empties)
- Switching animates with a keyed enter (fade-slide-up via animate-composer-in)
- Dismiss plays an exit (fade + slide/scale) then the next card slides into
  place and fires its impression
- Respects prefers-reduced-motion (motion-safe enter; exit delay skipped)
- New Components/Announcements/Playground: stateful harness with switch /
  dismiss / add / reset / dismiss-all, empty state, and a live event log

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review feedback on the stack and badge.

- Stack: one single, centered card peeking behind (was two misaligned bars),
  dimmed so it reads as recessed; the active card sits on a defined
  bg-background-subtle surface with a shadow-2 for the 3D "lift" off the card
  behind. Dismissing reveals the card behind before the next slides in.
- Label: small flush-left brand-colored text label (typo-caption2) instead of
  the filled chip — visible but no longer competing with the title.
- Update Guidelines spec (surface + badge tokens).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add a subtle white inner gradient hugging the card's bottom edge
  (from-white/8 → transparent) for a soft 3D "lip" that's visible on the
  dark sidebar where a dark inner shadow wouldn't read
- Soften the stacked outer shadow to a small, transparent drop
  (0 4px 12px -6px rgba(0,0,0,.25)) instead of shadow-2

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsahimatsliah and others added 2 commits June 16, 2026 23:58
Make the surface feel alive and standout, all motion-safe (reduced-motion
falls back to instant):

- Card: gentle hover lift + border brighten (transition-all)
- Cover: image scales up softly on card hover (group/card)
- Stack: hovering "opens" it — the card behind slides out and brightens
  (group/stack), and the active card's shadow deepens on hover
- Frosted close: scale up on hover, press-down on active
- Carousel dots scale on hover; prev/next arrows scale on hover and press

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the prev/next arrows with a centered, segmented indicator:

- Hovering (or focusing) a dot switches to that announcement — scrub across
  the dots to flip through the stack
- Active dot stretches into a pill and the fill glides between positions
- Removes the right-side arrow buttons entirely
- Update Playground copy to match

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Card border uses border-subtlest-quaternary (the soft V2 sidebar border)
  by default; hover brightens one step to tertiary
- Active indicator is now a small rounded rectangle (rounded-2, 16x6) instead
  of an oval pill — slightly smaller
- More vertical gap between the dots and the card

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsahimatsliah and others added 2 commits June 17, 2026 00:20
…ests

Address PR review findings:

- Impressions now fire only after a card dwells (400ms) and once per id, so
  hovering across the dots to browse no longer logs an impression per card
- Don't render the sidebar announcements when the feedback widget occupies the
  bottom slot, avoiding overlap
- Memoize the hook's dismiss callback
- Add AnnouncementCarousel + useSidebarAnnouncements specs (switch, dismiss,
  empty, impression dedupe; filtering, hydration gating, persistence)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the rotated ArrowIcon on the Compact card with MoveToIcon (points
right by default) at XXSmall (12px) for a clearer, lighter 'go to' affordance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A single Storybook page exploring 16 cover treatments at the real ~240px
sidebar width — classic, full-bleed overlays, brand wash, duotone, framed,
thumbnail, hero, floating panel, dual scrim, corner badge, glass panel,
split color, icon-only, video, and top-accent. Every image is full-bleed and
every scrim/overlay spans edge to edge so directions can be compared cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- TEMPORARY: featureSidebarAnnouncements defaults to true so the card shows in
  the V2 sidebar without GrowthBook config (revert to false before shipping)
- Add a Storybook story that mounts the real SidebarAnnouncements container
  (flag + curated content + persisted dismissal) to review live behavior

Tagged the pre-flip reviewed baseline as `announcements-v1`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Root cause the card wasn't visible: it mounts inside SidebarDesktopV2, which
only renders when featureLayoutV2 is on (default was false), so the legacy
sidebar showed instead. Temporarily default layout_v2 to true so the V2
sidebar + announcements card render without GrowthBook config.

TEMPORARY — revert layout_v2 and sidebar_announcements to false before shipping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Root cause it stayed hidden: MainLayout passes showFeedbackWidget={!hideFeedbackWidget}
(true in the common case), and the announcements guard had `!showFeedbackWidget`,
so the card was suppressed almost everywhere. Drop that condition — the card
renders above the help/feedback area in the expanded home panel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add a small gap below the carousel dots
- Revert the temporary review defaults: layout_v2 and sidebar_announcements
  are back to false (enable via GrowthBook), so nothing is hard-coded on
- Remove the review-only "In Sidebar" live-container story

Keeps the full reviewed card implementation + the feedback-widget visibility
fix. Shippable state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Drop the unused exampleCoverImage export (and its now-unused import)
- Correct the badge/icon doc comments to match the final design (text label
  defaulting to brand color; icon is Compact-only)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant