Skip to content

feat(faqs): open on a non-empty category and tighten the FAQ layout - #211

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

BIA3IA merged 16 commits into
feat/home-visual-refinementfrom
feat/faqs-visual-refinement

Conversation

@viganogabriele

Copy link
Copy Markdown
Contributor

Stacked on #210 (feat/associations-visual-refinement) → … → #199. Draft.

/faqs follows Figma (2334:5376 desktop, 2611:5646 mobile) closely in structure. The problems were in the states the frames don't show and in the spacing around the list.

What changes

An empty first tab no longer blanks the page

  • Live data opens on "Generale", which has no questions, so visitors land on an empty band between the tabs and the callout (the same happens on beta today).
  • The page now opens on the first category that has answers.
  • Empty categories show the dashed empty state already used on /projects and /associations: "Non ci sono ancora domande in questa categoria."
  • Which categories exist, and whether empty ones should be shown at all, stays a content decision. The categories are untouched.

Layout and rhythm

  • The page uses the shared CONTAINER and PAGE_HERO/PAGE_MAIN from layout/page.ts, replacing the old px-4 py-49 with justify-center.
  • The tabs follow the hero closely: 64 px on phones, 96 px from md. They are the hero's content, not a new section, so they don't get the post-hero break. Figma leaves about 100 px.
  • The list column is 900 px, as in Figma; it was 1020.
  • The "Non trovi ciò che stai cercando?" callout sits 64/96 px under the list instead of 272/316 px, so it reads as the list's follow-up.

Phones

  • The tab strip bleeds to both screen edges, as in the Figma mobile frame. Before, it stopped 8 px short of a 16 px gutter.
  • The callout title is 14 px instead of 11 px (label-small), which was too small to read.

Answers

  • Answers are plain text from the backend. They now keep the line breaks the editors typed (whitespace-pre-line).
  • They stop at about 70 characters per line. Before, a 1440 px window gave about 125 characters per line.

Shared changes and their reach

Change Also used by Effect there
AccordionContent: max-w-[70ch], text-pretty /matricole FAQ, /guides Long answers wrap at a readable measure
AccordionTrigger: hover tint on the header only, inset 2 px blue-secondary focus ring same It is the only clickable part; it had no hover and no visible focus
AccordionItem: overflow-hidden so the header tint follows the rounded corners same none at rest
TabsTrigger: white tint on hover for inactive tabs, inset focus ring (resolves the TODO in the file) /storia (boards, thanks) keyboard and hover only
CalloutItem title 14 px on phones only /faqs —

/storia and /guides/generali, before and after at 390 and 1440 px, have identical page heights.

Screenshots

The backend isn't reachable locally, so before and after use the same temporary, uncommitted fixture:

  • the real beta data: "Generale" and "Test2" empty, "Matricole" with 5 questions;
  • one extra "Lezioni" category with longer questions and a two-paragraph answer, to stress wrapping.

1440, default tab (before: the empty "Generale")
default 1440

1440 and 1024, "Lezioni" tab
lezioni 1440
lezioni 1024

390
default 390
lezioni 390

Empty category and tab hover; accordion header hover and keyboard focus
empty
hover focus

Verification

  • pnpm check: clean.
  • pnpm build: passes.
  • pnpm typecheck: clean.
  • node --test tests/*.test.mjs: 3/3 pass.
  • I checked /faqs in the browser at 320, 390, 768, 1024, 1279, 1280, 1440, 1728 and 1920 px; there is no horizontal overflow at any width.

Trade-offs

  • On phones the strip scrolls the active tab into view, so the first tab can be partly hidden when a later one is active. This is the existing behaviour, and the edge fade signals that the strip scrolls.
  • The 70ch measure also applies to /guides accordions, which currently show placeholder content.

Deliberately left out

  • Categories: the backend has "Generale" and "Test2" with no questions, while Figma has Lezioni, Tasse, Esami, Piano di studi and Mobilità. That is content for the association to fill.
  • Large icon category selector: Figma's FaqSelector_Desktop (2962:9615) is an unimplemented design exploration.
  • Search inside FAQs: a product decision.
  • Rich text (links, lists) in answers: the backend returns plain text.

Housekeeping

Screenshots live on pr-assets/faqs-visual-refinement, so this diff stays code-only. That branch 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: 389dfe8a-b63e-4c6f-81ef-24da71fe6df2

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/faqs-visual-refinement branch from f6f3d09 to cf40915 Compare November 2, 2026 13:53
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from 15232a3 to a60acbb Compare November 2, 2026 13:53
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from cf40915 to d29f2c1 Compare November 2, 2026 14:06
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch 2 times, most recently from 4c9461a to 2deef4c Compare November 2, 2026 14:20
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch 2 times, most recently from 08e4f52 to f1d4032 Compare November 2, 2026 14:32
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from 7da2add to e39b2dc Compare November 2, 2026 14:35
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from f1d4032 to 42217ac Compare November 2, 2026 14:35
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from e39b2dc to e1d628d Compare November 2, 2026 14:56
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from 42217ac to aef988e Compare November 2, 2026 14:56
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from e1d628d to e3e2508 Compare November 2, 2026 15:00
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch 2 times, most recently from b8450f6 to 5ce487d Compare November 2, 2026 15:02
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch 2 times, most recently from 52640bf to c83b028 Compare November 2, 2026 15:14
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from 5ce487d to 1e7680c Compare November 2, 2026 15:14
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from c83b028 to 6ac92c4 Compare November 2, 2026 15:19
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from 1e7680c to 568b424 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/associations-visual-refinement branch from 6ac92c4 to ed94238 Compare November 2, 2026 15:26
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from 568b424 to bb2a9f7 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 11 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.
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.
- Associations without a logo show their initials instead of ESN's logo,
  which came from the Figma example; the unused placeholder asset is gone.
- Page on the shared container, hero and rhythm; the list keeps Figma's
  1200px column.
- Accordion: constant padding open or closed (the name no longer jumps),
  description aligned with the name from md and capped at a readable
  measure, names at 20/22/28px instead of 22/45px, smaller logos on phones.
- The clickable header brightens on hover and rings the item on keyboard
  focus; social links get accessible names, 40px targets and rel=noopener;
  "Segui l'associazione" drops its blue gradient and only shows with links.
- Empty or unreachable list: a dashed placeholder like /projects.
- Shared Hero: the title size is capped so its longest word fits the
  content width; "Associazioni" and "Contattaci" overflowed phones and
  tablets. Titles that already fit keep the Figma sizes.
- /about association bodies keep their look on the new accordion padding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This PR sets the title size on Hero's inner span, so /storia's
[&_h2]:typo-display-fluid-extralarge override stopped having any effect.
It is removed, and the description width /storia needs goes through a
new descriptionClassName prop. Hero's comments are cut to the reason
behind the size cap.
- Default to the first category that has answers: live data opens on
  "Generale", which is empty, so the page showed a blank band.
- Empty categories show an intentional dashed empty state instead of
  nothing; answers keep the editors' line breaks.
- Shared container and hero rhythm; the tabs follow the hero closely
  (they are its content, not a new section) and the list column is
  Figma's 900px; the callout sits 64/96px under the list instead of
  272/316px.
- Phones: the tab strip bleeds to the screen edges, the callout title is
  readable (14px instead of 11px).
- Accordion (shared with /matricole and /guides): answers capped at ~70
  characters per line, only the header reacts to hover, 2px focus ring.
- Tabs (shared with /storia): hover tint on inactive tabs, focus ring.

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

- The active tab's background was an opaque span drawn over the trigger,
  so it covered the inset focus ring exactly when Radix focuses that tab.
  The trigger now takes the background itself.
- With a single category the tab strip is not shown: it was a full-bleed
  band holding one pill.
- The page uses PAGE_HERO_TOP, the FAQ column is one wrapper instead of
  two, and ItemTitle's default size is the one its only caller needed.
@BIA3IA
BIA3IA force-pushed the feat/faqs-visual-refinement branch from bb2a9f7 to bc1dc7f Compare November 2, 2026 15:28
@BIA3IA
BIA3IA force-pushed the feat/associations-visual-refinement branch from ed94238 to 0c68c21 Compare November 2, 2026 15:28
Base automatically changed from feat/associations-visual-refinement to feat/home-visual-refinement November 2, 2026 15:58
@BIA3IA
BIA3IA merged commit 4584cfe into feat/home-visual-refinement Nov 2, 2026
3 checks passed
@BIA3IA
BIA3IA deleted the feat/faqs-visual-refinement branch November 2, 2026 16:03
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