diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b297d0753c..db107bb9b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,7 +138,7 @@ jobs: job: - { target: x86_64-apple-darwin, - os: macos-10.15, + os: macos-11, extra-build-args: "", } steps: diff --git a/frontend/Makefile.toml b/frontend/Makefile.toml index bd1de09b06..114511a554 100644 --- a/frontend/Makefile.toml +++ b/frontend/Makefile.toml @@ -23,7 +23,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true CARGO_MAKE_CRATE_FS_NAME = "dart_ffi" CARGO_MAKE_CRATE_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" PRODUCT_NAME = "AppFlowy" # CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart index a2b40e8757..138e3102f2 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/calendar/presentation/calendar_day.dart @@ -123,7 +123,6 @@ class CalendarDayCard extends StatelessWidget { child: FlowyText.medium( cellData, textAlign: TextAlign.left, - color: Theme.of(context).colorScheme.onBackground, fontSize: 11, maxLines: null, // Enable multiple lines ), @@ -193,8 +192,12 @@ class CalendarDayCard extends StatelessWidget { cardData: event.dateFieldId, isEditing: false, 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( showAccessory: false, cellPadding: EdgeInsets.zero, @@ -204,30 +207,23 @@ class CalendarDayCard extends StatelessWidget { 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, ), ); } diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart index e8c9dc9234..78fa3ce976 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart +++ b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/card.dart @@ -141,6 +141,7 @@ class _RowCardState extends State> { } }, openAccessory: _handleOpenAccessory, + openCard: (context) => widget.openCard(context), child: _CardContent( rowNotifier: rowNotifier, cellBuilder: widget.cellBuilder, diff --git a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart b/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart index b8d8b511a5..a6dab3b113 100644 --- a/frontend/appflowy_flutter/lib/plugins/database_view/widgets/card/container/card_container.dart +++ b/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 CardAccessoryBuilder? accessoryBuilder; final bool Function()? buildAccessoryWhen; + final void Function(BuildContext) openCard; final void Function(AccessoryType) openAccessory; const RowCardContainer({ required this.child, + required this.openCard, required this.openAccessory, this.accessoryBuilder, 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, + ), + ), ); }, ), diff --git a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart index cde164e88f..42ebc314fa 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/document_page.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/document_page.dart @@ -226,6 +226,9 @@ class _AppFlowyEditorPageState extends State<_AppFlowyEditorPage> { if (temporaryNodeTypes.contains(node.type)) { transaction.deleteNode(node); } + if (kCoverType == node.type && !node.path.equals([0])) { + transaction.deleteNode(node); + } } if (transaction.operations.isNotEmpty) { await editorState.apply(transaction, withUpdateCursor: false); diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/emoji_picker/emoji_menu_item.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/emoji_picker/emoji_menu_item.dart index 38043f84a4..59ff0ad82e 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/emoji_picker/emoji_menu_item.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/emoji_picker/emoji_menu_item.dart @@ -29,29 +29,32 @@ void _showEmojiSelectionMenu( menuService.dismiss(); _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!); + _editorState = editorState; editorState.service.selectionService.currentSelection .addListener(_dismissEmojiSelectionMenu); } @@ -62,6 +65,7 @@ void _dismissEmojiSelectionMenu() { _editorState?.service.selectionService.currentSelection .removeListener(_dismissEmojiSelectionMenu); + _editorState?.service.keyboardService?.enable(); _editorState = null; } diff --git a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/hover.dart b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/hover.dart index e4d0bc6d00..f2c6843956 100644 --- a/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/hover.dart +++ b/frontend/appflowy_flutter/packages/flowy_infra_ui/lib/style_widget/hover.dart @@ -132,6 +132,21 @@ class FlowyHoverContainer extends StatelessWidget { 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( margin: style.contentMargin, decoration: BoxDecoration( @@ -139,19 +154,8 @@ class FlowyHoverContainer extends StatelessWidget { color: style.hoverColor ?? Theme.of(context).colorScheme.secondary, 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, ), ); diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml index 1f1e7d83cb..f4248e0709 100644 --- a/frontend/appflowy_flutter/pubspec.yaml +++ b/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. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.1.4 +version: 0.1.5 environment: sdk: ">=2.19.0 <3.0.0" diff --git a/frontend/scripts/windows_installer/inno_setup_config.iss b/frontend/scripts/windows_installer/inno_setup_config.iss index dc477d384a..12e7d7a25a 100644 --- a/frontend/scripts/windows_installer/inno_setup_config.iss +++ b/frontend/scripts/windows_installer/inno_setup_config.iss @@ -1,6 +1,7 @@ [Setup] AppName=AppFlowy AppVersion={#AppVersion} +AppPublisher=AppFlowy-IO WizardStyle=modern Compression=lzma2 SolidCompression=yes @@ -9,8 +10,8 @@ DefaultGroupName=AppFlowy SetupIconFile=flowy_logo.ico UninstallDisplayIcon={app}\AppFlowy.exe UninstallDisplayName=AppFlowy -AppPublisher=AppFlowy-IO VersionInfoVersion={#AppVersion} +UsePreviousAppDir=no [Files] 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 [Icons] -Name: "{group}\AppFlowy";Filename: "{app}\AppFlowy.exe" \ No newline at end of file +Name: "{userdesktop}\AppFlowy"; Filename: "{app}\AppFlowy.exe" +Name: "{group}\AppFlowy"; Filename: "{app}\AppFlowy.exe" \ No newline at end of file