Skip to content

feat: add MatricoleGuides component and related cards#122

Open
BIA3IA wants to merge 9 commits into
mainfrom
bianca/matricole-guide-utility
Open

feat: add MatricoleGuides component and related cards#122
BIA3IA wants to merge 9 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

Caution

Review failed

An error occurred during the review process. Please try again later.

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; CardIcon refactored to derive alignment-specific classes via getAlignmentClasses() and branch to inline rendering path 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: The main PR extends CardIcon with an inline alignment mode that builds on the CardIcon component foundation introduced in PR #50.
  • PoliNetworkOrg/web#102: Both PRs modify CardIcon sizing and layout utilities to support responsive variants and updated class-mapping helpers.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding the MatricoleGuides component and related cards, which aligns with the primary objective of implementing the 'Guide e Utility' section.
Linked Issues check ✅ Passed The PR implements the MatricoleGuides component with supporting card layouts (CardGroup, CardGroupHeader, inline CardIcon alignment) and refactored constants as required by issue #93, based on the provided design image.
Out of Scope Changes check ✅ Passed All changes are within scope: MatricoleGuides component, CardGroup/CardGroupHeader for structured layouts, inline CardIcon alignment support, and refactored constants for matricole resources and guides data.

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


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

1 participant