From 0c7db3da7ddb2491eea971e917c9801599c77228 Mon Sep 17 00:00:00 2001 From: David Li Date: Tue, 2 Jun 2026 15:46:04 -0700 Subject: [PATCH] Glasses UI: Hide text overflow in Card. --- src/addons/glasses/ui/Card.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/addons/glasses/ui/Card.ts b/src/addons/glasses/ui/Card.ts index 266fe57f..ef2184f4 100644 --- a/src/addons/glasses/ui/Card.ts +++ b/src/addons/glasses/ui/Card.ts @@ -14,6 +14,7 @@ import {ButtonProperties} from './ButtonProperties'; import {CardActionButton} from './CardActionButton'; import {CardTitleChip} from './CardTitleChip'; +/** Default properties for the Card component. */ export const cardDefaults = { titleChip: undefined as string | undefined, title: undefined as string | undefined, @@ -27,8 +28,10 @@ export const cardDefaults = { ...contentDefaults, }; +/** Properties for the Card component. */ export type CardProperties = typeof cardDefaults & BaseOutProperties; +/** A card component that displays content with title, icon, text, and actions. */ export class Card extends Container { constructor(properties: InProperties) { super( @@ -55,7 +58,7 @@ export class Card extends Container { const borderWidth = 3; const cardContainer = new Container({ flexDirection: 'column', - borderWidth: borderWidth, + borderWidth, borderRadius: 40, borderColor: 0x606460, // For some reason uikit counts padding from the end of the border. @@ -171,6 +174,7 @@ export class Card extends Container { ), flexGrow: 1, whiteSpace: 'pre', + overflow: 'hidden', }); textArea.add(bodyText);