Skip to content

feat(groups): fix the results layout and give every link a hover state - #208

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

BIA3IA merged 9 commits into
feat/home-visual-refinementfrom
feat/groups-visual-refinement

Conversation

@viganogabriele

Copy link
Copy Markdown
Contributor

Stacked on #207 (feat/projects-visual-refinement) → … → #199. Part of the page-by-page visual refinement. Figma: landing 2782:5643, wizard 3071:6242, results 3082:8078.

What changes

Results page (/groups/didattica/<school>/<level>/<course>)

  • The general groups were broken. The four groups for the site, school, level and course sat in one flex-wrap row.
    • On desktop their names overlapped the WhatsApp/Telegram buttons.
    • On phones they shrank to four ~70 px columns of clipped text ("PoliNetw – Annun").
    • They now sit one per row, two per row from lg, as in Figma (2 cards side by side).
  • The column narrows from max-w-7xl (1280) to ~1024 px, Figma's list width (~1040 at 1728). Rows of short group names no longer stretch across the screen.
  • Header: a new shared GroupsPageHeader lays out back, centred title and close on a 3-column grid.
    • Before, the title was centred under absolutely positioned buttons, so "Ingegneria Informatica" ran under the close button on phones.
    • The header is reused on the extra page.
  • Section headers: "Gruppi 24/25" and the count pill are a real h2 row with consistent spacing. The magic margins (md:mt-16.25, md:mt-25.75…) are gone.

Group rows (CardCourseGroup, used only on these two pages)

  • Phones: the name and buttons share a row. When the card's content is narrower than 20rem, the name gets its own line and the buttons sit below it.
    • Before, names broke word by word into 3 lines next to four controls.
    • This uses a container query, so the switch depends on the card's width, not the viewport.
  • Text: names use text-balance (no orphan "1" in "Analisi Matematica 1") and wrap-break-word as a safety net. The stacked variant is removed.
  • Hover: the row itself isn't a link, the platform buttons are. Those buttons now darken on hover, the report flags darken to text-primary, and both have a focus ring.

Hover = clickable (R9)

  • Landing cards (Gruppi Didattici / Gruppi Extra) are links and had no hover. They now get the identity hover used by the other link cards.
  • Wizard course rows (CardCourse, always rendered inside a link or button) lighten and nudge their chevron.
  • Focus rings: the wizard links (levels, courses) now have them.

Wizard

  • Phones: the glass panel is transparent and borderless below md, but it kept a 16 px padding. Removing it, plus tighter gaps, lets the step labels fit at 320 px. Before, "TRIENNALE/MAGISTRALE" overflowed into "CORSO".
  • The panel itself is unchanged: it's in Figma.

Landing

Shared changes and their reach

Change Other pages affected
WizardShell: no inner padding below md, tighter header gaps on phones /guides/corso/** (same wizard): checked at 390/1024/1440, same improvement
CardCourse: hover state wizard course step and the "missing link" report dialog; both render it inside a link/button
CardCourseGroup: layout, stacked prop removed only /groups/**

Screenshots

The backend isn't reachable locally, so before and after both use the same temporary local fixture: 60 fake groups, site/school/level/course groups, two cohorts, 12 extra groups. The fixture was never committed.

Results page: 1440, 768, 390, 320
results 1440
results 768
results 390
results 320

Extra groups: 1440, 390
extra 1440
extra 390

Wizard course step at 320 (step labels)
course step 320

Landing, 1440
landing 1440

Hover: idle → hover (landing card, course row, Telegram button)
hover

Verification

  • pnpm check is clean, pnpm build passes and pnpm typecheck exits 0.
  • node --test tests/*.test.mjs: 2/2 pass.
  • I checked these routes in the browser at 320, 390, 768, 1024, 1279, 1280, 1440, 1728 and 1920 px, with no horizontal overflow at any width:
    • /groups
    • /groups/didattica, plus its school, level and course steps
    • /groups/extra
    • /guides/corso and its school step

Trade-offs

  • On phones every group row is taller: name, then buttons. I preferred this to names fragmented into 3 lines next to four controls. It is the same pattern on every row, so the list stays scannable.
  • The list is a little narrower than before on large screens (1024 vs 1280). That is closer to Figma, and the rows were mostly empty space.

Deliberately left out

  • The logo-only header on /groups. Figma shows the full navbar, but feat: connect groups to backend #155 reduced it on purpose: the logo links to https://polinetwork.org and the footer is hidden too. /groups is meant to run standalone in front of the current site, where the beta navigation would lead to unfinished pages. That is a product/deploy decision, not an implementation slip, so I left it.
  • Smaller school illustrations on phones. CardIcon builds responsive size classes at runtime ("md:" + token), so Tailwind never generates them: size={{ base: "sm", md: "md" }} silently loses the md size. That is a CardIcon bug worth its own fix. Until then the school tiles keep their single size.
  • The four controls per row (WhatsApp, flag, Telegram, flag): the report flags are functional, and how they're presented is a design decision.

Housekeeping

The screenshots live on the pr-assets/groups-visual-refinement branch, so this PR's diff stays code-only. Delete the branch 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: ba35745d-efce-4bec-aa48-35d20a3d5ec0

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/projects-visual-refinement branch from 1f01723 to 6984a13 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/projects-visual-refinement branch from 20dfd22 to dfc533d Compare November 2, 2026 14:20
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch 2 times, most recently from 3e42951 to 9db89f4 Compare November 2, 2026 14:32
@BIA3IA
BIA3IA force-pushed the feat/projects-visual-refinement branch from dfc533d to 7e4026d 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/projects-visual-refinement branch from 3601c7e to 99d3f26 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/projects-visual-refinement branch from 99d3f26 to 0d4cc72 Compare November 2, 2026 15:00
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 6a4598a to 0bf0c70 Compare November 2, 2026 15:00
@BIA3IA
BIA3IA force-pushed the feat/projects-visual-refinement branch from 0d4cc72 to 52b7d19 Compare November 2, 2026 15:02
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 0bf0c70 to 41457f1 Compare November 2, 2026 15:02
@BIA3IA
BIA3IA force-pushed the feat/projects-visual-refinement branch from 52b7d19 to f6e1972 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/projects-visual-refinement branch from f6e1972 to c88e866 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/projects-visual-refinement branch from c88e866 to bd6a39e Compare November 2, 2026 15:26
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from c4b3adf to 9a19326 Compare November 2, 2026 15:26
BIA3IA and others added 2 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>
BIA3IA and others added 4 commits November 2, 2026 15:28
- 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.
…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.
@BIA3IA
BIA3IA force-pushed the feat/groups-visual-refinement branch from 9a19326 to a244ebb Compare November 2, 2026 15:28
Base automatically changed from feat/projects-visual-refinement to feat/home-visual-refinement November 2, 2026 15:33
@BIA3IA
BIA3IA merged commit f141722 into feat/home-visual-refinement Nov 2, 2026
2 checks passed
@BIA3IA
BIA3IA deleted the feat/groups-visual-refinement branch November 2, 2026 15:52
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