From 4de284a7f4fc73da51ed1faed82f54f20585168b Mon Sep 17 00:00:00 2001 From: Yusef Habib Fernandez Date: Fri, 22 May 2026 11:48:40 +0200 Subject: [PATCH 1/2] fix(tooltip): use text-pretty instead of text-balance `text-balance` (CSS `text-wrap: balance`) tries to make every line of the tooltip roughly the same width. That works well for short, headline style tooltips but leaves visible whitespace on the right for any multi-sentence tooltip, because the balanced break points often fall before the `max-w-64` ceiling. `text-pretty` keeps the widow/orphan protection users expect from paragraph-style text while letting lines fill toward the container width. Short single-line tooltips are unaffected; longer ones now use the full available width. --- src/governance-app-frontend/src/common/components/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/governance-app-frontend/src/common/components/Tooltip.tsx b/src/governance-app-frontend/src/common/components/Tooltip.tsx index 834a890fc..e75080f60 100644 --- a/src/governance-app-frontend/src/common/components/Tooltip.tsx +++ b/src/governance-app-frontend/src/common/components/Tooltip.tsx @@ -40,7 +40,7 @@ function TooltipContent({ data-slot="tooltip-content" sideOffset={sideOffset} className={cn( - 'z-50 max-w-64 origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', + 'z-50 max-w-64 origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-pretty text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', className, )} {...props} From 7ad0ef26c9e32b5e21f80aaa868df5a4d6b80e07 Mon Sep 17 00:00:00 2001 From: Yusef Habib Fernandez Date: Mon, 25 May 2026 21:31:49 +0200 Subject: [PATCH 2/2] clean up --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index b18c10f2d..cf2f32c18 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/dfinity/governance-app/build.yaml?logo=github&label=Build%20and%20test)](https://github.com/dfinity/governance-app/actions/workflows/build.yaml) [![Chat on Discord](https://img.shields.io/badge/chat-Discord-lightgrey?logo=Discord&style=flat-square)](https://discord.internetcomputer.org) - ---