From a4c2ab226a63d9261ab299b400eb469ad2507f1b Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Thu, 5 Nov 2026 16:12:28 -0300 Subject: [PATCH] =?UTF-8?q?fix(site):=20limita=20o=20t=C3=ADtulo=20do=20bo?= =?UTF-8?q?ard=20e=20remove=20text-balance=20dos=20cards=20(S47)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O card em destaque perdeu o line-clamp-3 na reescrita da S47: com o feed do Instagram na frente, a legenda inteira (889 caracteres no caso real) era renderizada a 31px e esticava o board. Restaura o clamp de 3 linhas no destaque, mantém o clamp do compacto, troca text-balance por break-words (balance quebra o line-clamp em alguns browsers) e adiciona min-w-0 às colunas do grid. O e2e passa a pinar o clamp do card em destaque, não só o do compacto. --- src/components/CampaignContentCard.tsx | 6 +++--- src/components/CampaignContentSection.tsx | 4 ++-- tests/e2e/frontend.e2e.spec.ts | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/CampaignContentCard.tsx b/src/components/CampaignContentCard.tsx index f39af49d..30a1628f 100644 --- a/src/components/CampaignContentCard.tsx +++ b/src/components/CampaignContentCard.tsx @@ -59,7 +59,7 @@ export const CampaignContentCard = ({ card, variant = 'compact' }: CampaignConte ) : null}

{card.meta}

-

+

{card.title}

{card.subtitle ? ( @@ -74,7 +74,7 @@ export const CampaignContentCard = ({ card, variant = 'compact' }: CampaignConte ) : ( <>

{card.meta}

-

+

{card.title}

@@ -84,7 +84,7 @@ export const CampaignContentCard = ({ card, variant = 'compact' }: CampaignConte ) return ( -

+
{card.external ? ( { {featured ? (
-
+
-
+
{rest.map((card) => (
diff --git a/tests/e2e/frontend.e2e.spec.ts b/tests/e2e/frontend.e2e.spec.ts index ebf23983..25096c6d 100644 --- a/tests/e2e/frontend.e2e.spec.ts +++ b/tests/e2e/frontend.e2e.spec.ts @@ -666,7 +666,11 @@ test.describe('Campaign home content section', () => { // Long captions are clamped with an ellipsis so a single post cannot // stretch the bento row (production captions run into hundreds of - // characters; the stub's reel caption is deliberately long). + // characters; the stub's reel caption is deliberately long). The + // featured title must clamp too — it is the lead of the board and the + // one that renders at the largest type size. + await expect(featured.locator('h3')).toHaveCSS('-webkit-line-clamp', '3') + await expect(featured.locator('h3')).toHaveCSS('overflow', 'hidden') const longCaptionTitle = section .getByRole('link', { name: /E2e Reel da caravana/ }) .locator('h3')