Skip to content

Update illustration colors and add dot grid background#3004

Open
shaunandrews wants to merge 5 commits intotrunkfrom
color-iterations
Open

Update illustration colors and add dot grid background#3004
shaunandrews wants to merge 5 commits intotrunkfrom
color-iterations

Conversation

@shaunandrews
Copy link
Copy Markdown
Contributor

@shaunandrews shaunandrews commented Apr 7, 2026

Summary

Update illustrations on the Sync and Preview tabs with dark mode support, interactive dot grid backgrounds, and improved color contrast for accessibility.

Before

image image image image

After

image image image image

Related issues

Proposed Changes

New components

  • DotGrid (src/components/dot-grid.tsx) — Canvas-based animated cross-pattern grid with spring physics, hover repulsion, click ripples, and an intro reveal animation. Reads color from CSS color property and responds to prefers-color-scheme changes. Respects prefers-reduced-motion: reduce — renders a static grid with no animation or mouse interactions.
  • IllustrationGrid (src/components/illustration-grid.tsx) — Wrapper that places a DotGrid behind any child content with a radial gradient mask (radial-gradient(circle, black 20%, transparent 65%)) and 120px bleed past the content edges.

Sync tab illustration (sync-tab-image.tsx)

  • Replaced the old SVG (274×274 with base64-encoded cross-hatch pattern) with the updated 230×218 design
  • Colors now use CSS custom properties: --color-frame-surface for browser content area, --color-frame-bg for dots, --color-frame-text for connector opacity, --color-frame-surface-alt for WP logos in dark mode
  • SVG class names scoped with sti- prefix, filter IDs renamed to sti-shadow-top/sti-shadow-bottom
  • Wrapped in IllustrationGrid for the dot grid background

Preview tab illustration (screenshot-demo-site.tsx)

  • Browser chrome colors now use CSS tokens: --color-frame-surface for frame, --color-frame-surface-alt for toolbar, --color-frame-text-secondary for arrows
  • Accent shape opacity bumps from 0.2 to 0.35 in dark mode
  • SVG class names scoped with sds- prefix
  • Wrapped in IllustrationGrid for the dot grid background

Accessibility

  • Dark mode --color-frame-text-secondary changed from #949494 to #a0a0a0 in index.css for improved WCAG contrast ratio
  • DotGrid respects prefers-reduced-motion: reduce — when enabled, renders a fully static grid with no intro animation, hover repulsion, or click ripples; mouse event listeners are not attached at all

Tests

  • dot-grid.test.tsx — Verifies canvas renders, className and opacity props apply correctly (canvas getContext mocked for jsdom)
  • illustration-grid.test.tsx — Verifies children render and DotGrid canvas is present
  • Sync test suite (sync/tests/index.test.tsx) — Added DotGrid mock to prevent canvas errors in jsdom

Testing Instructions

Sync tab — signed out

  1. Sign out of WordPress.com (or use a fresh profile)
  2. Select any local site, open the Sync tab
  3. Light mode: Verify the illustration shows a light gray browser content area, dark WP logo with 50% opacity, dark connector dots with subtle borders, and the dot grid fading in behind the illustration
  4. Dark mode: Verify the browser content area turns dark (#1a1a1a-ish), WP logos turn light gray, connector/dots invert, and the dot grid adapts color automatically
  5. Hover over the dot grid area — crosses should repulse from cursor; clicking should produce a ripple

Sync tab — signed in

  1. Sign in and connect a site
  2. Verify the connected sites list renders normally with no visual regressions

Preview tab — signed out

  1. Sign out, open the Previews tab
  2. Light mode: Browser chrome should be light gray with subtle toolbar, medium gray nav arrows
  3. Dark mode: Browser chrome should be dark (#2C3338-ish), arrows lighter, accent shape more saturated
  4. Dot grid should appear behind the illustration with the same radial fade

Preview tab — signed in

  1. Sign in, verify the preview sites list and create button work normally

Color contrast

  1. In dark mode, check that secondary text (descriptions, labels) throughout the app is comfortably readable — it should be noticeably lighter than before

Reduced motion

  1. Enable "Reduce motion" in macOS System Settings → Accessibility → Display
  2. Verify the dot grid appears immediately as a static pattern — no intro animation, no hover/click effects

Pre-merge Checklist

  • Visual review in light mode
  • Visual review in dark mode
  • No regressions on Sync tab when signed in
  • No regressions on Previews tab when signed in
  • Secondary text contrast acceptable in dark mode
  • Reduced motion renders static grid
  • All component tests pass (npm test -- apps/studio/src/components/tests/ apps/studio/src/modules/sync/tests/)

🤖 Generated with Claude Code

shaunandrews and others added 5 commits April 7, 2026 14:31
…grid background

Rebuild the Sync tab illustration SVG with proper light/dark mode color switching.
Update the Preview tab browser chrome to use light colors in light mode.
Add an interactive DotGrid canvas component behind both illustrations with a
radial gradient mask for a clean fade effect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract shared IllustrationGrid component (DotGrid + radial mask)
  used by both Sync and Preview tabs
- Replace hardcoded SVG colors with CSS custom properties
  (--color-frame-surface, --color-frame-bg, etc.) so illustrations
  adapt automatically to theme changes
- Scope SVG class names with short prefixes (sti-, sds-) to avoid
  collisions
- Add basic tests for DotGrid and IllustrationGrid components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When reduced motion is preferred, render a static grid with no intro
animation, hover repulsion, or click ripples. Mouse event listeners
are not attached at all. The grid still responds to resize and color
scheme changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shaunandrews shaunandrews marked this pull request as ready for review April 7, 2026 20:30
Copy link
Copy Markdown
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me and the accessibility contrast is better as well 👍

I noticed one thing while testing: I think the dark mode onboarding screen looks slightly too grey compared to the light mode:

Image Image

I will open a separate issue to handle this though so that we are not blocking these changes.

@katinthehatsite
Copy link
Copy Markdown
Contributor

One sidenote: we should double-check how these new animations look on Windows. They look great to me on macOS but I am not sure the effect is the same on Windows.

@wojtekn
Copy link
Copy Markdown
Contributor

wojtekn commented Apr 9, 2026

On Mac, animation works, but the window gets unnecessary scrollbars on the smallest view:

CleanShot 2026-04-09 at 13 52 57

@wojtekn
Copy link
Copy Markdown
Contributor

wojtekn commented Apr 9, 2026

I tested it on Windows - animation works well, but the issue with scrollbars also happens there.

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.

3 participants