Skip to content

Match WC's native pill + fix stat card alignment with subvalue#27

Merged
pierorocca merged 1 commit into
mainfrom
fix/wc-pill-native-look-and-stat-alignment
Apr 19, 2026
Merged

Match WC's native pill + fix stat card alignment with subvalue#27
pierorocca merged 1 commit into
mainfrom
fix/wc-pill-native-look-and-stat-alignment

Conversation

@pierorocca
Copy link
Copy Markdown
Collaborator

Summary

Two small UX fixes after real-order testing surfaced them:

  1. StatusPill now matches wc-admin's native .order-status look. Rounded rectangle (4px not 12px), bigger vertical padding, subtle bottom-border depth cue, title attribute for native hover tooltip, and — importantly — corrected the Processing color from blue-gray to green. The pre-fix version made Processing and Completed look identical, which is wrong: in WC's palette Processing is green, Completed is the blue-gray.
  2. StatCard subvalue inline with the big number instead of stacked below. Flex row + baseline alignment puts "1" and "10% of total" on the same baseline, side by side. Without this the AI Orders card was visually taller than the three subvalue-less cards, shifting its big number up and breaking the four-across horizontal alignment.

Before / After

StatusPill

Shape Processing color Tooltip
Before oval (12px radius), 12px font weight 500 blue-gray (wrong — same as Completed) none
After rounded rect (4px radius), 13px font weight 400, line-height 2.5em, padding 0 1em, subtle border-bottom green #c6e1c6 / #5b841b (matches WC native) title={label}

Element is now <mark> with className="order-status status-{key}" so if wc-admin's CSS ever loads later, it'd layer idempotently.

StatCard

Before: value stacked above subvalue stacked above label — three rows.
After: value + subvalue share one flex row (baseline-aligned, gap 6px), label underneath — two rows.

Test plan

  • 42 Jest tests pass
  • ESLint clean
  • Build + postbuild emits ai-syndication-settings.css
  • Manual: Overview tab → the AI ORDERS and AI REVENUE stat cards' big numbers are on the same horizontal line as the PRODUCTS EXPOSED and TOTAL ORDERS numbers
  • Manual: the "Processing" pill in Recent AI Orders is green (not blue-gray) and hovering shows a tooltip with the status label
  • Manual: pill shape matches what you see on the native Orders list

Ships as

Merged to main, not tagged. Queue now 7 PRs past v1.6.7.

🤖 Generated with Claude Code

Two small UX fixes after testing with real order data:

1. StatusPill — match wc-admin's native .order-status styling.
   The pre-fix pill used a rounded-oval shape with ~12px radius and
   muted colors. The native WC pill is a rounded rectangle (4px
   radius), bigger vertical padding via line-height, subtle
   rgba(0,0,0,0.05) bottom border, and the exact color palette
   wc-admin ships. Changes:
     - Fixed processing color: was #c8d7e1 (blue-gray, matches
       completed) → #c6e1c6/#5b841b (green, matches native).
       The pre-fix version made every active order look completed.
     - Shape: 4px border-radius (not 12px), line-height: 2.5em,
       padding: 0 1em, borderBottom with the WC depth cue, negative
       vertical margin so the pill doesn't expand row height.
     - Element: <mark> with className="order-status status-{key}"
       so any future load of wc-admin's CSS would layer cleanly
       over our inline styles (idempotent — merchants with wc-admin
       native screens see the same look).
     - title={label} for native hover tooltip, matching WC's
       Orders list accessibility affordance.
     - Font size bumped 12→13px with weight 400, which is the
       native WC value.

2. StatCard — inline subvalue instead of stacking.
   The pre-fix layout stacked the subvalue below the value as a
   separate block, which made the AI Orders card visually taller
   than the three subvalue-less cards next to it. The "1" big
   number shifted upward relative to "4 categories" / "10" / "USD
   55.36", breaking the four-across row alignment.

   Fix: value + subvalue share one flex row with align-items:
   baseline + justify-content: center. The big "1" and the small
   "10% of total" sit on the same baseline, side by side. Every
   card's big number now occupies the same y-coordinate regardless
   of whether it has a subvalue.

Part of the visual-polish pass after DataViews migration; no
test changes needed (both fixes are pure render).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pierorocca pierorocca merged commit a532f79 into main Apr 19, 2026
7 checks passed
@pierorocca pierorocca deleted the fix/wc-pill-native-look-and-stat-alignment branch April 19, 2026 07:34
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