style(answer): shrink and refine the Sources capsule#678
Conversation
Split the answer "Sources" capsule into an invisible 44px WCAG tap target (sourceCapsuleHit) wrapping a compact visible pill (.source-capsule-face), so the control reads smaller and lighter while preserving the touch size enforced by the UI smoke tests. Reduce icon/chevron to 12px, tighten padding, use an 11px label, and slim the count badge. Hover, expanded, and focus chrome now key off the hit target in globals.css. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QA5WCQ6TZfumiHgu2Pjufp
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe Sources capsule now separates its 44px interactive hit target from the compact visible face. State styling, badge sizing, answer-content composition, reduced-motion behavior, and UI primitive documentation are updated accordingly. ChangesSource capsule hit-target refactor
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Summary
sourceCapsuleHit) wrapping a compact visible pill (sourceCapsule→.source-capsule-face). TheexpectMinTouchTargetUI-smoke assertions still measure a 44px button box; only the visible chrome shrank.:hover/[aria-expanded]/:focus-visibleinglobals.css(@layer components), with the reduced-motion guard updated to match. Border colour is owned in the component layer so the states win without!important.Files:
src/components/ui-primitives.tsx,src/components/clinical-dashboard/answer-content.tsx,src/app/globals.css,docs/redesign/09-ui-primitives-recipes.md.Verification
npm run verify:pr-localnpm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsClinical Governance Preflight
Change is presentational only (sizing/style of the Sources disclosure button); it does not alter ingestion, retrieval, answer generation, source data, metadata, or governance behaviour. The properties below remain unaffected:
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
Accessibility
UI Improvements
Documentation