From cb0377f9f015e09867da9fc9f29f1ef3df90dec1 Mon Sep 17 00:00:00 2001 From: wgqqqqq Date: Fri, 9 Oct 2026 10:25:05 +0800 Subject: [PATCH 1/2] fix(harmony): make message copy popover compact --- .../pages/components/ChatMessageChrome.ets | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets index bcb3192896..0572ed9e74 100644 --- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets +++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets @@ -266,32 +266,16 @@ export struct AssistantMessageCopyAction { }) } - /** - * The conversation popover's established surface, with the frozen copy menu - * inside it: a section title, then one 48-high row per export scope. - * - * The design's per-entry glyphs are not reproduced. The approved artboard - * carries them as HMSymbol codes with no name recorded, so no established - * asset could be reused; drawing a different one would silently replace a - * frozen element. Device verification owns that gap. - */ + // Keep the three copy scopes compact while preserving 48vp touch targets. @Builder private CopyMenu() { Column() { - Text(RemoteI18n.t('common.copy')) - .width('100%') - .height(28) - .padding({ left: 8, right: 8 }) - .fontSize(MobileDesignTypography.bodySmall.size) - .fontWeight(FontWeight.Medium) - .fontColor(MUTED) - .textAlign(TextAlign.Start) ForEach(AssistantMessageCopyMenuPolicy.items(), (entry: AssistantMessageCopyMenuItem) => { Text(RemoteI18n.t(entry.labelKey)) .width('100%') .height(48) .padding({ left: 8, right: 8 }) - .fontSize(MobileDesignTypography.titleSmall.size) + .fontSize(MobileDesignTypography.bodyMedium.size) .fontColor(INK) .textAlign(TextAlign.Start) .borderRadius(10) @@ -300,8 +284,8 @@ export struct AssistantMessageCopyAction { }) }, (entry: AssistantMessageCopyMenuItem) => entry.action) } - .width(292) - .padding({ left: 12, right: 12, top: 10, bottom: 10 }) + .width(220) + .padding({ left: 8, right: 8, top: 6, bottom: 6 }) .backgroundColor(CARD) .border({ width: 0.5, color: LINE }) .borderRadius(16) From 745f0c1138a35c3e2bd158435c77fc256544e4f5 Mon Sep 17 00:00:00 2001 From: wgqqqqq Date: Fri, 9 Oct 2026 10:28:49 +0800 Subject: [PATCH 2/2] fix(harmony): tighten copy menu spacing further --- .../main/ets/pages/components/ChatMessageChrome.ets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets index 0572ed9e74..45733f490d 100644 --- a/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets +++ b/src/apps/mobile/harmonyos/entry/src/main/ets/pages/components/ChatMessageChrome.ets @@ -266,16 +266,16 @@ export struct AssistantMessageCopyAction { }) } - // Keep the three copy scopes compact while preserving 48vp touch targets. + // Keep the three copy scopes compact while preserving 44vp touch targets. @Builder private CopyMenu() { Column() { ForEach(AssistantMessageCopyMenuPolicy.items(), (entry: AssistantMessageCopyMenuItem) => { Text(RemoteI18n.t(entry.labelKey)) .width('100%') - .height(48) + .height(44) .padding({ left: 8, right: 8 }) - .fontSize(MobileDesignTypography.bodyMedium.size) + .fontSize(MobileDesignTypography.bodySmall.size) .fontColor(INK) .textAlign(TextAlign.Start) .borderRadius(10) @@ -284,8 +284,8 @@ export struct AssistantMessageCopyAction { }) }, (entry: AssistantMessageCopyMenuItem) => entry.action) } - .width(220) - .padding({ left: 8, right: 8, top: 6, bottom: 6 }) + .width(196) + .padding({ left: 8, right: 8, top: 4, bottom: 4 }) .backgroundColor(CARD) .border({ width: 0.5, color: LINE }) .borderRadius(16)