浏览代码

bump version 0.1.5 (#2506)

* chore: bump version 0.1.5

* fix: could not trigger slash menu after inserting an emoji

* Revert "feat: add hover effect on an event card (#2487)"

This reverts commit f0a4b4b77d9e88637dd04a4a2377396b825f2b94.

* feat: add hover effect on an event card

* fix: #2469 duplicated cover
Lucas.Xu 2 年之前
父节点
当前提交
54f757d9b2

+ 1 - 1
.github/workflows/release.yml

@@ -138,7 +138,7 @@ jobs:
         job:
         job:
           - {
           - {
               target: x86_64-apple-darwin,
               target: x86_64-apple-darwin,
-              os: macos-10.15,
+              os: macos-11,
               extra-build-args: "",
               extra-build-args: "",
             }
             }
     steps:
     steps:

+ 1 - 1
frontend/Makefile.toml

@@ -23,7 +23,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
 CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
 CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
 CARGO_MAKE_CRATE_NAME = "dart-ffi"
 CARGO_MAKE_CRATE_NAME = "dart-ffi"
 LIB_NAME = "dart_ffi"
 LIB_NAME = "dart_ffi"
-CURRENT_APP_VERSION = "0.1.4"
+CURRENT_APP_VERSION = "0.1.5"
 FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite"
 FLUTTER_DESKTOP_FEATURES = "dart,rev-sqlite"
 PRODUCT_NAME = "AppFlowy"
 PRODUCT_NAME = "AppFlowy"
 # CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html
 # CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html

+ 19 - 23
frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart

@@ -123,7 +123,6 @@ class CalendarDayCard extends StatelessWidget {
         child: FlowyText.medium(
         child: FlowyText.medium(
           cellData,
           cellData,
           textAlign: TextAlign.left,
           textAlign: TextAlign.left,
-          color: Theme.of(context).colorScheme.onBackground,
           fontSize: 11,
           fontSize: 11,
           maxLines: null, // Enable multiple lines
           maxLines: null, // Enable multiple lines
         ),
         ),
@@ -193,8 +192,12 @@ class CalendarDayCard extends StatelessWidget {
       cardData: event.dateFieldId,
       cardData: event.dateFieldId,
       isEditing: false,
       isEditing: false,
       cellBuilder: cellBuilder,
       cellBuilder: cellBuilder,
-      //Since we already have [showEventDetails] in calendar_day.dart, we don't need to implement it here again.
-      openCard: (_) {},
+      openCard: (context) => showEventDetails(
+        context: context,
+        event: event,
+        viewId: viewId,
+        rowCache: _rowCache,
+      ),
       styleConfiguration: const RowCardStyleConfiguration(
       styleConfiguration: const RowCardStyleConfiguration(
         showAccessory: false,
         showAccessory: false,
         cellPadding: EdgeInsets.zero,
         cellPadding: EdgeInsets.zero,
@@ -204,30 +207,23 @@ class CalendarDayCard extends StatelessWidget {
       onEndEditing: () {},
       onEndEditing: () {},
     );
     );
 
 
-    return InkWell(
-      onTap: () => showEventDetails(
-        context: context,
-        event: event,
-        viewId: viewId,
-        rowCache: _rowCache,
+    return FlowyHover(
+      style: HoverStyle(
+        hoverColor: Theme.of(context).colorScheme.tertiaryContainer,
+        foregroundColorOnHover: Theme.of(context).colorScheme.onBackground,
       ),
       ),
-      child: FlowyHover(
-        style: HoverStyle(
-          hoverColor: Theme.of(context).colorScheme.tertiaryContainer,
-        ),
-        child: Container(
-          padding: const EdgeInsets.symmetric(horizontal: 2),
-          decoration: BoxDecoration(
-            border: Border.fromBorderSide(
-              BorderSide(
-                color: Theme.of(context).dividerColor,
-                width: 1.5,
-              ),
+      child: Container(
+        padding: const EdgeInsets.symmetric(horizontal: 2),
+        decoration: BoxDecoration(
+          border: Border.fromBorderSide(
+            BorderSide(
+              color: Theme.of(context).dividerColor,
+              width: 1.5,
             ),
             ),
-            borderRadius: Corners.s6Border,
           ),
           ),
-          child: card,
+          borderRadius: Corners.s6Border,
         ),
         ),
+        child: card,
       ),
       ),
     );
     );
   }
   }

+ 1 - 0
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart

@@ -141,6 +141,7 @@ class _RowCardState<T> extends State<RowCard<T>> {
                 }
                 }
               },
               },
               openAccessory: _handleOpenAccessory,
               openAccessory: _handleOpenAccessory,
+              openCard: (context) => widget.openCard(context),
               child: _CardContent<T>(
               child: _CardContent<T>(
                 rowNotifier: rowNotifier,
                 rowNotifier: rowNotifier,
                 cellBuilder: widget.cellBuilder,
                 cellBuilder: widget.cellBuilder,

+ 12 - 4
frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart

@@ -8,9 +8,11 @@ class RowCardContainer extends StatelessWidget {
   final Widget child;
   final Widget child;
   final CardAccessoryBuilder? accessoryBuilder;
   final CardAccessoryBuilder? accessoryBuilder;
   final bool Function()? buildAccessoryWhen;
   final bool Function()? buildAccessoryWhen;
+  final void Function(BuildContext) openCard;
   final void Function(AccessoryType) openAccessory;
   final void Function(AccessoryType) openAccessory;
   const RowCardContainer({
   const RowCardContainer({
     required this.child,
     required this.child,
+    required this.openCard,
     required this.openAccessory,
     required this.openAccessory,
     this.accessoryBuilder,
     this.accessoryBuilder,
     this.buildAccessoryWhen,
     this.buildAccessoryWhen,
@@ -40,10 +42,16 @@ class RowCardContainer extends StatelessWidget {
             }
             }
           }
           }
 
 
-          return Container(
-            padding: const EdgeInsets.all(8),
-            constraints: const BoxConstraints(minHeight: 30),
-            child: container,
+          return GestureDetector(
+            behavior: HitTestBehavior.opaque,
+            onTap: () => openCard(context),
+            child: Padding(
+              padding: const EdgeInsets.all(8),
+              child: ConstrainedBox(
+                constraints: const BoxConstraints(minHeight: 30),
+                child: container,
+              ),
+            ),
           );
           );
         },
         },
       ),
       ),

+ 3 - 0
frontend/appflowy_flutter/lib/plugins/document/document_page.dart

@@ -226,6 +226,9 @@ class _AppFlowyEditorPageState extends State<_AppFlowyEditorPage> {
       if (temporaryNodeTypes.contains(node.type)) {
       if (temporaryNodeTypes.contains(node.type)) {
         transaction.deleteNode(node);
         transaction.deleteNode(node);
       }
       }
+      if (kCoverType == node.type && !node.path.equals([0])) {
+        transaction.deleteNode(node);
+      }
     }
     }
     if (transaction.operations.isNotEmpty) {
     if (transaction.operations.isNotEmpty) {
       await editorState.apply(transaction, withUpdateCursor: false);
       await editorState.apply(transaction, withUpdateCursor: false);

+ 23 - 19
frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/emoji_picker/emoji_menu_item.dart

@@ -29,29 +29,32 @@ void _showEmojiSelectionMenu(
   menuService.dismiss();
   menuService.dismiss();
 
 
   _emojiSelectionMenu?.remove();
   _emojiSelectionMenu?.remove();
-  _emojiSelectionMenu = OverlayEntry(builder: (context) {
-    return Positioned(
-      top: alignment == Alignment.bottomLeft ? offset.dy : null,
-      bottom: alignment == Alignment.topLeft ? offset.dy : null,
-      left: offset.dx,
-      child: Material(
-        child: EmojiSelectionMenu(
-          editorState: editorState,
-          onSubmitted: (text) {
-            // insert emoji
-            editorState.insertEmoji(text);
-          },
-          onExit: () {
-            _dismissEmojiSelectionMenu();
-            //close emoji panel
-          },
+  _emojiSelectionMenu = OverlayEntry(
+    builder: (context) {
+      return Positioned(
+        top: alignment == Alignment.bottomLeft ? offset.dy : null,
+        bottom: alignment == Alignment.topLeft ? offset.dy : null,
+        left: offset.dx,
+        child: Material(
+          child: EmojiSelectionMenu(
+            editorState: editorState,
+            onSubmitted: (text) {
+              // insert emoji
+              editorState.insertEmoji(text);
+            },
+            onExit: () {
+              _dismissEmojiSelectionMenu();
+              //close emoji panel
+            },
+          ),
         ),
         ),
-      ),
-    );
-  },);
+      );
+    },
+  );
 
 
   Overlay.of(context).insert(_emojiSelectionMenu!);
   Overlay.of(context).insert(_emojiSelectionMenu!);
 
 
+  _editorState = editorState;
   editorState.service.selectionService.currentSelection
   editorState.service.selectionService.currentSelection
       .addListener(_dismissEmojiSelectionMenu);
       .addListener(_dismissEmojiSelectionMenu);
 }
 }
@@ -62,6 +65,7 @@ void _dismissEmojiSelectionMenu() {
 
 
   _editorState?.service.selectionService.currentSelection
   _editorState?.service.selectionService.currentSelection
       .removeListener(_dismissEmojiSelectionMenu);
       .removeListener(_dismissEmojiSelectionMenu);
+  _editorState?.service.keyboardService?.enable();
   _editorState = null;
   _editorState = null;
 }
 }
 
 

+ 17 - 13
frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/hover.dart

@@ -132,6 +132,21 @@ class FlowyHoverContainer extends StatelessWidget {
       width: style.borderWidth,
       width: style.borderWidth,
     );
     );
 
 
+    final theme = Theme.of(context);
+    final textTheme = theme.textTheme;
+    final iconTheme = theme.iconTheme;
+    // override text's theme with foregroundColorOnHover when it is hovered
+    final hoverTheme = theme.copyWith(
+      textTheme: textTheme.copyWith(
+        bodyMedium: textTheme.bodyMedium?.copyWith(
+          color: style.foregroundColorOnHover ?? theme.colorScheme.onSurface,
+        ),
+      ),
+      iconTheme: iconTheme.copyWith(
+        color: style.foregroundColorOnHover ?? theme.colorScheme.onSurface,
+      ),
+    );
+
     return Container(
     return Container(
       margin: style.contentMargin,
       margin: style.contentMargin,
       decoration: BoxDecoration(
       decoration: BoxDecoration(
@@ -139,19 +154,8 @@ class FlowyHoverContainer extends StatelessWidget {
         color: style.hoverColor ?? Theme.of(context).colorScheme.secondary,
         color: style.hoverColor ?? Theme.of(context).colorScheme.secondary,
         borderRadius: style.borderRadius,
         borderRadius: style.borderRadius,
       ),
       ),
-      child:
-          //override text's theme with foregroundColorOnHover when it is hovered
-          Theme(
-        data: Theme.of(context).copyWith(
-          textTheme: Theme.of(context).textTheme.copyWith(
-                bodyMedium: Theme.of(context).textTheme.bodyMedium?.copyWith(
-                    color: style.foregroundColorOnHover ??
-                        Theme.of(context).colorScheme.onSurface),
-              ),
-          iconTheme: Theme.of(context).iconTheme.copyWith(
-              color: style.foregroundColorOnHover ??
-                  Theme.of(context).colorScheme.onSurface),
-        ),
+      child: Theme(
+        data: hoverTheme,
         child: child,
         child: child,
       ),
       ),
     );
     );

+ 1 - 1
frontend/appflowy_flutter/pubspec.yaml

@@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 0.1.4
+version: 0.1.5
 
 
 environment:
 environment:
   sdk: ">=2.19.0 <3.0.0"
   sdk: ">=2.19.0 <3.0.0"

+ 4 - 2
frontend/scripts/windows_installer/inno_setup_config.iss

@@ -1,6 +1,7 @@
 [Setup]
 [Setup]
 AppName=AppFlowy
 AppName=AppFlowy
 AppVersion={#AppVersion}
 AppVersion={#AppVersion}
+AppPublisher=AppFlowy-IO
 WizardStyle=modern
 WizardStyle=modern
 Compression=lzma2
 Compression=lzma2
 SolidCompression=yes
 SolidCompression=yes
@@ -9,8 +10,8 @@ DefaultGroupName=AppFlowy
 SetupIconFile=flowy_logo.ico
 SetupIconFile=flowy_logo.ico
 UninstallDisplayIcon={app}\AppFlowy.exe
 UninstallDisplayIcon={app}\AppFlowy.exe
 UninstallDisplayName=AppFlowy
 UninstallDisplayName=AppFlowy
-AppPublisher=AppFlowy-IO
 VersionInfoVersion={#AppVersion}
 VersionInfoVersion={#AppVersion}
+UsePreviousAppDir=no
 
 
 [Files]
 [Files]
 Source: "AppFlowy\AppFlowy.exe";DestDir: "{app}";DestName: "AppFlowy.exe"
 Source: "AppFlowy\AppFlowy.exe";DestDir: "{app}";DestName: "AppFlowy.exe"
@@ -18,4 +19,5 @@ Source: "AppFlowy\*";DestDir: "{app}"
 Source: "AppFlowy\data\*";DestDir: "{app}\data\"; Flags: recursesubdirs
 Source: "AppFlowy\data\*";DestDir: "{app}\data\"; Flags: recursesubdirs
 
 
 [Icons]
 [Icons]
-Name: "{group}\AppFlowy";Filename: "{app}\AppFlowy.exe"
+Name: "{userdesktop}\AppFlowy"; Filename: "{app}\AppFlowy.exe"
+Name: "{group}\AppFlowy"; Filename: "{app}\AppFlowy.exe"