Skip to content

Commit 8046177

Browse files
authored
fix: simple columns issues (#7466)
* Revert "feat: use flutter_distrubutor to build linux and macos packages (#7392)" This reverts commit 6dc45c9. * fix: linux link issue * fix: outline doesn't work well in columns * fix: cannot drag a block under a table that’s in the second column
1 parent 8d8fc91 commit 8046177

File tree

31 files changed

+206
-832
lines changed

31 files changed

+206
-832
lines changed

.github/workflows/release.yml

Lines changed: 108 additions & 120 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,12 @@
1-
output: build/
1+
output: dist/
22
releases:
3-
- name: prod
3+
- name: dev
44
jobs:
5-
- name: release-prod-linux-deb
5+
- name: release-dev-linux-deb
66
package:
77
platform: linux
88
target: deb
9-
- name: release-prod-linux-rpm
9+
- name: release-dev-linux-rpm
1010
package:
1111
platform: linux
1212
target: rpm
13-
- name: release-prod-linux-appimage
14-
package:
15-
platform: linux
16-
target: appimage
17-
- name: release-prod-linux-zip
18-
package:
19-
platform: linux
20-
target: zip
21-
22-
# Because the flutter_distribute plugin does not support the deep code-signing for macos, we need to manually sign the app.
23-
# So we don't use the flutter_distribute plugin to distribute the macos app.
24-
# - name: release-prod-macos-dmg
25-
# package:
26-
# platform: macos
27-
# target: dmg
28-
# - name: release-prod-macos-pkg
29-
# package:
30-
# platform: macos
31-
# target: pkg
32-
- name: release-prod-macos-zip
33-
package:
34-
platform: macos
35-
target: zip

frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import 'package:flutter/services.dart';
1010
import 'package:flutter/widgets.dart';
1111
import 'package:open_filex/open_filex.dart';
1212
import 'package:string_validator/string_validator.dart';
13+
import 'package:universal_platform/universal_platform.dart';
1314
import 'package:url_launcher/url_launcher.dart' as launcher;
1415

1516
typedef OnFailureCallback = void Function(Uri uri);
@@ -38,6 +39,11 @@ Future<bool> afLaunchUri(
3839
);
3940
}
4041

42+
// on Linux, add http scheme to the url if it is not present
43+
if (UniversalPlatform.isLinux && !isURL(url, {'require_protocol': true})) {
44+
uri = Uri.parse('https://$url');
45+
}
46+
4147
// try to launch the uri directly
4248
bool result;
4349
try {

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/drag_to_reorder/draggable_option_button.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ class _DraggableOptionButtonState extends State<DraggableOptionButton> {
108108
}
109109
}
110110

111+
// return simple table block if the target node is in a simple table block
112+
final parentSimpleTableNode = targetNode.parentTableNode;
113+
if (parentSimpleTableNode != null) {
114+
return parentSimpleTableNode;
115+
}
116+
111117
return targetNode;
112118
},
113119
builder: (context, data) {
@@ -160,9 +166,16 @@ class _DraggableOptionButtonState extends State<DraggableOptionButton> {
160166
}
161167
}
162168

169+
// return simple table block if the target node is in a simple table block
170+
final parentSimpleTableNode = targetNode.parentTableNode;
171+
if (parentSimpleTableNode != null) {
172+
return parentSimpleTableNode;
173+
}
174+
163175
return targetNode;
164176
},
165177
);
178+
166179
dragToMoveNode(
167180
context,
168181
node: widget.blockComponentContext.node,

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/drag_to_reorder/util.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ Future<void> dragToMoveNode(
3636
return;
3737
}
3838

39+
if (shouldIgnoreDragTarget(
40+
editorState: editorState,
41+
dragNode: node,
42+
targetPath: acceptedPath,
43+
)) {
44+
Log.info('Drop ignored: node($node, ${node.path}), path($acceptedPath)');
45+
return;
46+
}
47+
3948
final position = getDragAreaPosition(context, targetNode, dragOffset);
4049
if (position == null) {
4150
Log.info('position is null');
@@ -182,6 +191,7 @@ Future<void> dragToMoveNode(
182191
Node dragTargetNode,
183192
Offset dragOffset,
184193
) {
194+
debugPrint('getDragAreaPosition - dragTargetNode: ${dragTargetNode.type}');
185195
final selectable = dragTargetNode.selectable;
186196
final renderBox = selectable?.context.findRenderObject() as RenderBox?;
187197
if (selectable == null || renderBox == null) {

frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/outline/outline_block_component.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,13 @@ class OutlineItemWidget extends StatelessWidget {
263263
textDirection: textDirection,
264264
children: [
265265
HSpace(node.leftIndent),
266-
Text(
267-
node.outlineItemText,
268-
textDirection: textDirection,
269-
style: style,
266+
Flexible(
267+
child: Text(
268+
node.outlineItemText,
269+
textDirection: textDirection,
270+
style: style,
271+
overflow: TextOverflow.ellipsis,
272+
),
270273
),
271274
],
272275
),

frontend/appflowy_flutter/linux/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.10)
22
project(runner LANGUAGES CXX)
33

4-
set(BINARY_NAME "appflowy")
4+
set(BINARY_NAME "AppFlowy")
55
set(APPLICATION_ID "io.appflowy.appflowy")
66

77
cmake_policy(SET CMP0063 NEW)

frontend/appflowy_flutter/linux/packaging/appimage/make_config.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

frontend/appflowy_flutter/linux/packaging/deb/make_config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ essential: false
2929
section: x11
3030
priority: optional
3131

32-
supported_mime_type:
33-
- x-scheme-handler/appflowy-flutter
32+
supportedMimeType: x-scheme-handler/appflowy-flutter
3433

3534
dependencies:
3635
- libnotify-bin

frontend/appflowy_flutter/linux/packaging/rpm/make_config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ categories:
2626

2727
startup_notify: true
2828

29-
supported_mime_type:
30-
- x-scheme-handler/appflowy-flutter
29+
supportedMimeType: x-scheme-handler/appflowy-flutter
3130

3231
requires:
3332
- libnotify

0 commit comments

Comments
 (0)