Skip to content

feat: add MatricoleGuides component and related cards#122

Merged
toto04 merged 10 commits into
mainfrom
bianca/matricole-guide-utility
Jun 2, 2026
Merged

feat: add MatricoleGuides component and related cards#122
toto04 merged 10 commits into
mainfrom
bianca/matricole-guide-utility

Conversation

@BIA3IA
Copy link
Copy Markdown
Contributor

@BIA3IA BIA3IA commented May 28, 2026

Closes #93

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8087ea35-ac4c-4ec0-ba65-72105479cfc8

📥 Commits

Reviewing files that changed from the base of the PR and between f2d79d5 and da04ca1.

📒 Files selected for processing (2)
  • src/components/card-icon/inline-card-media.tsx
  • src/components/matricole/constants.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/card-icon/inline-card-media.tsx
  • src/components/matricole/constants.ts

Walkthrough

This PR implements the Matricole "Guide e Utility" section by introducing a reusable CardGroup component system, extending CardIcon with inline layout support, centralizing section content into a constants module, building the MatricoleGuides component, and refactoring existing matricole components to consume shared data.

Changes

Matricole Guide e Utility Feature

Layer / File(s) Summary
CardGroup Component System
src/components/card-group/types.ts, src/components/card-group/header.tsx, src/components/card-group/index.tsx
New reusable CardGroup wrapper component with CardGroupHeader subcomponent; supports optional icon, required title, optional description, and horizontal or vertical layout modes via props.
CardIcon Inline Alignment Support
src/components/card-icon/types.ts, src/components/card-icon/classes.ts, src/components/card-icon/inline-card-media.tsx, src/components/card-icon/utils.ts, src/components/card-icon/index.tsx
CardAlign type extended with "inline" mode; class constants updated with inline sizing variants; new InlineCardMedia component renders icon and title in a flex row; getAlignmentClasses() and getInlineContainerClasses() helpers added; CardIcon refactored to branch to inline rendering when align === "inline".
Matricole Content Constants
src/components/matricole/constants.ts
Centralized data structure exports resources, guides, hub, materiali, techTools section descriptors and accordionItems FAQ array, each with icon references and metadata.
MatricoleGuides Component
src/components/matricole/guides.tsx
New component renders responsive "Guide e Utility" section; uses CardGroup for hub and techTools sections, maps over guides.slice(1) for additional guide cards, and includes mobile-hidden cards for guides[0] and materiali.
Existing Matricole Components Refactoring
src/components/matricole/intro.tsx, src/components/matricole/faqs.tsx
MatricoleIntro and FAQsPage refactored to import resources and accordionItems from ./constants instead of defining inline; responsive grid layout updated from md: breakpoint to sm:; vertical spacing classes adjusted in both components.
MatricolePage Integration
src/app/matricole/page.tsx
MatricolePage imports and renders <MatricoleGuides /> between MatricoleIntro and FAQsPage.

Possibly related PRs

  • PoliNetworkOrg/web#111: Both PRs modify the /matricole page composition in src/app/matricole/page.tsx to render the page components together.
  • PoliNetworkOrg/web#50: Related CardIcon work that this PR extends with the inline alignment mode and layout utilities.
  • PoliNetworkOrg/web#102: Related modifications to CardIcon sizing and class mappings that this PR further builds upon.

Suggested labels

priority: high

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive Issue #93 provides only a visual design without explicit coding requirements, making it impossible to validate whether implementation meets specific functional or technical criteria. Consider adding explicit acceptance criteria and coding requirements to issue #93 to enable comprehensive validation of implementation against stated objectives.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a new MatricoleGuides component and its related card subcomponents, which aligns with the file changes shown in the summary.
Out of Scope Changes check ✅ Passed The PR includes updates to icon sizing classes, alignment utilities, and type definitions that support the new MatricoleGuides component and card variants, all directly related to the feature implementation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 and usage tips.

@BIA3IA BIA3IA marked this pull request as ready for review May 28, 2026 13:51
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/card-icon/inline-card-media.tsx`:
- Line 4: InlineCardMedia is using getIconSizeClasses for the icon but the
inline container uses getInlineContainerClasses, causing the icon (size="md") to
overflow when align="inline"; update InlineCardMedia so when props.align ===
"inline" it derives the icon size/class from getInlineContainerClasses (or use a
dedicated inline-size map) instead of getIconSizeClasses, and ensure both the
container and the <svg>/<Icon> use the same computed className so the icon
scales to the inline container.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 788e6e84-1a16-4a77-81a2-d51fa7cdaa25

📥 Commits

Reviewing files that changed from the base of the PR and between 1080199 and f2d79d5.

📒 Files selected for processing (13)
  • src/app/matricole/page.tsx
  • src/components/card-group/header.tsx
  • src/components/card-group/index.tsx
  • src/components/card-group/types.ts
  • src/components/card-icon/classes.ts
  • src/components/card-icon/index.tsx
  • src/components/card-icon/inline-card-media.tsx
  • src/components/card-icon/types.ts
  • src/components/card-icon/utils.ts
  • src/components/matricole/constants.ts
  • src/components/matricole/faqs.tsx
  • src/components/matricole/guides.tsx
  • src/components/matricole/intro.tsx

Comment thread src/components/card-icon/inline-card-media.tsx
@toto04 toto04 merged commit 62f71ad into main Jun 2, 2026
2 checks passed
@toto04 toto04 deleted the bianca/matricole-guide-utility branch June 2, 2026 20:42
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.

Matricole - Guide e Utility

2 participants