From 8d0d968e9b37e35b17fb661fa8ed294a08de6d66 Mon Sep 17 00:00:00 2001 From: Morn Date: Mon, 9 Jun 2025 12:55:22 +0800 Subject: [PATCH] fix: remove bold style of head mention node in notification center (#8034) * fix: allow the whole embed link clickable * fix: remove bold style of head mention node in notification center --- .../notifications/widgets/shared.dart | 5 +- .../link_embed_block_component.dart | 46 ++++++++----------- 2 files changed, 20 insertions(+), 31 deletions(-) diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/notifications/widgets/shared.dart b/frontend/appflowy_flutter/lib/mobile/presentation/notifications/widgets/shared.dart index 32b00224e0..7488c84af7 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/notifications/widgets/shared.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/notifications/widgets/shared.dart @@ -341,10 +341,7 @@ class NotificationDocumentContent extends StatelessWidget { .orDefault( context.read().state.font, ); - return styleCustomizer.baseTextStyle( - fontFamily, - fontWeight: FontWeight.w600, - ); + return styleCustomizer.baseTextStyle(fontFamily); }, ); blockBuilders[HeadingBlockKeys.type] = newHeadingBuilder; diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart index 6424aefb16..9cf37673ef 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/link_embed/link_embed_block_component.dart @@ -189,33 +189,25 @@ class LinkEmbedBlockComponentState Widget buildContent(BuildContext context) { final theme = AppFlowyTheme.of(context), textScheme = theme.textColorScheme; final hasSiteName = linkInfo.siteName?.isNotEmpty ?? false; - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Expanded( - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: !UniversalPlatform.isMobile - ? null - : () => - afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), - child: ClipRRect( - borderRadius: - const BorderRadius.vertical(top: Radius.circular(16)), - child: FlowyNetworkImage( - url: linkInfo.imageUrl ?? '', - width: MediaQuery.of(context).size.width, + return MouseRegion( + cursor: SystemMouseCursors.click, + child: GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: ClipRRect( + borderRadius: + const BorderRadius.vertical(top: Radius.circular(16)), + child: FlowyNetworkImage( + url: linkInfo.imageUrl ?? '', + width: MediaQuery.of(context).size.width, + ), ), ), - ), - ), - MouseRegion( - cursor: SystemMouseCursors.click, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () => - afLaunchUrlString(url, addingHttpSchemeWhenFailed: true), - child: Container( + Container( height: 64, padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 20), child: Row( @@ -256,9 +248,9 @@ class LinkEmbedBlockComponentState ], ), ), - ), + ], ), - ], + ), ); }