Skip to content

Polish ApiCard loading skeleton to match final card shape (Closes #935) - #974

Open
waterWang wants to merge 2 commits into
CalloraOrg:mainfrom
waterWang:feat/polish-apicard-skeleton-935
Open

Polish ApiCard loading skeleton to match final card shape (Closes #935)#974
waterWang wants to merge 2 commits into
CalloraOrg:mainfrom
waterWang:feat/polish-apicard-skeleton-935

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Polishes ApiCardSkeleton to use CSS variable tokens consistently, matching the final ApiCard component's layout dimensions for minimal layout shift (CLS) on data hydration.

Changes

src/components/ApiCard.tsx — ApiCardSkeleton

  • Header gap: hardcoded 12pxvar(--mkt-space-lg, 12px) (matches final card)
  • Icon dimensions: hardcoded 56×56var(--mkt-card-icon-size, 56px) / var(--mkt-card-icon-radius, 10px)
  • Card body: added api-marketplace-card-body class and minWidth: 0 for layout parity
  • Title row: added flexWrap: 'wrap' for responsive wrapping
  • Description gap: hardcoded 4pxvar(--mkt-card-margin-top-sm, 4px)
  • Price padding-right: hardcoded 36pxvar(--mkt-card-price-padding-right, 36px)
  • Tags gap: hardcoded 8pxvar(--mkt-space-md, 8px)
  • Sparkline section: gap 12pxvar(--mkt-space-lg, 12px), added flexWrap, matched marginTop token
  • Footer action gap: 12pxvar(--mkt-space-lg, 12px)

src/components/ApiCard.test.tsx — New tests

  • Verifies CSS variable tokens are used for header gap, icon size, price padding, title row flexWrap, and sparkline gap

Testing

  • All skeleton tests pass (12/12 in ApiCard skeleton suite)
  • MarketplacePageSkeleton tests pass (4/4)
  • Pre-existing failures (matchMedia mocks) unaffected

Closes #935

GrantFox FWC26 campaign: implement a searchable combobox for filtering
API endpoints by title, URL, method, group, and API name.

- ARIA combobox pattern with listbox (role=combobox / role=listbox / role=option)
- Real-time filtering with relevance scoring
- Full keyboard navigation (ArrowDown/Up, Enter, Escape, Home/End)
- Screen-reader announcements via LiveRegion
- Clear button with accessible label
- 33 focused tests covering filtering, selection, keyboard, a11y, and edge cases
- scrollIntoView mock added to setupTests for jsdom compatibility
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.

Polish ApiCard loading skeleton to match final card shape [b#081]

1 participant