feat(favourites): upgrade command library design and responsiveness#801
feat(favourites): upgrade command library design and responsiveness#801BigSimmo wants to merge 4 commits into
Conversation
Presentation-only redesign with responsive layout, source-backed evidence styling, and 44px touch targets. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…mand-library-40ad
…mand-library-40ad
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThe favourites command library adds mobile quick-view navigation, updates mobile card interactions and pinned indicators, and revises desktop table responsiveness with compact columns and source-backed evidence styling. ChangesFavourites responsive UI
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant FavouritesMobileQuickViews
participant FavouritesCommandLibraryPage
User->>FavouritesMobileQuickViews: select quick-view chip
FavouritesMobileQuickViews->>FavouritesCommandLibraryPage: invoke selection handlers
FavouritesCommandLibraryPage->>FavouritesMobileQuickViews: render updated active state and counts
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…mand-library-db17
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/clinical-dashboard/favourites-command-library-page.tsx`:
- Around line 583-589: Update the compact empty-state table rows near the column
definitions and the additional occurrence around the corresponding empty-row
rendering so their colSpan is 5 when compact is true and 6 otherwise. Reuse the
existing compact state and preserve the six-column span for the non-compact
layout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bde60f91-2d10-4c22-a0f9-988b958c7672
📒 Files selected for processing (2)
src/components/clinical-dashboard/favourites-command-library-page.tsxsrc/components/clinical-dashboard/favourites-library-nav.tsx
| // With the item workspace open (only at 2xl), the middle column narrows sharply. | ||
| // Drop the leading icon and the secondary Evidence column there so titles keep | ||
| // room instead of collapsing to a couple of characters. | ||
| const compact = Boolean(selectedItemId); | ||
| const rowIconClass = compact ? "hidden" : "hidden 2xl:grid"; | ||
| const evidenceHeadClass = cn("hidden px-3", compact ? "" : "w-[7rem] 2xl:table-cell"); | ||
| const evidenceCellClass = cn("hidden px-3 align-middle", compact ? "" : "2xl:table-cell"); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use five columns for the compact empty state.
When compact is true, Evidence is hidden at 2xl, but the empty row still uses colSpan={6}, producing an inconsistent table grid.
Proposed fix
- {[
- { colSpan: 5, className: "px-4 py-10 text-center 2xl:hidden" },
- { colSpan: 6, className: "hidden px-4 py-10 text-center 2xl:table-cell" },
- ].map(({ colSpan, className }) => (
+ {(compact
+ ? [{ colSpan: 5, className: "px-4 py-10 text-center" }]
+ : [
+ { colSpan: 5, className: "px-4 py-10 text-center 2xl:hidden" },
+ { colSpan: 6, className: "hidden px-4 py-10 text-center 2xl:table-cell" },
+ ]
+ ).map(({ colSpan, className }) => (Also applies to: 734-737
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/clinical-dashboard/favourites-command-library-page.tsx` around
lines 583 - 589, Update the compact empty-state table rows near the column
definitions and the additional occurrence around the corresponding empty-row
rendering so their colSpan is 5 when compact is true and 6 otherwise. Reuse the
existing compact state and preserve the six-column span for the non-compact
layout.
Summary
Verification
npm run verify:uievidence via hosted UI gates on predecessor heads.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Summary by CodeRabbit