diff --git a/frontend/app_flowy/lib/plugins/document/editor_styles.dart b/frontend/app_flowy/lib/plugins/document/editor_styles.dart index b8306a8f74..d2b3f83e93 100644 --- a/frontend/app_flowy/lib/plugins/document/editor_styles.dart +++ b/frontend/app_flowy/lib/plugins/document/editor_styles.dart @@ -9,7 +9,7 @@ EditorStyle customEditorTheme(BuildContext context) { ? EditorStyle.dark : EditorStyle.light; editorStyle = editorStyle.copyWith( - padding: const EdgeInsets.symmetric(horizontal: 100), + padding: const EdgeInsets.symmetric(horizontal: 100, vertical: 28), textStyle: editorStyle.textStyle?.copyWith( fontFamily: 'poppins', fontSize: documentStyle.fontSize, diff --git a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_exporter_widget.dart b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_exporter_widget.dart index 2926c19189..613e1ec2be 100644 --- a/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_exporter_widget.dart +++ b/frontend/app_flowy/lib/workspace/presentation/settings/widgets/settings_file_exporter_widget.dart @@ -56,7 +56,6 @@ class _FileExporterWidgetState extends State { FlowyTextButton( LocaleKeys.button_OK.tr(), onPressed: () async { - // TODO: Export Data await getIt() .getDirectoryPath() .then((exportPath) { diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/emoji_picker.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/emoji_picker.dart index f2cc8bb440..47a8f0d3b1 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/emoji_picker.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/emoji_picker.dart @@ -2,4 +2,3 @@ export 'src/config.dart'; export 'src/models/emoji_model.dart'; export 'src/emoji_picker.dart'; export 'src/emoji_picker_builder.dart'; -export 'src/emoji_button.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_button.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_button.dart deleted file mode 100644 index 5f068916c9..0000000000 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_button.dart +++ /dev/null @@ -1,143 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:app_flowy/workspace/presentation/widgets/emoji_picker/emoji_picker.dart'; - -class FlowyEmojiStyleButton extends StatefulWidget { - // final Attribute attribute; - final String normalIcon; - // TODO: enable insert emoji in appflowy_editor - // final QuillController controller; - final String tooltipText; - - const FlowyEmojiStyleButton({ - // required this.attribute, - required this.normalIcon, - required this.tooltipText, - Key? key, - }) : super(key: key); - - @override - EmojiStyleButtonState createState() => EmojiStyleButtonState(); -} - -class EmojiStyleButtonState extends State { - // Style get _selectionStyle => widget.controller.getSelectionStyle(); - final GlobalKey emojiButtonKey = GlobalKey(); - OverlayEntry? _entry; - // final FocusNode _keyFocusNode = FocusNode(); - - @override - void initState() { - super.initState(); - // _isToggled = _getIsToggled(_selectionStyle.attributes); - // widget.controller.addListener(_didChangeEditingValue); - } - - @override - Widget build(BuildContext context) { - // debugPrint(MediaQuery.of(context).size.width.toString()); - // debugPrint(MediaQuery.of(context).size.height.toString()); - - // return ToolbarIconButton( - // key: emojiButtonKey, - // onPressed: _toggleAttribute, - // width: widget.iconSize * kIconButtonFactor, - // isToggled: _isToggled, - // iconName: widget.normalIcon, - // tooltipText: widget.tooltipText, - // ); - return Container(); - } - - @override - void dispose() { - _entry?.remove(); - super.dispose(); - } - - // void _toggleAttribute() { - // if (_entry?.mounted ?? false) { - // _entry?.remove(); - // _entry = null; - // setState(() => _isToggled = false); - // } else { - // RenderBox box = - // emojiButtonKey.currentContext?.findRenderObject() as RenderBox; - // Offset position = box.localToGlobal(Offset.zero); - - // // final window = await getWindowInfo(); - - // _entry = OverlayEntry( - // builder: (BuildContext context) => BuildEmojiPickerView( - // controller: widget.controller, - // offset: position, - // ), - // ); - - // Overlay.of(context)!.insert(_entry!); - // setState(() => _isToggled = true); - // } - - // } -} - -class BuildEmojiPickerView extends StatefulWidget { - const BuildEmojiPickerView({Key? key, this.offset}) : super(key: key); - final Offset? offset; - - @override - State createState() => _BuildEmojiPickerViewState(); -} - -class _BuildEmojiPickerViewState extends State { - @override - Widget build(BuildContext context) { - return Stack( - children: [ - Positioned( - top: widget.offset!.dy - - MediaQuery.of(context).size.height / 2.83 - - 30, - left: - widget.offset!.dx - MediaQuery.of(context).size.width / 3.92 + 40, - child: Material( - borderRadius: BorderRadius.circular(8.0), - child: SizedBox( - height: MediaQuery.of(context).size.height / 2.83 + 20, - width: MediaQuery.of(context).size.width / 3.92, - child: ClipRRect( - borderRadius: BorderRadius.circular(8.0), - child: EmojiPicker( - onEmojiSelected: (category, emoji) => insertEmoji(emoji), - config: const Config( - columns: 8, - emojiSizeMax: 28, - bgColor: Color(0xffF2F2F2), - iconColor: Colors.grey, - iconColorSelected: Color(0xff333333), - indicatorColor: Color(0xff333333), - progressIndicatorColor: Color(0xff333333), - buttonMode: ButtonMode.CUPERTINO, - initCategory: Category.RECENT, - ), - ), - ), - ), - ), - ), - ], - ); - } - - void insertEmoji(Emoji emoji) { - // final baseOffset = widget.controller.selection.baseOffset; - // final extentOffset = widget.controller.selection.extentOffset; - // final replaceLen = extentOffset - baseOffset; - // final selection = widget.controller.selection.copyWith( - // baseOffset: baseOffset + emoji.emoji.length, - // extentOffset: baseOffset + emoji.emoji.length, - // ); - - // widget.controller - // .replaceText(baseOffset, replaceLen, emoji.emoji, selection); - } -} diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/math_ equation/math_equation_node_widget.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/math_ equation/math_equation_node_widget.dart index bcb8bcedcd..c416c7d22b 100644 --- a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/math_ equation/math_equation_node_widget.dart +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/src/math_ equation/math_equation_node_widget.dart @@ -7,7 +7,6 @@ import 'package:flutter_math_fork/flutter_math.dart'; const String kMathEquationType = 'math_equation'; const String kMathEquationAttr = 'math_equation'; -// TODO: l10n SelectionMenuItem mathEquationMenuItem = SelectionMenuItem( name: () => 'Math Equation', icon: (editorState, onSelected) => Icon(