Skip to content

feat(matricole): align Matricole with the shared layout; fix CardIcon responsive sizes - #209

Merged
BIA3IA merged 13 commits into
feat/home-visual-refinementfrom
feat/matricole-visual-refinement
Nov 2, 2026
Merged

BIA3IA merged 13 commits into
feat/home-visual-refinementfrom
feat/matricole-visual-refinement

Conversation

@viganogabriele

Copy link
Copy Markdown
Contributor

Stacked on #208 (/groups) → … → #199 (homepage). Merge in order. Two commits: a shared CardIcon fix and the /matricole page.

Figma: desktop 3222:8274, mobile 3351:13333. The page was already faithful to Figma on desktop. This PR brings it onto the layout the other redesigned pages share, and fixes the widths Figma doesn't cover.

1. fix(card-icon): responsive sizes were never generated

CardIcon accepts a responsive size ({ base, sm, md, lg }). The prefixed classes (sm:px-8, lg:h-44…) were built at runtime in card-icon/utils.ts. Tailwind never saw them in the source, so any variant not written literally elsewhere was silently missing.

  • Fix: globals.css generates every prefixed variant of the classes.ts maps with @source inline("{sm:,md:,lg:}{…}"). The runtime API is unchanged.
  • Guard: tests/card-icon-classes.test.mjs fails if classes.ts gains a class that is missing from that list.
  • Reach: only two call sites use responsive sizes.
  • Regression check: /, /storia, /groups and /guides at 390, 768 and 1440 px have identical page heights.

2. feat(matricole)

Layout

  • Shared layout: hero, sections and FAQ use CONTAINER, PAGE_HERO, PAGE_MAIN and SECTION_TITLE from layout/page.ts, like the other redesigned pages. The hero uses the shared Hero.
  • Featured resources (Graduatorie, TOL) close the hero, so the hero's extra bottom air is dropped.

Headings

  • "Guide e Utility" is a real section title. It was 22 px on phones, smaller than the "Telegram Hub" card title inside it.
  • The title now sits closer to its own content than to the cards above. Before, both gaps were about 52 px.

Cards and grids

  • Large resource cards: the description cap goes from 240 px to 448 px, so one-sentence descriptions take one or two lines instead of four narrow ones in a card three times as wide.
  • Guides grid:
    • The large guide sits beside the 2×2 small guides only from xl, on a 5/7 split. At 1:1 "Mappa Microonde" wrapped at 1280–1440 px.
    • The four small guides use the 20 px inline title (inline-sm).
    • The Materiali / Tech Tools row repeats the 5/7 split, so the columns line up.
    • Below xl the large guide spans the width, with the small ones in 2×2 underneath.
  • Telegram Hub:
    • Two columns until xl; four columns clipped "Mercatino" and wrapped "Consigli PC" at 1024 px.
    • On phones the group has 24 px padding instead of 48. Its links now span the width, as in the Figma mobile frame, instead of a 244 px column.
    • CardGroup is only used on this page.

Interaction

  • Resources with a link get the card hover; the others (e.g. "Mappa Microonde", which has no URL) don't.

Content source

/matricole reads from web.freshman.getContent (#193), which isn't reachable locally.

Screenshots

1440
1280
1024
768
390

Backend unavailable (real state, no fixture):

unavailable

Verification

  • pnpm check: clean.
  • pnpm build: passes.
  • pnpm typecheck: passes.
  • node --test tests/*.test.mjs: 3/3 pass, including the new test.
  • Checked in the browser at 320, 390, 768, 1024, 1279, 1280, 1440, 1728 and 1920 px, with no horizontal overflow.

Trade-offs

  • The layout changes form at 1280 px (stacked → side by side), as on the other pages.
  • Small guide titles are 20 px, 2 px smaller than the Telegram links.
  • The 5/7 split makes the large guide narrower than the featured cards above it. The featured pair stays 1:1, separated by the section gap and title.

Deliberately left out

  • Mobile omissions. Featured resources, "Guida della matricola" and "Materiali" are hidden on phones, exactly as in the Figma mobile frame. That omission is an open designer decision ("redo Matricole mobile"), so the mobile design is unchanged.
  • Heading level. The hero title is now an h2 via the shared Hero, like every other page, because the header logo is the h1 site-wide. Fixing the heading outline is a separate cross-page change.

Housekeeping

Screenshots live on pr-assets/matricole-visual-refinement, which can be deleted after review.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 935d415b-1bc9-4daf-b913-a7edb7310eb5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@viganogabriele
viganogabriele marked this pull request as ready for review October 31, 2026 17:54
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from b859f83 to f7872c6 Compare November 2, 2026 13:53
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch from 1d50352 to 6917b00 Compare November 2, 2026 13:53
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from f7872c6 to ff597b7 Compare November 2, 2026 14:06
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch 2 times, most recently from 3e84d00 to ca0ab5c Compare November 2, 2026 14:20
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 3e42951 to 9db89f4 Compare November 2, 2026 14:32
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch from ca0ab5c to 30dbd99 Compare November 2, 2026 14:32
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 9db89f4 to d0bcd46 Compare November 2, 2026 14:35
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch 2 times, most recently from 00e2654 to aa7f521 Compare November 2, 2026 14:56
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from d0bcd46 to 6a4598a Compare November 2, 2026 14:56
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch 3 times, most recently from 9704412 to 4cd1a9a Compare November 2, 2026 15:14
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch 2 times, most recently from 31c7bd3 to c4b3adf Compare November 2, 2026 15:18
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch from 4cd1a9a to 9c83b71 Compare November 2, 2026 15:19
viganogabriele and others added 3 commits November 2, 2026 15:25
…rd grid

- Page uses the shared container, title/lead styles and vertical rhythm of
  the other redesigned pages instead of ad-hoc paddings and a 1616px
  breakpoint.
- Email cards: four in a row from xl as in Figma, 2×2 below, one column on
  phones, so a card is never left alone on a row; cards size to content
  instead of the fixed 264×312 box.
- "Trova il tuo gruppo" had no action: it now links to /groups, like the
  inline link in the same paragraph.
- Group photo keeps Figma's crop next to the text from xl and is capped
  when stacked; text is left-aligned at every width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The group photo is 512x246: it was declared 721x342 and stretched up to
  768px wide. It now shows at its real size at most.
- "Candidature" linked to /join with the label "Struttura"; the label now
  matches the page it opens.
- The inline links use INLINE_LINK, with a visible focus ring.
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from c4b3adf to 9a19326 Compare November 2, 2026 15:26
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch from 9c83b71 to 7df8918 Compare November 2, 2026 15:26
BIA3IA and others added 3 commits November 2, 2026 15:28
…search

- One ProjectCard for the three lists: the project's logo replaces Figma's
  placeholder icons (crop / upload), the title gets a per-line gradient, and
  the footer says what the project page offers (web app or source code).
- One ProjectList: cards in a min/max-bounded auto-fill grid instead of
  fixed 312x264 boxes at fixed breakpoints; on phones a carousel with the
  next card peeking in.
- The collection search box now filters by name and description (it had no
  handler), with an explicit "no match" state.
- Empty lists render a dashed placeholder that points to "Hai un'idea?".
- "Hai un'idea?" sits as text + two reference cards side by side, with a
  readable lead and a real mailto link.
- /projects and /projects/[id] use the shared container, titles and
  rhythm; the detail page drops its gradient panels and closes on the
  background like the other pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ProjectCard is now a CardCaption with a logo, a clamped caption and
  a footer, instead of a second copy of its link, hover, focus and
  footer logic. CardCaption gains `image`, `titleClassName` and
  `captionClassName` for it.
- The search looks through every project on the page, novelties and
  deprecated ones included, matches each word separately and announces
  the number of results.
- PeekCarousel replaces the two copies of the phone carousel (homepage
  and project lists).
- SECTION_STACK moves to layout/page and also serves /about.
- t.me links are labelled Telegram, not Web.
- The project page shows no placeholder icon when there is no logo, and
  "Hai un'idea?" sits on the container's left edge like the other
  sections.
- Long search queries wrap inside the empty state.
BIA3IA and others added 6 commits November 2, 2026 15:28
…with any project

CardCaption draws its title gradient per line, as ProjectCard did before
it moved onto CardCaption: a wrapped title no longer fades on its second
line. The search box shows whenever the page has projects to search,
not only when the collection itself has some.
- Results and extra pages: one ~1024px column (Figma's list width) with a
  shared header component (back, centred title, close) laid out on a
  three-column grid, so long course names no longer run under the buttons
  on phones.
- The general groups (site, school, level, course) were squeezed four per
  row with their names overlapping the platform buttons; they now sit one
  per row, two per row from lg, as in Figma.
- Group rows: name and buttons share a row; when the card is narrower than
  20rem the name gets its own line instead of breaking word by word. The
  `stacked` variant is gone.
- Hover only where there is a link: the platform buttons darken, the report
  flags darken, course rows lighten and nudge their chevron, the landing
  cards get the identity hover. Keyboard focus rings on all of them.
- Wizard: no wasted 16px inset on phones, where the glass panel is
  invisible, so the step labels fit at 320px.
- Landing title uses the fluid display size and is the page's h1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…offline

- The four actions in a group row are 6px apart on phones too: 2px left
  the WhatsApp link and its report flag too easy to mistake.
- The general groups get a visually hidden heading, so the outline no
  longer jumps from h1 to h3.
- getVisibleGroups returns an empty list when the backend fails, like
  the other queries, so /groups/extra shows its empty state instead of
  a 500.
CardIcon's responsive `size` ({ base, sm, md, lg }) builds "sm:…" classes at
runtime, so Tailwind never generated the ones not written literally elsewhere
(e.g. sm:px-8 for the homepage material shortcuts). Generate every prefixed
variant of the size maps with @source inline(), and add a test that fails if
classes.ts gains a class missing from that list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rids

- Hero, sections and FAQ use the shared container, hero offset, rhythm and
  section titles; the featured resources close the hero.
- "Guide e Utility" is a section title (it was 22px on phones, smaller than
  the Telegram Hub card title) and sits closer to its own content.
- Large resource cards: descriptions capped at 448px instead of 240px.
- The large guide sits beside the 2x2 small guides only from xl, on a 5/7
  split repeated by Materiali / Tech Tools, so "Mappa Microonde" no longer
  wraps; the four small guides use 20px titles.
- Telegram Hub: two columns until xl (four columns clipped "Mercatino" at
  1024px); the group has 24px padding on phones instead of 48px, so its
  links span the width as in the Figma mobile frame.
- Resources with a link react to hover, the others don't.
- Resources hidden on phones stay hidden: that's the Figma mobile frame,
  an open design decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The school tiles of the groups wizard use the sm size on phones, now
  that responsive CardIcon sizes are generated: at 320px they were about
  400px tall each.
- Materiali and Tech Tools sit side by side from lg: below xl the
  full-width card left half its width empty.
- CardIcon's hover defaults to whether the card has an href, so callers
  no longer repeat Boolean(href).
- The intro uses PAGE_HERO_TOP instead of cancelling PAGE_HERO's bottom
  padding at every breakpoint.
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 9a19326 to a244ebb Compare November 2, 2026 15:28
@BIA3IA
BIA3IA force-pushed the feat/matricole-visual-refinement branch from 7df8918 to 56a596e Compare November 2, 2026 15:28
Base automatically changed from feat/groups-visual-refinement to feat/home-visual-refinement November 2, 2026 15:52
@BIA3IA
BIA3IA merged commit f24f8c7 into feat/home-visual-refinement Nov 2, 2026
2 checks passed
@BIA3IA
BIA3IA deleted the feat/matricole-visual-refinement branch November 2, 2026 15:54
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