Skip to content

feat(ui): add InfoCardRow component#1449

Closed
michaelassraf wants to merge 8 commits into
mainfrom
feature/info-card-row
Closed

feat(ui): add InfoCardRow component#1449
michaelassraf wants to merge 8 commits into
mainfrom
feature/info-card-row

Conversation

@michaelassraf

@michaelassraf michaelassraf commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new InfoCardRow UI component to openframe-frontend-core — a responsive row layout for grouping info cards, with Storybook coverage.

Changes

  • components/ui/info-card-row.tsx — new InfoCardRow component with responsive layout
  • stories/InfoCardRow.stories.tsx — Storybook examples
  • components/ui/index.ts — export the new component from the UI barrel
  • Fix: prevent InfoCardRow from shrinking inside flex containers

Consumer

Consumed by the hub feat/hero branch (PR flamingo-stack/multi-platform-hub#793) in hero-ease-of-use-demo.tsx. This lib PR must merge + release before the hub build can resolve the InfoCardRow export.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Introduced a responsive information card row to present a lead item alongside two key statistics.
    • Added support for optional icons and responsive icon placement for mobile vs. desktop, with constrained/truncated text for consistent layout.
  • Documentation
    • Added Storybook examples for the new component, including variants with icons and without icons.
  • Enhancements
    • Expanded reusable chat mapping utilities for easier host-level integration.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 723243b8-47ed-436d-a81f-352b4c5fdec8

📥 Commits

Reviewing files that changed from the base of the PR and between eace034 and dfcb1a7.

📒 Files selected for processing (1)
  • openframe-frontend-core/src/components/chat/hooks/use-nats-chat-adapter.ts

📝 Walkthrough

Walkthrough

Adds a responsive InfoCardRow component with typed lead and statistic sections, exports it from the UI barrel, provides Storybook examples for icon and text-only variants, and exports mapProcessedToUnified for host reuse.

Changes

InfoCardRow component

Layer / File(s) Summary
Component contract and responsive rendering
openframe-frontend-core/src/components/ui/info-card-row.tsx, openframe-frontend-core/src/components/ui/index.ts
Defines typed props, renders the lead and two statistic cells with responsive icon placement and text truncation, and re-exports the component.
Storybook configuration and variants
openframe-frontend-core/src/stories/InfoCardRow.stories.tsx
Configures the Storybook entry and adds populated and icon-free story variants.

Chat mapper host export

Layer / File(s) Summary
Expose processed message mapper
openframe-frontend-core/src/components/chat/hooks/use-nats-chat-adapter.ts
Exports mapProcessedToUnified and documents that hosts re-attach identity fields after segment and content transformation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the InfoCardRow UI component.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/info-card-row

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
openframe-frontend-core/src/stories/InfoCardRow.stories.tsx (1)

8-10: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Avoid raw hex colors in styling.

As per coding guidelines, raw hex colors are not allowed. Even for a stand-in Storybook placeholder, consider using an ODS token utility class (like bg-ods-border) instead of hardcoding raw hex values in inline styles.

♻️ Proposed refactor
 const companyLogo = (
-  <div className="size-full" style={{ background: 'linear-gradient(135deg, `#5EFAF0`, `#F357BB`)' }} />
+  <div className="size-full bg-ods-border" />
 )
🤖 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 `@openframe-frontend-core/src/stories/InfoCardRow.stories.tsx` around lines 8 -
10, Replace the raw hex gradient in the companyLogo placeholder with an approved
ODS token utility class such as bg-ods-border, removing the inline color style
while preserving the existing full-size placeholder container.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@openframe-frontend-core/src/stories/InfoCardRow.stories.tsx`:
- Around line 8-10: Replace the raw hex gradient in the companyLogo placeholder
with an approved ODS token utility class such as bg-ods-border, removing the
inline color style while preserving the existing full-size placeholder
container.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 57fae13d-58c5-4f59-bb78-58ad56f246a6

📥 Commits

Reviewing files that changed from the base of the PR and between 43c5cc8 and eace034.

📒 Files selected for processing (3)
  • openframe-frontend-core/src/components/ui/index.ts
  • openframe-frontend-core/src/components/ui/info-card-row.tsx
  • openframe-frontend-core/src/stories/InfoCardRow.stories.tsx

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.

2 participants