Skip to content

Commit 05c1924

Browse files
authored
chore: update CHANGELOG.md (#7209)
* Revert "fix: disable deleting mutilple nodes in table" This reverts commit 0507c39. * chore: bump version 0.8.1 * chore: remove unused tests
1 parent b2f3f90 commit 05c1924

File tree

7 files changed

+34
-434
lines changed

7 files changed

+34
-434
lines changed

Diff for: CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
# Release Notes
2+
## Version 0.8.1 - 14/01/2025
3+
### New Features:
4+
- AI Chat Layout Options: Customize how AI responses appear with new layouts—List, Table, Image with Text, and Media Only
5+
- DALL-E Integration: Generate stunning AI images from text prompts, now available in AI Chat
6+
- Improved Desktop Search: Find what you need faster using keywords or by asking questions in natural language
7+
- Self-Hosting: Configure web server URLs directly in Settings to enable features like Publish, Copy Link to Share, Custom URLs, and more
8+
- Sidebar Enhancement: Drag to reorder your favorited pages in the Sidebar
9+
- Mobile Table Resizing: Adjust column widths in Simple Tables by long pressing the column borders on mobile
10+
### Bug Fixes
11+
- Resolved an icon rendering issue in callout blocks, tab bars, and search results
12+
- Enhanced image reliability: Retry functionality ensures images load successfully if the first attempt fails
13+
214
## Version 0.8.0 - 06/01/2025
315
### Bug Fixes
416
- Fixed error displaying in the page style menu

Diff for: frontend/appflowy_flutter/integration_test/desktop/document/document_with_image_block_test.dart

-92
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ import 'package:appflowy/plugins/document/presentation/editor_plugins/image/cust
77
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/image_placeholder.dart';
88
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/resizeable_image.dart';
99
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/upload_image_menu/upload_image_menu.dart';
10-
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/upload_image_menu/widgets/embed_image_url_widget.dart';
1110
import 'package:appflowy/startup/startup.dart';
1211
import 'package:appflowy_editor/appflowy_editor.dart'
1312
hide UploadImageMenu, ResizableImage;
1413
import 'package:easy_localization/easy_localization.dart';
1514
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
16-
import 'package:flutter/material.dart';
1715
import 'package:flutter/services.dart';
1816
import 'package:flutter_test/flutter_test.dart';
1917
import 'package:integration_test/integration_test.dart';
2018
import 'package:path/path.dart' as p;
2119
import 'package:path_provider/path_provider.dart';
22-
import 'package:run_with_network_images/run_with_network_images.dart';
2320

2421
import '../../shared/mock/mock_file_picker.dart';
2522
import '../../shared/util.dart';
@@ -29,58 +26,6 @@ void main() {
2926
TestWidgetsFlutterBinding.ensureInitialized();
3027

3128
group('image block in document', () {
32-
Future<void> testEmbedImage(WidgetTester tester, String url) async {
33-
await tester.initializeAppFlowy();
34-
await tester.tapAnonymousSignInButton();
35-
36-
// create a new document
37-
await tester.createNewPageWithNameUnderParent(
38-
name: LocaleKeys.document_plugins_image_addAnImageDesktop.tr(),
39-
);
40-
41-
// tap the first line of the document
42-
await tester.editor.tapLineOfEditorAt(0);
43-
await tester.editor.showSlashMenu();
44-
await tester.editor.tapSlashMenuItemWithName(
45-
LocaleKeys.document_slashMenu_name_image.tr(),
46-
);
47-
expect(find.byType(CustomImageBlockComponent), findsOneWidget);
48-
expect(find.byType(ImagePlaceholder), findsOneWidget);
49-
expect(
50-
find.descendant(
51-
of: find.byType(ImagePlaceholder),
52-
matching: find.byType(AppFlowyPopover),
53-
),
54-
findsOneWidget,
55-
);
56-
expect(find.byType(UploadImageMenu), findsOneWidget);
57-
58-
await tester.tapButtonWithName(
59-
LocaleKeys.document_imageBlock_embedLink_label.tr(),
60-
);
61-
await tester.enterText(
62-
find.descendant(
63-
of: find.byType(EmbedImageUrlWidget),
64-
matching: find.byType(TextField),
65-
),
66-
url,
67-
);
68-
await tester.tapButton(
69-
find.descendant(
70-
of: find.byType(EmbedImageUrlWidget),
71-
matching: find.text(
72-
LocaleKeys.document_imageBlock_embedLink_label.tr(),
73-
findRichText: true,
74-
),
75-
),
76-
);
77-
await tester.pumpAndSettle();
78-
expect(find.byType(ResizableImage), findsOneWidget);
79-
final node = tester.editor.getCurrentEditorState().getNodeAtPath([0])!;
80-
expect(node.type, ImageBlockKeys.type);
81-
expect(node.attributes[ImageBlockKeys.url], url);
82-
}
83-
8429
testWidgets('insert an image from local file', (tester) async {
8530
await tester.initializeAppFlowy();
8631
await tester.tapAnonymousSignInButton();
@@ -131,43 +76,6 @@ void main() {
13176
file.deleteSync();
13277
});
13378

134-
testWidgets('insert a gif image from network', (tester) async {
135-
await testEmbedImage(
136-
tester,
137-
'https://www.easygifanimator.net/images/samples/sparkles.gif',
138-
);
139-
});
140-
141-
testWidgets('insert an image from unsplash', (tester) async {
142-
await runWithNetworkImages(() async {
143-
await tester.initializeAppFlowy();
144-
await tester.tapAnonymousSignInButton();
145-
146-
// create a new document
147-
await tester.createNewPageWithNameUnderParent(
148-
name: LocaleKeys.document_plugins_image_addAnImageDesktop.tr(),
149-
);
150-
151-
// tap the first line of the document
152-
await tester.editor.tapLineOfEditorAt(0);
153-
await tester.editor.showSlashMenu();
154-
await tester.editor.tapSlashMenuItemWithName(
155-
LocaleKeys.document_slashMenu_name_image.tr(),
156-
);
157-
expect(find.byType(CustomImageBlockComponent), findsOneWidget);
158-
expect(find.byType(ImagePlaceholder), findsOneWidget);
159-
expect(
160-
find.descendant(
161-
of: find.byType(ImagePlaceholder),
162-
matching: find.byType(AppFlowyPopover),
163-
),
164-
findsOneWidget,
165-
);
166-
expect(find.byType(UploadImageMenu), findsOneWidget);
167-
expect(find.text('Unsplash'), findsOneWidget);
168-
});
169-
});
170-
17179
testWidgets('insert two images from local file at once', (tester) async {
17280
await tester.initializeAppFlowy();
17381
await tester.tapAnonymousSignInButton();

Diff for: frontend/appflowy_flutter/integration_test/desktop/settings/shortcuts_settings_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void main() {
8787
as ShortcutSettingTile;
8888
expect(
8989
second.command.command,
90-
'backspace, shift+backspace',
90+
'',
9191
);
9292
});
9393
});

Diff for: frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/custom_image_block_component/custom_image_block_component.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ class CustomImageBlockComponentState extends State<CustomImageBlockComponent>
252252
child: ValueListenableBuilder<bool>(
253253
valueListenable: showActionsNotifier,
254254
builder: (_, value, child) {
255-
final url = node.attributes[CustomImageBlockKeys.url];
256255
return Stack(
257256
children: [
258257
editorState.editable
@@ -266,7 +265,7 @@ class CustomImageBlockComponentState extends State<CustomImageBlockComponent>
266265
child: child!,
267266
)
268267
: child!,
269-
if (value && url.isNotEmpty == true)
268+
if (value)
270269
widget.menuBuilder!(widget.node, this, imageStateNotifier),
271270
],
272271
);

Diff for: frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/image/custom_image_block_component/image_menu.dart

+20-15
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ class _ImageMenuState extends State<ImageMenu> {
4242

4343
@override
4444
Widget build(BuildContext context) {
45+
final isPlaceholder = url == null || url!.isEmpty;
4546
final theme = Theme.of(context);
4647
return ValueListenableBuilder<ResizableImageState>(
4748
valueListenable: widget.imageStateNotifier,
4849
builder: (_, state, child) {
49-
if (state == ResizableImageState.loading) {
50+
if (state == ResizableImageState.loading && !isPlaceholder) {
5051
return const SizedBox.shrink();
5152
}
5253

@@ -66,21 +67,25 @@ class _ImageMenuState extends State<ImageMenu> {
6667
child: Row(
6768
children: [
6869
const HSpace(4),
69-
MenuBlockButton(
70-
tooltip: LocaleKeys.document_imageBlock_openFullScreen.tr(),
71-
iconData: FlowySvgs.full_view_s,
72-
onTap: openFullScreen,
73-
),
74-
const HSpace(4),
75-
MenuBlockButton(
76-
tooltip: LocaleKeys.editor_copy.tr(),
77-
iconData: FlowySvgs.copy_s,
78-
onTap: copyImageLink,
79-
),
80-
const HSpace(4),
70+
if (!isPlaceholder) ...[
71+
MenuBlockButton(
72+
tooltip: LocaleKeys.document_imageBlock_openFullScreen.tr(),
73+
iconData: FlowySvgs.full_view_s,
74+
onTap: openFullScreen,
75+
),
76+
const HSpace(4),
77+
MenuBlockButton(
78+
tooltip: LocaleKeys.editor_copy.tr(),
79+
iconData: FlowySvgs.copy_s,
80+
onTap: copyImageLink,
81+
),
82+
const HSpace(4),
83+
],
8184
if (widget.state.editorState.editable) ...[
82-
_ImageAlignButton(node: widget.node, state: widget.state),
83-
const _Divider(),
85+
if (!isPlaceholder) ...[
86+
_ImageAlignButton(node: widget.node, state: widget.state),
87+
const _Divider(),
88+
],
8489
MenuBlockButton(
8590
tooltip: LocaleKeys.button_delete.tr(),
8691
iconData: FlowySvgs.trash_s,

0 commit comments

Comments
 (0)