Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

feat: custom database field icons (#6415)

Richard Shiue70e72d843e11
diff --git a/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart
index 5b2a6a8924..3c1192bb04 100644
--- a/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart
+++ b/frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart
@@ -24,7 +24,6 @@ void main() {
// Invoke the field editor
await tester.tapGridFieldWithName('Name');
- await tester.tapEditFieldButton();
await tester.renameField('hello world');
await tester.dismissFieldEditor();
@@ -33,6 +32,32 @@ void main() {
await tester.pumpAndSettle();
});
+ testWidgets('edit field icon', (tester) async {
+ const icon = 'artificial_intelligence/ai-upscale-spark';
+ await tester.initializeAppFlowy();
+ await tester.tapAnonymousSignInButton();
+
+ await tester.createNewPageWithNameUnderParent(layout: ViewLayoutPB.Grid);
+
+ tester.assertFieldSvg('Name', FieldType.RichText);
+
+ // choose specific icon
+ await tester.tapGridFieldWithName('Name');
+ await tester.changeFieldIcon(icon);
+ await tester.dismissFieldEditor();
+
+ tester.assertFieldCustomSvg('Name', icon);
+
+ // remove icon
+ await tester.tapGridFieldWithName('Name');
+ await tester.changeFieldIcon('');
+ await tester.dismissFieldEditor();
+
+ tester.assertFieldSvg('Name', FieldType.RichText);
+
+ await tester.pumpAndSettle();
+ });
+
testWidgets('update field type of existing field', (tester) async {
await tester.initializeAppFlowy();
await tester.tapAnonymousSignInButton();
diff --git a/frontend/appflowy_flutter/integration_test/shared/database_test_op.dart b/frontend/appflowy_flutter/integration_test/shared/database_test_op.dart
index 7bcbc0eb48..45f47edf19 100644
--- a/frontend/appflowy_flutter/integration_test/shared/database_test_op.dart
+++ b/frontend/appflowy_flutter/integration_test/shared/database_test_op.dart
@@ -1,6 +1,8 @@
import 'dart:io';
import 'package:appflowy/plugins/database/application/field/filter_entities.dart';
+import 'package:appflowy/shared/icon_emoji_picker/flowy_icon_emoji_picker.dart';
+import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -681,6 +683,53 @@ extension AppFlowyDatabaseTest on WidgetTester {
await dismissFieldEditor();
}
+ Future<void> changeFieldIcon(String icon) async {
+ await tapButton(find.byType(FieldEditIconButton));
+ if (icon.isEmpty) {
+ final button = find.descendant(
+ of: find.byType(FlowyIconEmojiPicker),
+ matching: find.text(
+ LocaleKeys.button_remove.tr(),
+ ),
+ );
+ await tapButton(button);
+ } else {
+ final svgContent = kIconGroups?.findSvgContent(icon);
+ await tapButton(
+ find.byWidgetPredicate(
+ (widget) => widget is FlowySvg && widget.svgString == svgContent,
+ ),
+ );
+ }
+ }
+
+ void assertFieldSvg(String name, FieldType fieldType) {
+ final svgFinder = find.byWidgetPredicate(
+ (widget) => widget is FlowySvg && widget.svg == fieldType.svgData,
+ );
+ final fieldButton = find.byWidgetPredicate(
+ (widget) => widget is FieldCellButton && widget.field.name == name,
+ );
+ expect(
+ find.descendant(of: fieldButton, matching: svgFinder),
+ findsOneWidget,
+ );
+ }
+
+ void assertFieldCustomSvg(String name, String svg) {
+ final svgContent = kIconGroups?.findSvgContent(svg);
+ final svgFinder = find.byWidgetPredicate(
+ (widget) => widget is FlowySvg && widget.svgString == svgContent,
+ );
+ final fieldButton = find.byWidgetPredicate(
+ (widget) => widget is FieldCellButton && widget.field.name == name,
+ );
+ expect(
+ find.descendant(of: fieldButton, matching: svgFinder),
+ findsOneWidget,
+ );
+ }
+
Future<void> changeCalculateAtIndex(int index, CalculationType type) async {
await tap(find.byType(CalculateCell).at(index));
await pumpAndSettle();
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/mobile_row_property_list.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/mobile_row_property_list.dart
index 95298daeff..42bb241ab8 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/mobile_row_property_list.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/mobile_row_property_list.dart
@@ -1,13 +1,11 @@
-import 'package:flutter/material.dart';
-
-import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/database/application/cell/cell_controller.dart';
import 'package:appflowy/plugins/database/application/database_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/grid/application/row/row_detail_bloc.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_builder.dart';
-import 'package:appflowy/util/field_type_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class MobileRowPropertyList extends StatelessWidget {
@@ -77,10 +75,8 @@ class _PropertyCellState extends State<_PropertyCell> {
children: [
Row(
children: [
- FlowySvg(
- fieldInfo.fieldType.svgData,
- color: Theme.of(context).hintColor,
- size: const Size.square(16),
+ FieldIcon(
+ fieldInfo: fieldInfo,
),
const HSpace(6),
Expanded(
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/option_text_field.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/option_text_field.dart
index fc869a54c7..f72038e8a6 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/option_text_field.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_detail/widgets/option_text_field.dart
@@ -11,13 +11,13 @@ class OptionTextField extends StatelessWidget {
const OptionTextField({
super.key,
required this.controller,
- required this.type,
+ required this.fieldType,
required this.onTextChanged,
required this.onFieldTypeChanged,
});
final TextEditingController controller;
- final FieldType type;
+ final FieldType fieldType;
final void Function(String value) onTextChanged;
final void Function(FieldType value) onFieldTypeChanged;
@@ -43,12 +43,12 @@ class OptionTextField extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).brightness == Brightness.light
- ? type.mobileIconBackgroundColor
- : type.mobileIconBackgroundColorDark,
+ ? fieldType.mobileIconBackgroundColor
+ : fieldType.mobileIconBackgroundColorDark,
),
child: Center(
child: FlowySvg(
- type.svgData,
+ fieldType.svgData,
size: const Size.square(22),
),
),
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_create_field_screen.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_create_field_screen.dart
index 0f7c758664..5abb2dc031 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_create_field_screen.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_create_field_screen.dart
@@ -37,6 +37,7 @@ class _MobileNewPropertyScreenState extends State<MobileNewPropertyScreen> {
final type = widget.fieldType ?? FieldType.RichText;
optionValues = FieldOptionValues(
type: type,
+ icon: "",
name: type.i18n,
);
}
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_picker_list.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_picker_list.dart
index f488608d87..04144241a0 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_picker_list.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_picker_list.dart
@@ -1,10 +1,9 @@
-import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/mobile/presentation/base/app_bar/app_bar_actions.dart';
import 'package:appflowy/mobile/presentation/widgets/flowy_option_tile.dart';
import 'package:appflowy/plugins/base/drag_handler.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
-import 'package:appflowy/util/field_type_extension.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
@@ -132,9 +131,9 @@ class _FieldButton extends StatelessWidget {
return FlowyOptionTile.checkbox(
text: field.name,
isSelected: isSelected,
- leftIcon: FlowySvg(
- field.fieldType.svgData,
- size: const Size.square(20),
+ leftIcon: FieldIcon(
+ fieldInfo: field,
+ dimension: 20,
),
showTopBorder: showTopBorder,
onTap: () => onSelect(field.id),
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart
index 16e02a5b03..c7454263c1 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_full_field_editor.dart
@@ -35,6 +35,7 @@ class FieldOptionValues {
FieldOptionValues({
required this.type,
required this.name,
+ required this.icon,
this.dateFormat,
this.timeFormat,
this.includeTime,
@@ -48,6 +49,7 @@ class FieldOptionValues {
return FieldOptionValues(
type: fieldType,
name: field.name,
+ icon: field.icon,
numberFormat: fieldType == FieldType.Number
? NumberTypeOptionPB.fromBuffer(buffer).format
: null,
@@ -83,6 +85,7 @@ class FieldOptionValues {
FieldType type;
String name;
+ String icon;
// FieldType.DateTime
// FieldType.LastEditedTime
@@ -221,7 +224,7 @@ class _MobileFieldEditorState extends State<MobileFieldEditor> {
const _Divider(),
OptionTextField(
controller: controller,
- type: values.type,
+ fieldType: values.type,
onTextChanged: (value) {
isFieldNameChanged = true;
_updateOptionValues(name: value);
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart
index 311794aa42..ca43434e4d 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_quick_field_editor.dart
@@ -76,7 +76,7 @@ class _QuickEditFieldState extends State<QuickEditField> {
const VSpace(16),
OptionTextField(
controller: controller,
- type: state.field.fieldType,
+ fieldType: state.field.fieldType,
onTextChanged: (text) {
context
.read<FieldEditorBloc>()
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_field_list.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_field_list.dart
index b5ec0f9d80..cc0493a019 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_field_list.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_field_list.dart
@@ -8,8 +8,8 @@ import 'package:appflowy/plugins/database/application/database_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/setting/property_bloc.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
-import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy/workspace/application/view/view_bloc.dart';
import 'package:collection/collection.dart';
import 'package:easy_localization/easy_localization.dart';
@@ -168,9 +168,9 @@ class DatabaseFieldListTile extends StatelessWidget {
if (fieldInfo.field.isPrimary) {
return FlowyOptionTile.text(
text: fieldInfo.name,
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- size: const Size.square(20),
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
+ dimension: 20,
),
showTopBorder: showTopBorder,
);
@@ -178,9 +178,9 @@ class DatabaseFieldListTile extends StatelessWidget {
return FlowyOptionTile.toggle(
isSelected: fieldInfo.visibility?.isVisibleState() ?? false,
text: fieldInfo.name,
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- size: const Size.square(20),
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
+ dimension: 20,
),
showTopBorder: showTopBorder,
onTap: () => showEditFieldScreen(context, viewId, fieldInfo),
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart
index 3acede8392..29fee8ec34 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart
@@ -9,6 +9,7 @@ import 'package:appflowy/plugins/database/application/field/filter_entities.dart
import 'package:appflowy/plugins/database/grid/application/filter/filter_editor_bloc.dart';
import 'package:appflowy/plugins/database/grid/application/filter/select_option_loader.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/filter/choicechip/date.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/plugins/database/widgets/cell_editor/mobile_select_option_editor.dart';
import 'package:appflowy/util/debounce.dart';
import 'package:appflowy/util/field_type_extension.dart';
@@ -620,10 +621,10 @@ class _FilterableFieldList extends StatelessWidget {
itemBuilder: (context, index) {
return FlowyOptionTile.checkbox(
text: blocState.fields[index].name,
- showTopBorder: false,
- leftIcon: FlowySvg(
- blocState.fields[index].fieldType.svgData,
+ leftIcon: FieldIcon(
+ fieldInfo: blocState.fields[index],
),
+ showTopBorder: false,
isSelected: _isSelected(context, blocState, index),
onTap: () => onSelectField(blocState.fields[index]),
);
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_sort_bottom_sheet.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_sort_bottom_sheet.dart
index 9d7df6c63b..009468a8f1 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_sort_bottom_sheet.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_sort_bottom_sheet.dart
@@ -5,6 +5,7 @@ import 'package:appflowy/mobile/presentation/widgets/widgets.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/field/sort_entities.dart';
import 'package:appflowy/plugins/database/grid/application/sort/sort_editor_bloc.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:collection/collection.dart';
@@ -523,12 +524,12 @@ class _SortDetailContent extends StatelessWidget {
return FlowyOptionTile.checkbox(
text: fieldInfo.field.name,
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
+ ),
isSelected: isSelected,
textColor: enabled ? null : Theme.of(context).disabledColor,
showTopBorder: false,
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- ),
onTap: () {
if (isSelected) {
return;
diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart
index 6f87403604..1c056b1461 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_editor_bloc.dart
@@ -77,6 +77,10 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
_logIfError(result);
emit(state.copyWith(wasRenameManually: true));
},
+ updateIcon: (icon) async {
+ final result = await _fieldService.updateField(icon: icon);
+ _logIfError(result);
+ },
updateTypeOption: (typeOptionData) async {
final result = await FieldBackendService.updateFieldTypeOption(
viewId: viewId,
@@ -165,6 +169,7 @@ class FieldEditorEvent with _$FieldEditorEvent {
final Uint8List typeOptionData,
) = _UpdateTypeOption;
const factory FieldEditorEvent.renameField(final String name) = _RenameField;
+ const factory FieldEditorEvent.updateIcon(String icon) = _UpdateIcon;
const factory FieldEditorEvent.insertLeft() = _InsertLeft;
const factory FieldEditorEvent.insertRight() = _InsertRight;
const factory FieldEditorEvent.toggleFieldVisibility() =
diff --git a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_info.dart b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_info.dart
index 10e6c87c50..46fc8659ca 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/application/field/field_info.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/application/field/field_info.dart
@@ -29,6 +29,8 @@ class FieldInfo with _$FieldInfo {
String get name => field.name;
+ String get icon => field.icon;
+
bool get isPrimary => field.isPrimary;
double? get width => fieldSettings?.width.toDouble();
diff --git a/frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_event_editor.dart b/frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_event_editor.dart
index 94998dfd63..2bfdb4313a 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_event_editor.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/calendar/presentation/calendar_event_editor.dart
@@ -1,5 +1,3 @@
-import 'package:flutter/material.dart';
-
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/cell/bloc/text_cell_bloc.dart';
@@ -9,18 +7,19 @@ import 'package:appflowy/plugins/database/application/field/field_controller.dar
import 'package:appflowy/plugins/database/application/row/row_controller.dart';
import 'package:appflowy/plugins/database/calendar/application/calendar_bloc.dart';
import 'package:appflowy/plugins/database/calendar/application/calendar_event_editor_bloc.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_builder.dart';
import 'package:appflowy/plugins/database/widgets/cell/editable_cell_skeleton/text.dart';
import 'package:appflowy/plugins/database/widgets/row/accessory/cell_accessory.dart';
import 'package:appflowy/plugins/database/widgets/row/cells/cell_container.dart';
import 'package:appflowy/plugins/database/widgets/row/row_detail.dart';
-import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy/workspace/application/view/view_bloc.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:collection/collection.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class CalendarEventEditor extends StatelessWidget {
@@ -248,10 +247,9 @@ class _PropertyCellState extends State<PropertyCell> {
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 6),
child: Row(
children: [
- FlowySvg(
- fieldInfo.fieldType.svgData,
- color: Theme.of(context).hintColor,
- size: const Size.square(14),
+ FieldIcon(
+ fieldInfo: fieldInfo,
+ dimension: 14,
),
const HSpace(4.0),
Expanded(
diff --git a/frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart b/frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart
index fe23916d2d..66c941891d 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/domain/field_service.dart
@@ -20,6 +20,7 @@ class FieldBackendService {
required String viewId,
FieldType fieldType = FieldType.RichText,
String? fieldName,
+ String? icon,
Uint8List? typeOptionData,
OrderObjectPositionPB? position,
}) {
@@ -88,6 +89,7 @@ class FieldBackendService {
/// Update a field's properties
Future<FlowyResult<void, FlowyError>> updateField({
String? name,
+ String? icon,
bool? frozen,
}) {
final payload = FieldChangesetPB.create()
@@ -98,6 +100,10 @@ class FieldBackendService {
payload.name = name;
}
+ if (icon != null) {
+ payload.icon = icon;
+ }
+
if (frozen != null) {
payload.frozen = frozen;
}
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/choicechip.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/choicechip.dart
index 28d6042460..99804ad69b 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/choicechip.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/choicechip.dart
@@ -4,7 +4,7 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/field/filter_entities.dart';
import 'package:appflowy/plugins/database/grid/application/filter/filter_editor_bloc.dart';
-import 'package:appflowy/util/field_type_extension.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:collection/collection.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart';
@@ -49,9 +49,8 @@ class ChoiceChipButton extends StatelessWidget {
),
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
radius: const BorderRadius.all(Radius.circular(14)),
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- color: Theme.of(context).iconTheme.color,
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
),
rightIcon: const _ChoicechipDownArrow(),
hoverColor: AFThemeExtension.of(context).lightGreyHover,
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/create_filter_list.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/create_filter_list.dart
index 5a782a90eb..9cf2cd8322 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/create_filter_list.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/create_filter_list.dart
@@ -1,10 +1,9 @@
-import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/grid/application/filter/filter_editor_bloc.dart';
import 'package:appflowy/plugins/database/grid/application/simple_text_filter_bloc.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
-import 'package:appflowy/util/field_type_extension.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart';
@@ -46,7 +45,7 @@ class CreateDatabaseViewFilterList extends StatelessWidget {
height: GridSize.popoverItemHeight,
child: FilterableFieldButton(
fieldInfo: fieldInfo,
- onTap: (fieldInfo) {
+ onTap: () {
context
.read<FilterEditorBloc>()
.add(FilterEditorEvent.createFilter(fieldInfo));
@@ -129,7 +128,7 @@ class FilterableFieldButton extends StatelessWidget {
});
final FieldInfo fieldInfo;
- final Function(FieldInfo) onTap;
+ final VoidCallback onTap;
@override
Widget build(BuildContext context) {
@@ -140,10 +139,9 @@ class FilterableFieldButton extends StatelessWidget {
fieldInfo.field.name,
color: AFThemeExtension.of(context).textColor,
),
- onTap: () => onTap(fieldInfo),
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- color: Theme.of(context).iconTheme.color,
+ onTap: onTap,
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
),
);
}
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart
index b80cf48cbf..617722a806 100755
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart
@@ -1,3 +1,5 @@
+import 'package:appflowy/shared/icon_emoji_picker/icon_picker.dart';
+import 'package:appflowy/util/theme_extension.dart';
import 'package:flutter/material.dart';
import 'package:appflowy/generated/flowy_svgs.g.dart';
@@ -217,9 +219,8 @@ class FieldCellButton extends StatelessWidget {
return FlowyButton(
hoverColor: AFThemeExtension.of(context).lightGreyHover,
onTap: onTap,
- leftIcon: FlowySvg(
- field.fieldType.svgData,
- color: Theme.of(context).iconTheme.color,
+ leftIcon: FieldIcon(
+ fieldInfo: FieldInfo.initial(field),
),
rightIcon: field.fieldType.rightIcon != null
? FlowySvg(
@@ -240,3 +241,39 @@ class FieldCellButton extends StatelessWidget {
);
}
}
+
+class FieldIcon extends StatelessWidget {
+ const FieldIcon({
+ super.key,
+ required this.fieldInfo,
+ this.dimension = 16.0,
+ });
+
+ final FieldInfo fieldInfo;
+ final double dimension;
+
+ @override
+ Widget build(BuildContext context) {
+ final svgContent = kIconGroups?.findSvgContent(
+ fieldInfo.icon,
+ );
+ final color =
+ Theme.of(context).isLightMode ? const Color(0xFF171717) : Colors.white;
+ return svgContent == null
+ ? FlowySvg(
+ fieldInfo.fieldType.svgData,
+ color: color.withOpacity(0.6),
+ size: Size.square(dimension),
+ )
+ : SizedBox.square(
+ dimension: dimension,
+ child: Center(
+ child: FlowySvg.string(
+ svgContent,
+ color: color.withOpacity(0.45),
+ size: Size.square(dimension - 2),
+ ),
+ ),
+ );
+ }
+}
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/mobile_field_button.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/mobile_field_button.dart
index d4c2289136..20cc030ff4 100755
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/mobile_field_button.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/header/mobile_field_button.dart
@@ -1,8 +1,7 @@
-import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_field_bottom_sheets.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
-import 'package:appflowy/util/field_type_extension.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
import 'package:flutter/material.dart';
@@ -43,9 +42,9 @@ class MobileFieldButton extends StatelessWidget {
radius: radius,
margin: margin,
leftIconSize: const Size.square(18),
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- size: const Size.square(18),
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
+ dimension: 18,
),
text: FlowyText(
fieldInfo.name,
diff --git a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/sort/create_sort_list.dart b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/sort/create_sort_list.dart
index 954817c462..5218a60ee5 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/sort/create_sort_list.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/sort/create_sort_list.dart
@@ -1,10 +1,9 @@
-import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/grid/application/simple_text_filter_bloc.dart';
import 'package:appflowy/plugins/database/grid/application/sort/sort_editor_bloc.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
-import 'package:appflowy/util/field_type_extension.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart';
@@ -139,9 +138,8 @@ class GridSortPropertyCell extends StatelessWidget {
color: AFThemeExtension.of(context).textColor,
),
onTap: onTap,
- leftIcon: FlowySvg(
- fieldInfo.fieldType.svgData,
- color: Theme.of(context).iconTheme.color,
+ leftIcon: FieldIcon(
+ fieldInfo: fieldInfo,
),
),
);
diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart
index 2c8ea9aa11..63c52f46ff 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/field/field_editor.dart
@@ -1,7 +1,5 @@
import 'dart:typed_data';
-import 'package:flutter/material.dart';
-
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
@@ -10,13 +8,18 @@ import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/domain/field_service.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/common/type_option_separator.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
+import 'package:appflowy/shared/icon_emoji_picker/flowy_icon_emoji_picker.dart';
+import 'package:appflowy/shared/icon_emoji_picker/tab.dart';
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy/workspace/presentation/widgets/dialogs.dart';
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:easy_localization/easy_localization.dart';
+import 'package:flowy_infra/size.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'field_type_list.dart';
@@ -50,6 +53,7 @@ class FieldEditor extends StatefulWidget {
}
class _FieldEditorState extends State<FieldEditor> {
+ final PopoverMutex popoverMutex = PopoverMutex();
late FieldEditorPage _currentPage;
late final TextEditingController textController =
TextEditingController(text: widget.fieldInfo.name);
@@ -62,6 +66,7 @@ class _FieldEditorState extends State<FieldEditor> {
@override
void dispose() {
+ popoverMutex.dispose();
textController.dispose();
super.dispose();
}
@@ -89,9 +94,10 @@ class _FieldEditorState extends State<FieldEditor> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
- FieldNameTextField(
+ _NameAndIcon(
+ popoverMutex: popoverMutex,
+ textController: textController,
padding: const EdgeInsets.fromLTRB(12, 12, 12, 8),
- textEditingController: textController,
),
VSpace(GridSize.typeOptionSeparatorHeight),
_EditFieldButton(
@@ -390,10 +396,10 @@ class _FieldDetailsEditorState extends State<FieldDetailsEditor> {
@override
Widget build(BuildContext context) {
final List<Widget> children = [
- FieldNameTextField(
+ _NameAndIcon(
popoverMutex: popoverMutex,
+ textController: widget.textEditingController,
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 4.0),
- textEditingController: widget.textEditingController,
),
const VSpace(8.0),
SwitchFieldButton(popoverMutex: popoverMutex),
@@ -512,17 +518,111 @@ class FieldTypeOptionEditor extends StatelessWidget {
}
}
+class _NameAndIcon extends StatelessWidget {
+ const _NameAndIcon({
+ required this.textController,
+ this.padding = EdgeInsets.zero,
+ this.popoverMutex,
+ });
+
+ final TextEditingController textController;
+ final PopoverMutex? popoverMutex;
+ final EdgeInsetsGeometry padding;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: padding,
+ child: Row(
+ children: [
+ FieldEditIconButton(
+ popoverMutex: popoverMutex,
+ ),
+ const HSpace(6),
+ Expanded(
+ child: FieldNameTextField(
+ textController: textController,
+ popoverMutex: popoverMutex,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class FieldEditIconButton extends StatefulWidget {
+ const FieldEditIconButton({
+ super.key,
+ this.popoverMutex,
+ });
+
+ final PopoverMutex? popoverMutex;
+
+ @override
+ State<FieldEditIconButton> createState() => _FieldEditIconButtonState();
+}
+
+class _FieldEditIconButtonState extends State<FieldEditIconButton> {
+ final PopoverController popoverController = PopoverController();
+
+ @override
+ Widget build(BuildContext context) {
+ return AppFlowyPopover(
+ offset: const Offset(0, 4),
+ constraints: BoxConstraints.loose(const Size(380, 432)),
+ margin: EdgeInsets.zero,
+ direction: PopoverDirection.bottomWithLeftAligned,
+ controller: popoverController,
+ mutex: widget.popoverMutex,
+ child: FlowyIconButton(
+ decoration: BoxDecoration(
+ border: Border.fromBorderSide(
+ BorderSide(
+ color: Theme.of(context).colorScheme.outline,
+ ),
+ ),
+ borderRadius: Corners.s8Border,
+ ),
+ icon: BlocBuilder<FieldEditorBloc, FieldEditorState>(
+ builder: (context, state) {
+ return FieldIcon(fieldInfo: state.field);
+ },
+ ),
+ width: 32,
+ onPressed: () => popoverController.show(),
+ ),
+ popupBuilder: (popoverContext) {
+ return FlowyIconEmojiPicker(
+ enableBackgroundColorSelection: false,
+ tabs: const [PickerTabType.icon],
+ onSelectedIcon: (group, icon, _) {
+ String newIcon = "";
+ if (group != null && icon != null) {
+ newIcon = '${group.name}/${icon.name}';
+ }
+
+ context
+ .read<FieldEditorBloc>()
+ .add(FieldEditorEvent.updateIcon(newIcon));
+
+ PopoverContainer.of(popoverContext).close();
+ },
+ );
+ },
+ );
+ }
+}
+
class FieldNameTextField extends StatefulWidget {
const FieldNameTextField({
super.key,
- required this.textEditingController,
+ required this.textController,
this.popoverMutex,
- this.padding = EdgeInsets.zero,
});
- final TextEditingController textEditingController;
+ final TextEditingController textController;
final PopoverMutex? popoverMutex;
- final EdgeInsets padding;
@override
State<FieldNameTextField> createState() => _FieldNameTextFieldState();
@@ -550,18 +650,15 @@ class _FieldNameTextFieldState extends State<FieldNameTextField> {
@override
Widget build(BuildContext context) {
- return Padding(
- padding: widget.padding,
- child: FlowyTextField(
- focusNode: focusNode,
- controller: widget.textEditingController,
- onSubmitted: (_) => PopoverContainer.of(context).close(),
- onChanged: (newName) {
- context
- .read<FieldEditorBloc>()
- .add(FieldEditorEvent.renameField(newName));
- },
- ),
+ return FlowyTextField(
+ focusNode: focusNode,
+ controller: widget.textController,
+ onSubmitted: (_) => PopoverContainer.of(context).close(),
+ onChanged: (newName) {
+ context
+ .read<FieldEditorBloc>()
+ .add(FieldEditorEvent.renameField(newName));
+ },
);
}
diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/group/database_group.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/group/database_group.dart
index 60f7591f13..6b27fc9c70 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/widgets/group/database_group.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/group/database_group.dart
@@ -1,5 +1,3 @@
-import 'package:flutter/material.dart';
-
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/plugins/database/application/database_controller.dart';
@@ -7,6 +5,7 @@ import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/setting/group_bloc.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/common/type_option_separator.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy/workspace/presentation/widgets/toggle/toggle.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
@@ -16,6 +15,7 @@ import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/style_widget/button.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/spacing.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:protobuf/protobuf.dart' hide FieldInfo;
@@ -99,7 +99,6 @@ class DatabaseGroupList extends StatelessWidget {
(fieldInfo) => _GridGroupCell(
fieldInfo: fieldInfo,
name: fieldInfo.name,
- icon: fieldInfo.fieldType.svgData,
checked: fieldInfo.isGroupField,
onSelected: onDismissed,
key: ValueKey(fieldInfo.id),
@@ -166,7 +165,6 @@ class _GridGroupCell extends StatelessWidget {
required this.checked,
required this.name,
this.condition = 0,
- this.icon,
});
final FieldInfo fieldInfo;
@@ -174,7 +172,6 @@ class _GridGroupCell extends StatelessWidget {
final bool checked;
final int condition;
final String name;
- final FlowySvgData? icon;
@override
Widget build(BuildContext context) {
@@ -197,12 +194,7 @@ class _GridGroupCell extends StatelessWidget {
color: AFThemeExtension.of(context).textColor,
lineHeight: 1.0,
),
- leftIcon: icon != null
- ? FlowySvg(
- icon!,
- color: Theme.of(context).iconTheme.color,
- )
- : null,
+ leftIcon: FieldIcon(fieldInfo: fieldInfo),
rightIcon: rightIcon,
onTap: () {
List<int> settingContent = [];
diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/setting/setting_property_list.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/setting/setting_property_list.dart
index bebf9a1432..fb4425dfe1 100644
--- a/frontend/appflowy_flutter/lib/plugins/database/widgets/setting/setting_property_list.dart
+++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/setting/setting_property_list.dart
@@ -1,20 +1,19 @@
import 'dart:io';
-import 'package:flutter/material.dart';
-
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/plugins/database/application/field/field_controller.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/setting/property_bloc.dart';
import 'package:appflowy/plugins/database/grid/presentation/layout/sizes.dart';
+import 'package:appflowy/plugins/database/grid/presentation/widgets/header/desktop_field_cell.dart';
import 'package:appflowy/plugins/database/widgets/field/field_editor.dart';
import 'package:appflowy/plugins/database/widgets/setting/field_visibility_extension.dart';
-import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/protobuf.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import 'package:collection/collection.dart';
import 'package:flowy_infra/theme_extension.dart';
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
+import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class DatabasePropertyList extends StatefulWidget {
@@ -174,10 +173,8 @@ class _DatabasePropertyCellState extends State<DatabasePropertyCell> {
),
),
const HSpace(6.0),
- FlowySvg(
- widget.fieldInfo.fieldType.svgData,
- color: Theme.of(context).iconTheme.color,
- size: const Size.square(16),
+ FieldIcon(
+ fieldInfo: widget.fieldInfo,
),
],
),
diff --git a/frontend/appflowy_flutter/lib/util/field_type_extension.dart b/frontend/appflowy_flutter/lib/util/field_type_extension.dart
index 8baea35630..11b55a6cc7 100644
--- a/frontend/appflowy_flutter/lib/util/field_type_extension.dart
+++ b/frontend/appflowy_flutter/lib/util/field_type_extension.dart
@@ -38,8 +38,8 @@ extension FieldTypeExtension on FieldType {
FieldType.Checkbox => FlowySvgs.checkbox_s,
FieldType.URL => FlowySvgs.url_s,
FieldType.Checklist => FlowySvgs.checklist_s,
- FieldType.LastEditedTime => FlowySvgs.last_edited_time_s,
- FieldType.CreatedTime => FlowySvgs.created_time_s,
+ FieldType.LastEditedTime => FlowySvgs.time_s,
+ FieldType.CreatedTime => FlowySvgs.time_s,
FieldType.Relation => FlowySvgs.relation_s,
FieldType.Summary => FlowySvgs.ai_summary_s,
FieldType.Time => FlowySvgs.timer_start_s,
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock
index 4d1ffdf9b8..957bd74106 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.lock
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock
@@ -861,7 +861,7 @@ dependencies = [
"chrono",
"client-api-entity",
"client-websocket",
- "collab",
+ "collab 0.2.0",
"collab-rt-entity",
"collab-rt-protocol",
"futures",
@@ -902,7 +902,7 @@ name = "client-api-entity"
version = "0.1.0"
source = "git+https://github.com/AppFlowy-IO/AppFlowy-Cloud?rev=b023e2f5118897a107f3a6023eb15b2f75389252#b023e2f5118897a107f3a6023eb15b2f75389252"
dependencies = [
- "collab-entity",
+ "collab-entity 0.2.0",
"collab-rt-entity",
"database-entity",
"gotrue-entity",
@@ -987,7 +987,6 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
dependencies = [
"anyhow",
"arc-swap",
@@ -1009,18 +1008,81 @@ dependencies = [
"yrs",
]
+[[package]]
+name = "collab"
+version = "0.2.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
+dependencies = [
+ "anyhow",
+ "arc-swap",
+ "async-trait",
+ "bincode",
+ "bytes",
+ "chrono",
+ "js-sys",
+ "lazy_static",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+ "unicode-segmentation",
+ "web-sys",
+ "yrs",
+]
+
+[[package]]
+name = "collab-database"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "base64 0.22.1",
+ "chrono",
+ "chrono-tz 0.10.0",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
+ "csv",
+ "dashmap 5.5.3",
+ "fancy-regex 0.13.0",
+ "futures",
+ "getrandom 0.2.10",
+ "js-sys",
+ "lazy_static",
+ "nanoid",
+ "percent-encoding",
+ "rayon",
+ "rust_decimal",
+ "rusty-money",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "sha2",
+ "strum",
+ "strum_macros 0.25.2",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tokio-util",
+ "tracing",
+ "uuid",
+ "yrs",
+]
+
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
dependencies = [
"anyhow",
"async-trait",
"base64 0.22.1",
"chrono",
"chrono-tz 0.10.0",
- "collab",
- "collab-entity",
+ "collab 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-entity 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
"csv",
"dashmap 5.5.3",
"fancy-regex 0.13.0",
@@ -1051,12 +1113,32 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
dependencies = [
"anyhow",
"arc-swap",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
+ "getrandom 0.2.10",
+ "markdown",
+ "nanoid",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+ "uuid",
+]
+
+[[package]]
+name = "collab-document"
+version = "0.2.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
+dependencies = [
+ "anyhow",
+ "arc-swap",
+ "collab 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-entity 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
"getrandom 0.2.10",
"markdown",
"nanoid",
@@ -1072,11 +1154,10 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
dependencies = [
"anyhow",
"bytes",
- "collab",
+ "collab 0.2.0",
"getrandom 0.2.10",
"prost",
"prost-build",
@@ -1089,16 +1170,56 @@ dependencies = [
"walkdir",
]
+[[package]]
+name = "collab-entity"
+version = "0.2.0"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
+dependencies = [
+ "anyhow",
+ "bytes",
+ "collab 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "getrandom 0.2.10",
+ "prost",
+ "prost-build",
+ "protoc-bin-vendored",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "thiserror",
+ "uuid",
+ "walkdir",
+]
+
+[[package]]
+name = "collab-folder"
+version = "0.2.0"
+dependencies = [
+ "anyhow",
+ "arc-swap",
+ "chrono",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
+ "dashmap 5.5.3",
+ "getrandom 0.2.10",
+ "serde",
+ "serde_json",
+ "serde_repr",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ "tracing",
+]
+
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
dependencies = [
"anyhow",
"arc-swap",
"chrono",
- "collab",
- "collab-entity",
+ "collab 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-entity 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
"dashmap 5.5.3",
"getrandom 0.2.10",
"serde",
@@ -1113,17 +1234,17 @@ dependencies = [
[[package]]
name = "collab-importer"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b#480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b"
dependencies = [
"anyhow",
"async-recursion",
"base64 0.22.1",
"chrono",
- "collab",
- "collab-database",
- "collab-document",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-database 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-document 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-entity 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
+ "collab-folder 0.2.0 (git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=480e81c91575fcfb1d3e4c2d1acb7b8a419e6e6b)",
"fancy-regex 0.13.0",
"fxhash",
"hex",
@@ -1148,11 +1269,11 @@ dependencies = [
"anyhow",
"arc-swap",
"async-trait",
- "collab",
- "collab-database",
- "collab-document",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-database 0.2.0",
+ "collab-document 0.2.0",
+ "collab-entity 0.2.0",
+ "collab-folder 0.2.0",
"collab-plugins",
"collab-user",
"futures",
@@ -1166,7 +1287,6 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
dependencies = [
"anyhow",
"async-stream",
@@ -1174,8 +1294,8 @@ dependencies = [
"bincode",
"bytes",
"chrono",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"futures",
"futures-util",
"getrandom 0.2.10",
@@ -1211,8 +1331,8 @@ dependencies = [
"bytes",
"chrono",
"client-websocket",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"collab-rt-protocol",
"database-entity",
"prost",
@@ -1234,8 +1354,8 @@ dependencies = [
"anyhow",
"async-trait",
"bincode",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"serde",
"thiserror",
"tokio",
@@ -1246,11 +1366,10 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
dependencies = [
"anyhow",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"getrandom 0.2.10",
"serde",
"serde_json",
@@ -1628,7 +1747,7 @@ dependencies = [
"bincode",
"bytes",
"chrono",
- "collab-entity",
+ "collab-entity 0.2.0",
"serde",
"serde_json",
"serde_repr",
@@ -2183,8 +2302,8 @@ dependencies = [
"base64 0.21.5",
"bytes",
"client-api",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"collab-integrate",
"collab-plugins",
"dashmap 6.0.1",
@@ -2232,8 +2351,8 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client-api",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"flowy-error",
"lib-infra",
]
@@ -2249,9 +2368,9 @@ dependencies = [
"bytes",
"chrono",
"chrono-tz 0.8.2",
- "collab",
- "collab-database",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-database 0.2.0",
+ "collab-entity 0.2.0",
"collab-integrate",
"collab-plugins",
"csv",
@@ -2323,9 +2442,9 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bytes",
- "collab",
- "collab-document",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-document 0.2.0",
+ "collab-entity 0.2.0",
"collab-integrate",
"collab-plugins",
"dashmap 6.0.1",
@@ -2358,8 +2477,8 @@ name = "flowy-document-pub"
version = "0.1.0"
dependencies = [
"anyhow",
- "collab",
- "collab-document",
+ "collab 0.2.0",
+ "collab-document 0.2.0",
"flowy-error",
"lib-infra",
]
@@ -2385,9 +2504,9 @@ dependencies = [
"anyhow",
"bytes",
"client-api",
- "collab-database",
- "collab-document",
- "collab-folder",
+ "collab-database 0.2.0",
+ "collab-document 0.2.0",
+ "collab-folder 0.2.0",
"collab-plugins",
"fancy-regex 0.11.0",
"flowy-codegen",
@@ -2415,10 +2534,10 @@ dependencies = [
"async-trait",
"bytes",
"chrono",
- "collab",
- "collab-document",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-document 0.2.0",
+ "collab-entity 0.2.0",
+ "collab-folder 0.2.0",
"collab-integrate",
"collab-plugins",
"flowy-codegen",
@@ -2451,9 +2570,9 @@ name = "flowy-folder-pub"
version = "0.1.0"
dependencies = [
"anyhow",
- "collab",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
+ "collab-folder 0.2.0",
"lib-infra",
"serde",
"serde_json",
@@ -2483,8 +2602,8 @@ version = "0.1.0"
dependencies = [
"async-stream",
"bytes",
- "collab",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-folder 0.2.0",
"diesel",
"diesel_derives",
"diesel_migrations",
@@ -2516,8 +2635,8 @@ name = "flowy-search-pub"
version = "0.1.0"
dependencies = [
"client-api",
- "collab",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-folder 0.2.0",
"flowy-error",
"futures",
"lib-infra",
@@ -2532,11 +2651,11 @@ dependencies = [
"bytes",
"chrono",
"client-api",
- "collab",
- "collab-database",
- "collab-document",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-database 0.2.0",
+ "collab-document 0.2.0",
+ "collab-entity 0.2.0",
+ "collab-folder 0.2.0",
"collab-plugins",
"collab-user",
"dashmap 6.0.1",
@@ -2661,11 +2780,11 @@ dependencies = [
"bytes",
"chrono",
"client-api",
- "collab",
- "collab-database",
- "collab-document",
- "collab-entity",
- "collab-folder",
+ "collab 0.2.0",
+ "collab-database 0.2.0",
+ "collab-document 0.2.0",
+ "collab-entity 0.2.0",
+ "collab-folder 0.2.0",
"collab-integrate",
"collab-plugins",
"collab-user",
@@ -2709,8 +2828,8 @@ dependencies = [
"base64 0.21.5",
"chrono",
"client-api",
- "collab",
- "collab-entity",
+ "collab 0.2.0",
+ "collab-entity 0.2.0",
"flowy-error",
"flowy-folder-pub",
"lib-infra",
@@ -6280,7 +6399,7 @@ dependencies = [
"appflowy-ai-client",
"bytes",
"chrono",
- "collab-entity",
+ "collab-entity 0.2.0",
"database-entity",
"futures",
"gotrue-entity",
diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml
index 66548e65fc..68391ce5f6 100644
--- a/frontend/appflowy_tauri/src-tauri/Cargo.toml
+++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml
@@ -120,14 +120,14 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
# Working directory: frontend
diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock
index de83ea6c47..311749fcd4 100644
--- a/frontend/appflowy_web_app/src-tauri/Cargo.lock
+++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock
@@ -312,17 +312,6 @@ dependencies = [
"pin-project-lite",
]
-[[package]]
-name = "async-recursion"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.55",
-]
-
[[package]]
name = "async-stream"
version = "0.3.5"
@@ -985,7 +974,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -1010,7 +999,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"async-trait",
@@ -1049,7 +1038,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -1070,7 +1059,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"bytes",
@@ -1090,7 +1079,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -1111,10 +1100,10 @@ dependencies = [
[[package]]
name = "collab-importer"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
- "async-recursion",
+ "async-trait",
"base64 0.22.1",
"chrono",
"collab",
@@ -1123,6 +1112,7 @@ dependencies = [
"collab-entity",
"collab-folder",
"fancy-regex 0.13.0",
+ "futures",
"fxhash",
"hex",
"markdown",
@@ -1164,7 +1154,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"async-stream",
@@ -1244,7 +1234,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"collab",
diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml
index 15e596cf1b..968e99abdd 100644
--- a/frontend/appflowy_web_app/src-tauri/Cargo.toml
+++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml
@@ -118,14 +118,14 @@ custom-protocol = ["tauri/custom-protocol"]
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
# Working directory: frontend
diff --git a/frontend/resources/flowy_icons/16x/ai_summary.svg b/frontend/resources/flowy_icons/16x/ai_summary.svg
index 4d44e4892c..f3bfa1d9f3 100644
--- a/frontend/resources/flowy_icons/16x/ai_summary.svg
+++ b/frontend/resources/flowy_icons/16x/ai_summary.svg
@@ -1,27 +1,7 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_41_59)">
-<path d="M9.36746 14.3244H6.63259V15.35H9.36746V14.3244ZM1.67559 9.36744V6.63256H0.650025V9.36744H1.67559ZM14.3244 9.06863V9.36744H15.35V9.06863H14.3244ZM9.97678 2.94813L12.6835 5.38413L13.3695 4.62181L10.6629 2.18581L9.97678 2.94813ZM15.35 9.06863C15.35 7.91419 15.3603 7.18331 15.069 6.52931L14.1322 6.94656C14.3141 7.35494 14.3244 7.82363 14.3244 9.06863H15.35ZM12.6835 5.38413C13.6088 6.21694 13.9503 6.53819 14.1322 6.94656L15.069 6.52931C14.7778 5.87531 14.2276 5.39406 13.3695 4.62181L12.6835 5.38413ZM6.65296 1.67563C7.73446 1.67563 8.14259 1.68356 8.50628 1.82313L8.87371 0.865626C8.29134 0.642126 7.65677 0.650063 6.65296 0.650063V1.67563ZM10.6629 2.18581C9.92034 1.5175 9.45615 1.08906 8.87371 0.865626L8.50628 1.82313C8.87015 1.96275 9.17703 2.22838 9.97678 2.94813L10.6629 2.18581ZM6.63259 14.3244C5.32884 14.3244 4.40265 14.3233 3.69996 14.2288C3.01209 14.1364 2.61577 13.9629 2.32646 13.6736L1.60121 14.3988C2.1129 14.9104 2.76171 15.1375 3.56334 15.2453C4.35021 15.3511 5.35784 15.35 6.63259 15.35V14.3244ZM0.650025 9.36744C0.650025 10.6422 0.648962 11.6498 0.754712 12.4367C0.862525 13.2383 1.08952 13.8871 1.60121 14.3988L2.32646 13.6736C2.03709 13.3843 1.86365 12.9879 1.77115 12.3001C1.67671 11.5974 1.67559 10.6712 1.67559 9.36744H0.650025ZM9.36746 15.35C10.6421 15.35 11.6498 15.3511 12.4366 15.2453C13.2383 15.1375 13.8871 14.9104 14.3988 14.3988L13.6736 13.6736C13.3842 13.9629 12.9879 14.1364 12.3 14.2288C11.5974 14.3233 10.6711 14.3244 9.36746 14.3244V15.35ZM14.3244 9.36744C14.3244 10.6712 14.3233 11.5974 14.2288 12.3001C14.1364 12.9879 13.9629 13.3843 13.6736 13.6736L14.3988 14.3988C14.9104 13.8871 15.1375 13.2383 15.2453 12.4367C15.3511 11.6498 15.35 10.6422 15.35 9.36744H14.3244ZM1.67559 6.63256C1.67559 5.32888 1.67671 4.40263 1.77115 3.7C1.86365 3.01213 2.03709 2.61581 2.32646 2.32644L1.60121 1.60125C1.08959 2.11294 0.862525 2.76175 0.754712 3.56338C0.648962 4.35019 0.650025 5.35781 0.650025 6.63256H1.67559ZM6.65296 0.650063C5.37134 0.650063 4.35877 0.648938 3.56871 0.754688C2.76427 0.862376 2.11327 1.08919 1.60121 1.60125L2.32646 2.32644C2.6154 2.0375 3.0129 1.86381 3.70477 1.77119C4.41096 1.67669 5.34246 1.67563 6.65296 1.67563V0.650063Z" fill="url(#paint0_linear_41_59)"/>
-<path d="M8.68372 1.50469V3.214C8.68372 4.8255 8.68372 5.63131 9.18434 6.13194C9.68503 6.63256 10.4908 6.63256 12.1023 6.63256H14.8372" stroke="url(#paint1_linear_41_59)"/>
-<path d="M5.36486 8.69913C5.62467 8.233 5.75461 8 5.94879 8C6.14298 8 6.27292 8.233 6.53273 8.69913L6.59998 8.81975C6.67373 8.95219 6.71067 9.01831 6.76823 9.06206C6.82579 9.10575 6.89748 9.122 7.04086 9.15438L7.17136 9.18394C7.67586 9.29812 7.92817 9.35512 7.98823 9.54819C8.04823 9.74119 7.87623 9.94225 7.53229 10.3445L7.44329 10.4486C7.34554 10.5628 7.29667 10.6199 7.27467 10.6906C7.25273 10.7614 7.26011 10.8376 7.27486 10.9901L7.28836 11.1289C7.34029 11.6656 7.36636 11.9339 7.20923 12.0532C7.05204 12.1724 6.81592 12.0637 6.34354 11.8462L6.22129 11.7899C6.08704 11.7281 6.01998 11.6973 5.94879 11.6973C5.87767 11.6973 5.81054 11.7281 5.67629 11.7899L5.55411 11.8462C5.08173 12.0637 4.84554 12.1724 4.68842 12.0532C4.53129 11.9339 4.55729 11.6656 4.60929 11.1289L4.62273 10.9901C4.63754 10.8376 4.64492 10.7614 4.62292 10.6906C4.60092 10.6199 4.55204 10.5628 4.45429 10.4486L4.36536 10.3445C4.02136 9.94225 3.84942 9.74119 3.90942 9.54819C3.96942 9.35512 4.22173 9.29812 4.72623 9.18394L4.85673 9.15438C5.00011 9.122 5.07179 9.10575 5.12936 9.06206C5.18692 9.01837 5.22386 8.95219 5.29767 8.81975L5.36486 8.69913Z" stroke="url(#paint2_linear_41_59)"/>
-</g>
-<defs>
-<linearGradient id="paint0_linear_41_59" x1="8.00002" y1="0.650028" x2="8.00002" y2="15.35" gradientUnits="userSpaceOnUse">
-<stop stop-color="#8032FF"/>
-<stop offset="1" stop-color="#EF35FF"/>
-</linearGradient>
-<linearGradient id="paint1_linear_41_59" x1="11.7605" y1="1.50469" x2="11.7605" y2="6.63256" gradientUnits="userSpaceOnUse">
-<stop stop-color="#8032FF"/>
-<stop offset="1" stop-color="#EF35FF"/>
-</linearGradient>
-<linearGradient id="paint2_linear_41_59" x1="5.94882" y1="8" x2="5.94882" y2="12.1023" gradientUnits="userSpaceOnUse">
-<stop stop-color="#8032FF"/>
-<stop offset="1" stop-color="#EF35FF"/>
-</linearGradient>
-<clipPath id="clip0_41_59">
-<rect width="16" height="16" fill="white"/>
-</clipPath>
-</defs>
+<path d="M5.33334 1.33334V3.33334" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M10.6667 1.33334V3.33334" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.66666 8.66669H9.99999" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.66666 11.3333H7.99999" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M10.6667 2.33334C12.8867 2.45334 14 3.30001 14 6.43334V10.5533C14 13.3 13.3333 14.6733 10 14.6733H6C2.66667 14.6733 2 13.3 2 10.5533V6.43334C2 3.30001 3.11333 2.46001 5.33333 2.33334H10.6667Z" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
-
-
diff --git a/frontend/resources/flowy_icons/16x/ai_translate.svg b/frontend/resources/flowy_icons/16x/ai_translate.svg
index 37ea7f29ba..a32d7cd908 100644
--- a/frontend/resources/flowy_icons/16x/ai_translate.svg
+++ b/frontend/resources/flowy_icons/16x/ai_translate.svg
@@ -1,11 +1,12 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M10.3003 2.0252H6.38474V0.719999H5.07954V2.0252H1.164V3.3304H2.47663C2.5607 5.00003 3.35339 6.55824 4.65933 7.6095L2.39906 9.33788L3.19188 10.3747L5.73214 8.43216L7.29344 9.62611L8.08638 8.58933L6.80495 7.6095C8.11089 6.55824 8.90352 5.00003 8.98765 3.3304H10.3003V2.0252ZM5.89668 6.66323L5.73214 6.78908L5.5676 6.66323C4.51602 5.85915 3.86893 4.64185 3.78393 3.3304H7.68034C7.59535 4.64185 6.94826 5.85915 5.89668 6.66323ZM10.6918 7.24594H10.2187L10.0716 7.69555L7.72225 14.8741L8.9627 15.28L9.57661 13.4042H12.9817L13.5956 15.28L14.836 14.8741L12.4868 7.69555L12.3395 7.24594H10.6918ZM12.5545 12.099H10.0038L11.1649 8.55114H11.3935L12.5545 12.099Z" fill="url(#paint0_linear_41_51)"/>
-<defs>
-<linearGradient id="paint0_linear_41_51" x1="8.00002" y1="0.719999" x2="8.00002" y2="15.28" gradientUnits="userSpaceOnUse">
-<stop stop-color="#8032FF"/>
-<stop offset="1" stop-color="#EF35FF"/>
-</linearGradient>
-</defs>
+<path d="M12.7067 12.4467L11.28 9.60004L9.85336 12.4467" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M10.1134 11.94H12.46" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M11.28 14.6667C9.41331 14.6667 7.89331 13.1533 7.89331 11.28C7.89331 9.41334 9.40665 7.89337 11.28 7.89337C13.1466 7.89337 14.6666 9.40668 14.6666 11.28C14.6666 13.1533 13.1533 14.6667 11.28 14.6667Z" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M3.34668 1.33334H5.96001C7.34001 1.33334 8.00668 2.00002 7.97335 3.34669V5.96001C8.00668 7.34001 7.34001 8.00669 5.96001 7.97336H3.34668C2.00001 8.00003 1.33334 7.33334 1.33334 5.95334V3.34002C1.33334 2.00002 2.00001 1.33334 3.34668 1.33334Z" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M6.00659 3.89999H3.29993" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.64661 3.44666V3.89998" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M5.32661 3.89334C5.32661 5.06001 4.41327 6.00666 3.29327 6.00666" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M6.00658 6.00668C5.51991 6.00668 5.07992 5.74668 4.77325 5.33334" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1.33331 10C1.33331 12.58 3.41998 14.6667 5.99998 14.6667L5.29998 13.5" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M14.6666 6.00001C14.6666 3.42001 12.58 1.33334 9.99997 1.33334L10.7 2.50001" stroke="#171717" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
-
diff --git a/frontend/resources/flowy_icons/16x/checkbox.svg b/frontend/resources/flowy_icons/16x/checkbox.svg
index b613ae5c58..944381cd5f 100644
--- a/frontend/resources/flowy_icons/16x/checkbox.svg
+++ b/frontend/resources/flowy_icons/16x/checkbox.svg
@@ -1,14 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_41_77)">
-<path d="M1.16284 8C1.16284 4.77687 1.16284 3.16537 2.16409 2.16406C3.1654 1.16281 4.7769 1.16281 8.00003 1.16281C11.2231 1.16281 12.8347 1.16281 13.8359 2.16406C14.8372 3.16537 14.8372 4.77687 14.8372 8C14.8372 11.2231 14.8372 12.8346 13.8359 13.8359C12.8347 14.8372 11.2231 14.8372 8.00003 14.8372C4.7769 14.8372 3.1654 14.8372 2.16409 13.8359C1.16284 12.8347 1.16284 11.2231 1.16284 8Z" stroke="black"/>
-<path d="M5.60699 8.34187L6.97443 9.7093L10.393 6.29068" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-<defs>
-<clipPath id="clip0_41_77">
-<rect width="16" height="16" fill="white"/>
-</clipPath>
-</defs>
+<path d="M10.1601 14.6H5.84006C4.09924 14.6 3.03675 14.2481 2.39433 13.6057C1.7519 12.9633 1.40006 11.9008 1.40006 10.16V5.83999C1.40006 4.09917 1.7519 3.03668 2.39433 2.39425C3.03675 1.75183 4.09924 1.39999 5.84006 1.39999H10.1601C11.9009 1.39999 12.9634 1.75183 13.6058 2.39425C14.2482 3.03668 14.6001 4.09917 14.6001 5.83999V10.16C14.6001 11.9008 14.2482 12.9633 13.6058 13.6057C12.9634 14.2481 11.9009 14.6 10.1601 14.6Z" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.95006 8.14046L6.9452 10.1356L11.0501 6.20001" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
-
-
diff --git a/frontend/resources/flowy_icons/16x/checklist.svg b/frontend/resources/flowy_icons/16x/checklist.svg
index 71d89c098c..006825d3e2 100644
--- a/frontend/resources/flowy_icons/16x/checklist.svg
+++ b/frontend/resources/flowy_icons/16x/checklist.svg
@@ -1,8 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.48633 11.8316L3.01897 13.3642L6.08424 10.299" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M1.48633 4.16841L3.01897 5.70105L6.08424 2.63577" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.14948 3.40208H15.28" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.14948 8H15.28" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.14948 12.5979H15.28" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M2.16671 8C2.16671 4.77834 4.77838 2.16667 8.00004 2.16667C8.86971 2.16667 9.69343 2.3566 10.4333 2.69669C10.726 2.83124 11.0724 2.70302 11.207 2.41029C11.3415 2.11757 11.2133 1.77119 10.9206 1.63664C10.0309 1.22773 9.04129 1 8.00004 1C4.13405 1 1.00005 4.13401 1.00005 8C1.00005 11.866 4.13405 15 8.00004 15C11.866 15 15 11.866 15 8C15 7.67783 14.7389 7.41667 14.4167 7.41667C14.0945 7.41667 13.8334 7.67783 13.8334 8C13.8334 11.2217 11.2217 13.8333 8.00004 13.8333C4.77838 13.8333 2.16671 11.2217 2.16671 8Z" fill="#171717"/>
+<path d="M14.8136 4.34413C15.0497 4.12491 15.0634 3.75582 14.8442 3.51974C14.625 3.28366 14.2559 3.26999 14.0198 3.4892L8.13466 8.95396L6.64697 7.57254C6.41089 7.35332 6.0418 7.36699 5.82258 7.60307C5.60336 7.83915 5.61703 8.20824 5.85311 8.42746L7.73773 10.1775C7.96154 10.3853 8.30778 10.3853 8.53159 10.1775L14.8136 4.34413Z" fill="#171717"/>
</svg>
-
diff --git a/frontend/resources/flowy_icons/16x/created_time.svg b/frontend/resources/flowy_icons/16x/created_time.svg
deleted file mode 100644
index 1db4ba8850..0000000000
--- a/frontend/resources/flowy_icons/16x/created_time.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.80951 8C1.80951 9.64182 2.46172 11.2164 3.62266 12.3773C4.7836 13.5383 6.35817 14.1905 7.99998 14.1905C9.6418 14.1905 11.2164 13.5383 12.3773 12.3773C13.5383 11.2164 14.1905 9.64182 14.1905 8C14.1905 6.35818 13.5383 4.78361 12.3773 3.62267C11.2164 2.46173 9.6418 1.80952 7.99998 1.80952C6.35817 1.80952 4.7836 2.46173 3.62266 3.62267C2.46172 4.78361 1.80951 6.35818 1.80951 8Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M8.00001 4.28571V8H5.21429" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-</svg>
-
diff --git a/frontend/resources/flowy_icons/16x/date.svg b/frontend/resources/flowy_icons/16x/date.svg
index 0bb757aa38..9c19568379 100644
--- a/frontend/resources/flowy_icons/16x/date.svg
+++ b/frontend/resources/flowy_icons/16x/date.svg
@@ -1,16 +1,9 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_41_21)">
-<path d="M13.8933 4.53334V3.49334C13.8933 2.72752 13.2725 2.10667 12.5067 2.10667H2.8C2.03417 2.10667 1.41333 2.72752 1.41333 3.49334V13.2C1.41333 13.9659 2.03411 14.5867 2.8 14.5867H5.22666" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M10.4266 0.720001V3.49333" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M4.88 0.720001V3.49333" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M1.41333 6.26666H4.88" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M11.4666 11.4667L10.4266 10.6347V9.03999" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M6.26666 10.4267C6.26666 13.6291 9.73333 15.6305 12.5067 14.0293C13.7938 13.2862 14.5867 11.9129 14.5867 10.4267C14.5867 7.22426 11.12 5.22282 8.34666 6.82399C7.05954 7.56709 6.26666 8.94045 6.26666 10.4267Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-<defs>
-<clipPath id="clip0_41_21">
-<rect width="16" height="16" fill="white"/>
-</clipPath>
-</defs>
+<path d="M5.00006 0.799988V2.89999" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M10.5999 0.799988V2.89999" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1.8501 5.76297H13.7501" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M14.1 5.34995V11.2999C14.1 13.3999 13.05 14.7999 10.6 14.7999H5C2.55 14.7999 1.5 13.3999 1.5 11.2999V5.34995C1.5 3.24995 2.55 1.84995 5 1.84995H10.6C13.05 1.84995 14.1 3.24995 14.1 5.34995Z" stroke="#171717" stroke-width="1.2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M5.0946 8.91612H5.10359" stroke="#171717" stroke-width="1.05" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M5.0946 11.0839H5.10359" stroke="#171717" stroke-width="1.05" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M7.69659 8.89999H7.70558" stroke="#171717" stroke-width="1.05" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
diff --git a/frontend/resources/flowy_icons/16x/last_edited_time.svg b/frontend/resources/flowy_icons/16x/last_edited_time.svg
deleted file mode 100644
index 27e74e1c33..0000000000
--- a/frontend/resources/flowy_icons/16x/last_edited_time.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M8.29141 4.50217V7.66669L10.9209 9.24422C11.3053 9.4751 11.2956 10.0356 10.9035 10.2531C10.7215 10.354 10.4994 10.3502 10.321 10.243L7.40911 8.49586C7.2338 8.39053 7.12659 8.20097 7.12665 7.99646V4.50217C7.1271 4.05385 7.61269 3.77414 8.00073 3.99868C8.18045 4.10269 8.29121 4.29452 8.29141 4.50217ZM14.6976 2.75502C14.376 2.75502 14.1152 3.01576 14.1152 3.33741V4.64777C13.653 4.11197 13.1812 3.59583 12.6505 3.05859C8.84665 -0.745725 2.35092 0.994418 0.958239 6.19085C-0.43445 11.3873 4.32042 16.1427 9.517 14.7506C10.6358 14.4508 11.6626 13.8778 12.5049 13.0828C12.8311 12.7746 12.7013 12.2289 12.2713 12.1006C12.0717 12.041 11.8555 12.0924 11.7042 12.2355C8.44153 15.3102 3.07387 13.7 2.04238 9.33712C1.01089 4.97421 5.0892 1.13078 9.38333 2.41894C10.3051 2.69546 11.144 3.1961 11.825 3.87611C12.4176 4.47596 12.9366 5.05398 13.4601 5.66693H11.7857C11.3374 5.66738 11.0577 6.15298 11.2822 6.54101C11.3862 6.72074 11.5781 6.83149 11.7857 6.8317H14.6976C15.0193 6.83168 15.28 6.57095 15.28 6.24931V3.33741C15.28 3.01576 15.0193 2.75502 14.6976 2.75502Z" fill="black"/>
-</svg>
-
diff --git a/frontend/resources/flowy_icons/16x/multiselect.svg b/frontend/resources/flowy_icons/16x/multiselect.svg
index 45ccc0db18..e1682cebb5 100644
--- a/frontend/resources/flowy_icons/16x/multiselect.svg
+++ b/frontend/resources/flowy_icons/16x/multiselect.svg
@@ -1,9 +1,11 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M5.5238 4.28571H13.5714" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M5.5238 8H13.5714" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M5.5238 11.7143H13.5714" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M2.42859 4.28571H2.43401" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M2.42859 8H2.43401" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M2.42859 11.7143H2.43401" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M4.8174 2.67738C5.06386 2.43092 5.06386 2.03132 4.8174 1.78485C4.57093 1.53839 4.17134 1.53839 3.92487 1.78485L2.4778 3.23192L1.9774 2.73152C1.73093 2.48506 1.33134 2.48506 1.08487 2.73152C0.838408 2.97799 0.838408 3.37758 1.08487 3.62405L2.03154 4.57071C2.278 4.81718 2.6776 4.81718 2.92407 4.57071L4.8174 2.67738Z" fill="#171717"/>
+<path d="M6.89558 2.23112C6.54703 2.23112 6.26447 2.51368 6.26447 2.86223C6.26447 3.21078 6.54703 3.49334 6.89558 3.49334H14.4689C14.8175 3.49334 15.1 3.21078 15.1 2.86223C15.1 2.51368 14.8175 2.23112 14.4689 2.23112H6.89558Z" fill="#171717"/>
+<path d="M6.89558 7.28001C6.54703 7.28001 6.26447 7.56256 6.26447 7.91112C6.26447 8.25967 6.54703 8.54223 6.89558 8.54223H14.4689C14.8175 8.54223 15.1 8.25967 15.1 7.91112C15.1 7.56256 14.8175 7.28001 14.4689 7.28001H6.89558Z" fill="#171717"/>
+<path d="M6.89558 12.3289C6.54703 12.3289 6.26447 12.6115 6.26447 12.96C6.26447 13.3086 6.54703 13.5911 6.89558 13.5911H14.4689C14.8175 13.5911 15.1 13.3086 15.1 12.96C15.1 12.6115 14.8175 12.3289 14.4689 12.3289H6.89558Z" fill="#171717"/>
+<path d="M4.8174 12.144C5.06386 11.8976 5.06386 11.498 4.8174 11.2515C4.57093 11.0051 4.17134 11.0051 3.92487 11.2515L2.4778 12.6986L1.9774 12.1982C1.73093 11.9517 1.33134 11.9517 1.08487 12.1982C0.838408 12.4447 0.838408 12.8442 1.08487 13.0907L2.03154 14.0374C2.278 14.2838 2.6776 14.2838 2.92407 14.0374L4.8174 12.144Z" fill="#171717"/>
+<path d="M4.8174 6.51819C5.06386 6.76465 5.06386 7.16425 4.8174 7.41071L2.92407 9.30405C2.6776 9.55051 2.278 9.55051 2.03154 9.30405L1.08487 8.35738C0.838408 8.11092 0.838408 7.71132 1.08487 7.46485C1.33134 7.21839 1.73093 7.21839 1.9774 7.46485L2.4778 7.96526L3.92487 6.51819C4.17134 6.27172 4.57093 6.27172 4.8174 6.51819Z" fill="#171717"/>
+<path d="M1.5 12.5L2.5 13.5L4.5 11.5" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1.5 8L2.5 9L4.5 7" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1.5 3L2.5 4L4.5 2" stroke="#171717" stroke-width="1.1" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
diff --git a/frontend/resources/flowy_icons/16x/number.svg b/frontend/resources/flowy_icons/16x/number.svg
index cb42a930ea..e0dcb04637 100644
--- a/frontend/resources/flowy_icons/16x/number.svg
+++ b/frontend/resources/flowy_icons/16x/number.svg
@@ -1,6 +1,6 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.90399 6.08899H13.096" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M2.90399 9.91101H13.096" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M6.726 2.267L5.452 13.733" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M10.548 2.267L9.27399 13.733" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M1 10.6298H13.7647" stroke="#171717" stroke-width="1.23529" stroke-linecap="round"/>
+<path d="M2.02948 4.45334H15.0001" stroke="#171717" stroke-width="1.23529" stroke-linecap="round"/>
+<path d="M3.98532 14.2327L5.70452 2" stroke="#171717" stroke-width="1.23529" stroke-linecap="round"/>
+<path d="M10.1618 14.2327L11.881 2" stroke="#171717" stroke-width="1.23529" stroke-linecap="round"/>
</svg>
diff --git a/frontend/resources/flowy_icons/16x/relation.svg b/frontend/resources/flowy_icons/16x/relation.svg
index 37a841d740..98d43aba76 100644
--- a/frontend/resources/flowy_icons/16x/relation.svg
+++ b/frontend/resources/flowy_icons/16x/relation.svg
@@ -1,12 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0_41_45)">
-<path d="M1.41809 8.65811L8.6581 1.4181M8.6581 1.4181V6.02573M8.6581 1.4181H4.05047M14.5819 7.34189L7.34188 14.5819M7.34188 14.5819H11.9495M7.34188 14.5819V9.97427" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-<defs>
-<clipPath id="clip0_41_45">
-<rect width="16" height="16" fill="white"/>
-</clipPath>
-</defs>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3.27096 5.40009C4.12679 5.40009 4.84192 4.69557 4.84192 3.80004C4.84192 2.90452 4.12679 2.2 3.27096 2.2C2.41512 2.2 1.7 2.90452 1.7 3.80004C1.7 4.69557 2.41512 5.40009 3.27096 5.40009ZM4.92464 9.63685L3.97786 6.50815C5.02313 6.23029 5.82697 5.35088 6.00498 4.25835L9.96163 4.81659C9.95931 4.86353 9.95814 4.91076 9.95814 4.95828C9.95814 5.65895 10.2128 6.29951 10.6337 6.79059L7.67829 9.9392C7.21987 9.59992 6.65442 9.39959 6.04266 9.39959C5.64484 9.39959 5.2666 9.48431 4.92464 9.63685ZM8.47034 10.8487C8.68912 11.2492 8.81362 11.7097 8.81362 12.1996C8.81362 13.7461 7.57302 14.9997 6.04266 14.9997C4.5123 14.9997 3.2717 13.7461 3.2717 12.1996C3.2717 11.5195 3.51168 10.896 3.91076 10.4108L2.74216 6.54916C1.46473 6.29973 0.5 5.16373 0.5 3.80004C0.5 2.25362 1.7406 1 3.27096 1C4.53731 1 5.60525 1.8584 5.93604 3.03078L10.2818 3.64392C10.7477 2.75997 11.6688 2.15823 12.7291 2.15823C14.2595 2.15823 15.5001 3.41186 15.5001 4.95828C15.5001 6.5047 14.2595 7.75832 12.7291 7.75832C12.3266 7.75832 11.9441 7.67159 11.5989 7.51561L8.47034 10.8487ZM14.3001 4.95828C14.3001 5.8538 13.5849 6.55832 12.7291 6.55832C11.8733 6.55832 11.1581 5.8538 11.1581 4.95828C11.1581 4.06276 11.8733 3.35823 12.7291 3.35823C13.5849 3.35823 14.3001 4.06276 14.3001 4.95828ZM7.61362 12.1996C7.61362 13.0952 6.89849 13.7997 6.04266 13.7997C5.18682 13.7997 4.4717 13.0952 4.4717 12.1996C4.4717 11.3041 5.18682 10.5996 6.04266 10.5996C6.89849 10.5996 7.61362 11.3041 7.61362 12.1996Z" fill="#171717"/>
</svg>
-
-
diff --git a/frontend/resources/flowy_icons/16x/single_select.svg b/frontend/resources/flowy_icons/16x/single_select.svg
index 997244a265..431c228fcd 100644
--- a/frontend/resources/flowy_icons/16x/single_select.svg
+++ b/frontend/resources/flowy_icons/16x/single_select.svg
@@ -1,6 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.80951 7.99998C1.80951 9.6418 2.46172 11.2164 3.62266 12.3773C4.7836 13.5383 6.35817 14.1905 7.99998 14.1905C9.6418 14.1905 11.2164 13.5383 12.3773 12.3773C13.5383 11.2164 14.1905 9.6418 14.1905 7.99998C14.1905 6.35817 13.5383 4.7836 12.3773 3.62266C11.2164 2.46172 9.6418 1.80951 7.99998 1.80951C6.35817 1.80951 4.7836 2.46172 3.62266 3.62266C2.46172 4.7836 1.80951 6.35817 1.80951 7.99998Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M10.4762 6.7619L7.99999 9.23809L5.5238 6.7619" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M7.5238 9.49081L5.6523 7.61931C5.37505 7.34206 5.57141 6.86801 5.9635 6.86801H9.70651C10.0986 6.86801 10.295 7.34206 10.0177 7.61931L8.1462 9.49081C7.97433 9.66268 7.69567 9.66268 7.5238 9.49081Z" fill="#171717"/>
+<path d="M14.57 8.335C14.57 12.0546 11.5546 15.07 7.835 15.07C4.11536 15.07 1.1 12.0546 1.1 8.335C1.1 4.61536 4.11536 1.6 7.835 1.6C11.5546 1.6 14.57 4.61536 14.57 8.335Z" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
-
-
diff --git a/frontend/resources/flowy_icons/16x/text.svg b/frontend/resources/flowy_icons/16x/text.svg
index 2a9b3fac61..1862ea1801 100644
--- a/frontend/resources/flowy_icons/16x/text.svg
+++ b/frontend/resources/flowy_icons/16x/text.svg
@@ -1,9 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0.649992 3.3085C0.649992 3.0494 0.860038 2.83936 1.11914 2.83936H14.8808C15.242 2.83936 15.4677 3.23031 15.2871 3.54308C15.2033 3.68823 15.0485 3.77765 14.8808 3.77765H1.11914C0.860038 3.77765 0.649992 3.56761 0.649992 3.3085ZM1.11914 6.90531H11.1276C11.4888 6.90531 11.7145 6.51436 11.5339 6.20159C11.4501 6.05643 11.2953 5.96701 11.1276 5.96701H1.11914C0.757992 5.96701 0.532271 6.35797 0.712845 6.67074C0.796652 6.8159 0.951527 6.90531 1.11914 6.90531ZM14.8808 9.09468H1.11914C0.757992 9.09468 0.532271 9.48563 0.712845 9.7984C0.796652 9.94356 0.951527 10.033 1.11914 10.033H14.8808C15.242 10.033 15.4677 9.64201 15.2871 9.32925C15.2033 9.18409 15.0485 9.09468 14.8808 9.09468ZM11.1276 12.2223H1.11914C0.757992 12.2223 0.532271 12.6133 0.712845 12.9261C0.796652 13.0712 0.951527 13.1606 1.11914 13.1606H11.1276C11.4888 13.1606 11.7145 12.7697 11.5339 12.4569C11.4501 12.3118 11.2953 12.2223 11.1276 12.2223Z" fill="black"/>
+<path d="M15.2 13.292V10.8157M15.2 10.8157V8.33939M15.2 10.8157C15.2 12.1833 14.0913 13.292 12.7236 13.292C11.356 13.292 10.2473 12.1833 10.2473 10.8157C10.2473 9.44807 11.356 8.33939 12.7236 8.33939C14.0913 8.33939 15.2 9.44807 15.2 10.8157Z" stroke="#171717" stroke-width="1.15" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M8.25275 13.464L6.99032 9.94589L6.97947 9.94599H2.66533L2.65451 9.94589L1.39209 13.464C1.27052 13.8028 0.914247 13.9724 0.596318 13.8429C0.278388 13.7133 0.119201 13.3337 0.240762 12.9949L3.95892 2.63325C4.2619 1.78892 5.38293 1.78892 5.68591 2.63325L9.40407 12.9949C9.52563 13.3337 9.36644 13.7133 9.04851 13.8429C8.73058 13.9724 8.37431 13.8028 8.25275 13.464ZM4.82242 3.90443L3.12577 8.6326H6.51906L4.82242 3.90443Z" fill="#171717"/>
</svg>
-
-
-
-
-
-
diff --git a/frontend/resources/flowy_icons/16x/time.svg b/frontend/resources/flowy_icons/16x/time.svg
index 634af3e361..cb3f6ca112 100644
--- a/frontend/resources/flowy_icons/16x/time.svg
+++ b/frontend/resources/flowy_icons/16x/time.svg
@@ -1,4 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M8 13C10.7614 13 13 10.7614 13 8C13 5.23858 10.7614 3 8 3C5.23858 3 3 5.23858 3 8C3 10.7614 5.23858 13 8 13Z" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M8 5V8L10 9" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M14.8 8.00001C14.8 11.7536 11.7536 14.8 7.99995 14.8C4.24635 14.8 1.19995 11.7536 1.19995 8.00001C1.19995 4.24641 4.24635 1.20001 7.99995 1.20001C11.7536 1.20001 14.8 4.24641 14.8 8.00001Z" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M10.5227 10.1624L8.41466 8.90441C8.04746 8.68681 7.74826 8.16321 7.74826 7.73481V4.94681" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
diff --git a/frontend/resources/flowy_icons/16x/url.svg b/frontend/resources/flowy_icons/16x/url.svg
index 5624e62db4..0b0d678074 100644
--- a/frontend/resources/flowy_icons/16x/url.svg
+++ b/frontend/resources/flowy_icons/16x/url.svg
@@ -1,6 +1,10 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6.7619 8.61904C7.02775 8.97445 7.36693 9.26853 7.75643 9.48134C8.14593 9.69414 8.57664 9.82068 9.01935 9.85239C9.46206 9.8841 9.90641 9.82022 10.3223 9.6651C10.7381 9.50997 11.1157 9.26723 11.4295 8.95333L13.2867 7.09618C13.8505 6.51241 14.1625 5.73055 14.1554 4.91899C14.1484 4.10743 13.8228 3.3311 13.249 2.75722C12.6751 2.18334 11.8988 1.85782 11.0872 1.85076C10.2756 1.84371 9.49377 2.15569 8.91 2.71952L7.84524 3.77809" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M9.23811 7.38095C8.97226 7.02554 8.63308 6.73146 8.24358 6.51866C7.85408 6.30585 7.42337 6.17931 6.98066 6.1476C6.53796 6.1159 6.09361 6.17977 5.67776 6.3349C5.26191 6.49002 4.88428 6.73277 4.5705 7.04667L2.71335 8.90381C2.14953 9.48758 1.83755 10.2694 1.8446 11.081C1.85165 11.8926 2.17717 12.6689 2.75106 13.2428C3.32494 13.8167 4.10126 14.1422 4.91282 14.1492C5.72439 14.1563 6.50625 13.8443 7.09002 13.2805L8.14859 12.2219" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
+<g clip-path="url(#clip0_3140_1253)">
+<path d="M5.56032 10.4406L10.44 5.56085M3.73075 7.39055L2.51082 8.61048C1.16332 9.95798 1.16293 12.1429 2.51043 13.4904C3.85793 14.8379 6.0433 14.8375 7.3908 13.49L8.60943 12.2702M7.39002 3.73043L8.60995 2.5105C9.95745 1.16301 12.1419 1.16325 13.4894 2.51074C14.8369 3.85824 14.8368 6.04299 13.4893 7.39049L12.2701 8.61038" stroke="#171717" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
+</g>
+<defs>
+<clipPath id="clip0_3140_1253">
+<rect width="16" height="16" fill="white"/>
+</clipPath>
+</defs>
</svg>
-
-
diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock
index 2948912495..efceee40b1 100644
--- a/frontend/rust-lib/Cargo.lock
+++ b/frontend/rust-lib/Cargo.lock
@@ -276,17 +276,6 @@ dependencies = [
"pin-project-lite",
]
-[[package]]
-name = "async-recursion"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.47",
-]
-
[[package]]
name = "async-stream"
version = "0.3.5"
@@ -848,7 +837,7 @@ dependencies = [
[[package]]
name = "collab"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -873,7 +862,7 @@ dependencies = [
[[package]]
name = "collab-database"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"async-trait",
@@ -912,7 +901,7 @@ dependencies = [
[[package]]
name = "collab-document"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -933,7 +922,7 @@ dependencies = [
[[package]]
name = "collab-entity"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"bytes",
@@ -953,7 +942,7 @@ dependencies = [
[[package]]
name = "collab-folder"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"arc-swap",
@@ -974,10 +963,10 @@ dependencies = [
[[package]]
name = "collab-importer"
version = "0.1.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
- "async-recursion",
+ "async-trait",
"base64 0.22.1",
"chrono",
"collab",
@@ -986,6 +975,7 @@ dependencies = [
"collab-entity",
"collab-folder",
"fancy-regex 0.13.0",
+ "futures",
"fxhash",
"hex",
"markdown",
@@ -1027,7 +1017,7 @@ dependencies = [
[[package]]
name = "collab-plugins"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"async-stream",
@@ -1107,7 +1097,7 @@ dependencies = [
[[package]]
name = "collab-user"
version = "0.2.0"
-source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=44efb8214aaf1bb7326401b891af0626886509ce#44efb8214aaf1bb7326401b891af0626886509ce"
+source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=b3581aad2dcea8c02c807858e05b62358e38c24e#b3581aad2dcea8c02c807858e05b62358e38c24e"
dependencies = [
"anyhow",
"collab",
diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml
index c57eca856f..5a238ab5ad 100644
--- a/frontend/rust-lib/Cargo.toml
+++ b/frontend/rust-lib/Cargo.toml
@@ -142,14 +142,14 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120
# To switch to the local path, run:
# scripts/tool/update_collab_source.sh
# ⚠️⚠️⚠️️
-collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
-collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "44efb8214aaf1bb7326401b891af0626886509ce" }
+collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
+collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "b3581aad2dcea8c02c807858e05b62358e38c24e" }
# Working directory: frontend
# To update the commit ID, run:
diff --git a/frontend/rust-lib/flowy-database2/src/entities/field_entities.rs b/frontend/rust-lib/flowy-database2/src/entities/field_entities.rs
index b8d4dd6e6d..da11523380 100644
--- a/frontend/rust-lib/flowy-database2/src/entities/field_entities.rs
+++ b/frontend/rust-lib/flowy-database2/src/entities/field_entities.rs
@@ -10,6 +10,7 @@ use strum_macros::{EnumCount as EnumCountMacro, EnumIter};
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
use flowy_error::ErrorCode;
+use lib_infra::validator_fn::required_not_empty_str;
use validator::Validate;
use crate::entities::parser::NotEmptyStr;
@@ -27,12 +28,15 @@ pub struct FieldPB {
pub name: String,
#[pb(index = 3)]
+ pub icon: String,
+
+ #[pb(index = 4)]
pub field_type: FieldType,
- #[pb(index = 6)]
+ #[pb(index = 5)]
pub is_primary: bool,
- #[pb(index = 7)]
+ #[pb(index = 6)]
pub type_option_data: Vec<u8>,
}
@@ -45,6 +49,7 @@ impl FieldPB {
Self {
id: field.id,
name: field.name,
+ icon: field.icon,
field_type,
is_primary: field.is_primary,
type_option_data: type_option_to_pb(type_option, &field_type).to_vec(),
@@ -152,12 +157,15 @@ pub struct CreateFieldPayloadPB {
#[pb(index = 3, one_of)]
pub field_name: Option<String>,
+ #[pb(index = 4, one_of)]
+ pub field_icon: Option<String>,
+
/// If the type_option_data is not empty, it will be used to create the field.
/// Otherwise, the default value will be used.
- #[pb(index = 4, one_of)]
+ #[pb(index = 5, one_of)]
pub type_option_data: Option<Vec<u8>>,
- #[pb(index = 5)]
+ #[pb(index = 6)]
pub field_position: OrderObjectPositionPB,
}
@@ -369,53 +377,29 @@ impl TryInto<GetFieldParams> for GetFieldPayloadPB {
/// Pass in None if you don't want to modify a property
/// Pass in Some(Value) if you want to modify a property
///
-#[derive(Debug, Clone, Default, ProtoBuf)]
+#[derive(Debug, Clone, Default, ProtoBuf, Validate)]
pub struct FieldChangesetPB {
#[pb(index = 1)]
+ #[validate(custom = "required_not_empty_str")]
pub field_id: String,
#[pb(index = 2)]
+ #[validate(custom = "required_not_empty_str")]
pub view_id: String,
#[pb(index = 3, one_of)]
pub name: Option<String>,
#[pb(index = 4, one_of)]
- pub desc: Option<String>,
+ pub icon: Option<String>,
#[pb(index = 5, one_of)]
- pub frozen: Option<bool>,
-}
-
-impl TryInto<FieldChangesetParams> for FieldChangesetPB {
- type Error = ErrorCode;
-
- fn try_into(self) -> Result<FieldChangesetParams, Self::Error> {
- let view_id = NotEmptyStr::parse(self.view_id).map_err(|_| ErrorCode::DatabaseIdIsEmpty)?;
- let field_id = NotEmptyStr::parse(self.field_id).map_err(|_| ErrorCode::FieldIdIsEmpty)?;
-
- Ok(FieldChangesetParams {
- field_id: field_id.0,
- view_id: view_id.0,
- name: self.name,
- desc: self.desc,
- frozen: self.frozen,
- })
- }
-}
-
-#[derive(Debug, Clone, Default)]
-pub struct FieldChangesetParams {
- pub field_id: String,
-
- pub view_id: String,
-
- pub name: Option<String>,
-
pub desc: Option<String>,
+ #[pb(index = 6, one_of)]
pub frozen: Option<bool>,
}
+
/// Certain field types have user-defined options such as color, date format, number format,
/// or a list of values for a multi-select list. These options are defined within a specialization
/// of the FieldTypeOption class.
diff --git a/frontend/rust-lib/flowy-database2/src/event_handler.rs b/frontend/rust-lib/flowy-database2/src/event_handler.rs
index 6aaa11f830..2966220224 100644
--- a/frontend/rust-lib/flowy-database2/src/event_handler.rs
+++ b/frontend/rust-lib/flowy-database2/src/event_handler.rs
@@ -266,7 +266,7 @@ pub(crate) async fn update_field_handler(
manager: AFPluginState<Weak<DatabaseManager>>,
) -> Result<(), FlowyError> {
let manager = upgrade_manager(manager)?;
- let params: FieldChangesetParams = data.into_inner().try_into()?;
+ let params = data.try_into_inner()?;
let database_editor = manager
.get_database_editor_with_view_id(&params.view_id)
.await?;
diff --git a/frontend/rust-lib/flowy-database2/src/manager.rs b/frontend/rust-lib/flowy-database2/src/manager.rs
index 4ce5f3c8bc..1b8d72779a 100644
--- a/frontend/rust-lib/flowy-database2/src/manager.rs
+++ b/frontend/rust-lib/flowy-database2/src/manager.rs
@@ -443,7 +443,7 @@ impl DatabaseManager {
let mut csv_template = CSVTemplate::try_from_reader(content.as_bytes(), true, None)?;
csv_template.reset_view_id(view_id.clone());
- let database_template = csv_template.try_into_database_template().await?;
+ let database_template = csv_template.try_into_database_template(None).await?;
database_template.into_params()
},
CSVFormat::META => tokio::task::spawn_blocking(move || {
diff --git a/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs b/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
index 134740d672..c9ddda3247 100644
--- a/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
+++ b/frontend/rust-lib/flowy-database2/src/services/database/database_editor.rs
@@ -384,10 +384,12 @@ impl DatabaseEditor {
database.get_fields_in_view(view_id, Some(field_ids))
}
- pub async fn update_field(&self, params: FieldChangesetParams) -> FlowyResult<()> {
+ pub async fn update_field(&self, params: FieldChangesetPB) -> FlowyResult<()> {
let mut database = self.database.write().await;
database.update_field(&params.field_id, |update| {
- update.set_name_if_not_none(params.name);
+ update
+ .set_name_if_not_none(params.name)
+ .set_icon_if_not_none(params.icon);
});
notify_did_update_database_field(&database, &params.field_id)?;
Ok(())
diff --git a/frontend/rust-lib/flowy-database2/tests/database/field_test/script.rs b/frontend/rust-lib/flowy-database2/tests/database/field_test/script.rs
index c2c3472395..c61355fcbb 100644
--- a/frontend/rust-lib/flowy-database2/tests/database/field_test/script.rs
+++ b/frontend/rust-lib/flowy-database2/tests/database/field_test/script.rs
@@ -1,6 +1,6 @@
use collab_database::fields::{Field, TypeOptionData};
-use flowy_database2::entities::{CreateFieldParams, FieldChangesetParams, FieldType};
+use flowy_database2::entities::{CreateFieldParams, FieldChangesetPB, FieldType};
use flowy_database2::services::cell::stringify_cell;
use crate::database::database_editor::DatabaseEditorTest;
@@ -10,7 +10,7 @@ pub enum FieldScript {
params: CreateFieldParams,
},
UpdateField {
- changeset: FieldChangesetParams,
+ changeset: FieldChangesetPB,
},
DeleteField {
field: Field,
diff --git a/frontend/rust-lib/flowy-database2/tests/database/field_test/test.rs b/frontend/rust-lib/flowy-database2/tests/database/field_test/test.rs
index 86f5290d24..25f8341d77 100644
--- a/frontend/rust-lib/flowy-database2/tests/database/field_test/test.rs
+++ b/frontend/rust-lib/flowy-database2/tests/database/field_test/test.rs
@@ -1,6 +1,6 @@
use collab_database::database::gen_option_id;
use collab_database::fields::select_type_option::{SelectOption, SelectTypeOption};
-use flowy_database2::entities::{FieldChangesetParams, FieldType};
+use flowy_database2::entities::{FieldChangesetPB, FieldType};
use flowy_database2::services::field::{CHECK, UNCHECK};
use crate::database::field_test::script::DatabaseFieldTest;
@@ -87,7 +87,7 @@ async fn grid_update_field_with_empty_change() {
test.run_scripts(scripts).await;
let field = test.get_fields().await.pop().unwrap().clone();
- let changeset = FieldChangesetParams {
+ let changeset = FieldChangesetPB {
field_id: field.id.clone(),
view_id: test.view_id(),
..Default::default()
diff --git a/frontend/scripts/tool/update_collab_source.sh b/frontend/scripts/tool/update_collab_source.sh
index fcf8ae9744..d73c62c033 100755
--- a/frontend/scripts/tool/update_collab_source.sh
+++ b/frontend/scripts/tool/update_collab_source.sh
@@ -15,7 +15,7 @@ switch_deps() {
if grep -q 'git = "https://github.com/AppFlowy-IO/AppFlowy-Collab"' "$cargo_toml"; then
cp "$cargo_toml" "$cargo_toml.bak"
# Switch to local paths
- for crate in collab collab-folder collab-document collab-database collab-plugins collab-user collab-entity collab-sync-protocol collab-persistence; do
+ for crate in collab collab-folder collab-document collab-database collab-plugins collab-user collab-entity collab-sync-protocol collab-persistence collab-importer; do
sed -i '' \
-e "s#${crate} = { .*git = \"https://github.com/AppFlowy-IO/AppFlowy-Collab\".* }#${crate} = { path = \"$repo_path/$crate\" }#g" \
"$cargo_toml"