Skip to content

Commit 90ded00

Browse files
authored
Merge pull request #1049 from AppFlowy-IO/feat/merge_release_0051
Feat/merge release 0051
2 parents 988e8db + 1de3999 commit 90ded00

File tree

25 files changed

+330
-84
lines changed

25 files changed

+330
-84
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release Notes
22

3+
## Version 0.0.5.1 - 09/14/2022
4+
5+
New features
6+
- Enable deleting a field in board
7+
- Fix some bugs
8+
9+
10+
## Version 0.0.5 - 09/08/2022
11+
New Features - Kanban Board like Notion and Trello beta
12+
Boards are the best way to manage projects & tasks. Use them to group your databases by select, multiselect, and checkbox.
13+
14+
<p align="left"><img src="https://user-images.githubusercontent.com/12026239/190055984-6efa2d7a-ee38-4551-859e-ee56388e1859.gif" width="1000px" /></p>
15+
16+
- Set up columns that represent a specific phase of the project cycle and use cards to represent each project / task
17+
- Drag and drop a card from one phase / column to another phase / column
18+
- Update database properties in the Board view by clicking on a property and making edits on the card
19+
20+
### Other Features & Improvements
21+
- Settings allow users to change avatars
22+
- Click and drag the right edge to resize your sidebar
23+
- And many user interface improvements (link)
24+
325
## Version 0.0.5 - beta.2 - beta.1 - 09/01/2022
426

527
New features

frontend/Makefile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
2222
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
2323
CARGO_MAKE_CRATE_NAME = "dart-ffi"
2424
LIB_NAME = "dart_ffi"
25-
CURRENT_APP_VERSION = "0.0.5"
25+
CURRENT_APP_VERSION = "0.0.5.1"
2626
FEATURES = "flutter"
2727
PRODUCT_NAME = "AppFlowy"
2828
# CRATE_TYPE: https://doc.rust-lang.org/reference/linkage.html

frontend/app_flowy/assets/translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@
191191
"optionTitle": "Options",
192192
"addOption": "Add option",
193193
"editProperty": "Edit property",
194-
"newColumn": "New column"
194+
"newColumn": "New column",
195+
"deleteFieldPromptMessage": "Are you sure? This property will be deleted"
195196
},
196197
"row": {
197198
"duplicate": "Duplicate",

frontend/app_flowy/lib/plugins/board/presentation/board_page.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,13 @@ class _BoardContentState extends State<BoardContent> {
287287
);
288288
}
289289

290-
void _openCard(String gridId, GridFieldController fieldController,
291-
RowPB rowPB, GridRowCache rowCache, BuildContext context) {
290+
void _openCard(
291+
String gridId,
292+
GridFieldController fieldController,
293+
RowPB rowPB,
294+
GridRowCache rowCache,
295+
BuildContext context,
296+
) {
292297
final rowInfo = RowInfo(
293298
gridId: gridId,
294299
fields: UnmodifiableListView(fieldController.fieldContexts),

frontend/app_flowy/lib/plugins/doc/document.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ class DocumentShareButton extends StatelessWidget {
186186
'Exported to: ${LocaleKeys.notifications_export_path.tr()}');
187187
break;
188188
case ShareAction.copyLink:
189-
FlowyAlertDialog(title: LocaleKeys.shareAction_workInProgress.tr())
189+
NavigatorAlertDialog(
190+
title: LocaleKeys.shareAction_workInProgress.tr())
190191
.show(context);
191192
break;
192193
}

frontend/app_flowy/lib/plugins/doc/presentation/toolbar/link_button.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
8484
value = values.first;
8585
}
8686

87-
TextFieldDialog(
87+
NavigatorTextFieldDialog(
8888
title: 'URL',
8989
value: value,
9090
confirm: (newValue) {

frontend/app_flowy/lib/plugins/grid/application/field/field_editor_bloc.dart

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:flowy_sdk/protobuf/flowy-grid/field_entities.pb.dart';
22
import 'package:flutter_bloc/flutter_bloc.dart';
33
import 'dart:async';
44
import 'package:dartz/dartz.dart';
5+
import 'field_service.dart';
56
import 'type_option/type_option_context.dart';
67
import 'package:freezed_annotation/freezed_annotation.dart';
78

@@ -15,10 +16,11 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
1516
FieldEditorBloc({
1617
required String gridId,
1718
required String fieldName,
19+
required bool isGroupField,
1820
required IFieldTypeOptionLoader loader,
1921
}) : dataController =
2022
TypeOptionDataController(gridId: gridId, loader: loader),
21-
super(FieldEditorState.initial(gridId, fieldName)) {
23+
super(FieldEditorState.initial(gridId, fieldName, isGroupField)) {
2224
on<FieldEditorEvent>(
2325
(event, emit) async {
2426
await event.when(
@@ -35,7 +37,23 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
3537
emit(state.copyWith(name: name));
3638
},
3739
didReceiveFieldChanged: (FieldPB field) {
38-
emit(state.copyWith(field: Some(field), name: field.name));
40+
emit(state.copyWith(
41+
field: Some(field),
42+
name: field.name,
43+
canDelete: field.isPrimary,
44+
));
45+
},
46+
deleteField: () {
47+
state.field.fold(
48+
() => null,
49+
(field) {
50+
final fieldService = FieldService(
51+
gridId: gridId,
52+
fieldId: field.id,
53+
);
54+
fieldService.deleteField();
55+
},
56+
);
3957
},
4058
);
4159
},
@@ -52,6 +70,7 @@ class FieldEditorBloc extends Bloc<FieldEditorEvent, FieldEditorState> {
5270
class FieldEditorEvent with _$FieldEditorEvent {
5371
const factory FieldEditorEvent.initial() = _InitialField;
5472
const factory FieldEditorEvent.updateName(String name) = _UpdateName;
73+
const factory FieldEditorEvent.deleteField() = _DeleteField;
5574
const factory FieldEditorEvent.didReceiveFieldChanged(FieldPB field) =
5675
_DidReceiveFieldChanged;
5776
}
@@ -63,16 +82,21 @@ class FieldEditorState with _$FieldEditorState {
6382
required String errorText,
6483
required String name,
6584
required Option<FieldPB> field,
85+
required bool canDelete,
86+
required bool isGroupField,
6687
}) = _FieldEditorState;
6788

6889
factory FieldEditorState.initial(
6990
String gridId,
7091
String fieldName,
92+
bool isGroupField,
7193
) =>
7294
FieldEditorState(
7395
gridId: gridId,
7496
errorText: '',
7597
field: none(),
98+
canDelete: false,
7699
name: fieldName,
100+
isGroupField: isGroupField,
77101
);
78102
}

frontend/app_flowy/lib/plugins/grid/application/row/row_detail_bloc.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
2+
import 'package:app_flowy/plugins/grid/application/field/field_service.dart';
23
import 'package:flutter_bloc/flutter_bloc.dart';
34
import 'package:freezed_annotation/freezed_annotation.dart';
45
import 'dart:async';
@@ -24,6 +25,13 @@ class RowDetailBloc extends Bloc<RowDetailEvent, RowDetailState> {
2425
didReceiveCellDatas: (_DidReceiveCellDatas value) {
2526
emit(state.copyWith(gridCells: value.gridCells));
2627
},
28+
deleteField: (_DeleteField value) {
29+
final fieldService = FieldService(
30+
gridId: dataController.rowInfo.gridId,
31+
fieldId: value.fieldId,
32+
);
33+
fieldService.deleteField();
34+
},
2735
);
2836
},
2937
);
@@ -49,6 +57,7 @@ class RowDetailBloc extends Bloc<RowDetailEvent, RowDetailState> {
4957
@freezed
5058
class RowDetailEvent with _$RowDetailEvent {
5159
const factory RowDetailEvent.initial() = _Initial;
60+
const factory RowDetailEvent.deleteField(String fieldId) = _DeleteField;
5261
const factory RowDetailEvent.didReceiveCellDatas(
5362
List<GridCellIdentifier> gridCells) = _DidReceiveCellDatas;
5463
}

frontend/app_flowy/lib/plugins/grid/presentation/grid_page.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,7 @@ class _GridFooter extends StatelessWidget {
317317
height: GridSize.footerHeight,
318318
child: Padding(
319319
padding: GridSize.footerContentInsets,
320-
child: const Expanded(
321-
child: SizedBox(height: 40, child: GridAddRowButton()),
322-
),
320+
child: const SizedBox(height: 40, child: GridAddRowButton()),
323321
),
324322
),
325323
),

frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/field_cell_action_sheet.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:app_flowy/plugins/grid/application/field/type_option/type_option
22
import 'package:app_flowy/plugins/grid/presentation/widgets/header/field_editor.dart';
33
import 'package:app_flowy/startup/startup.dart';
44
import 'package:app_flowy/plugins/grid/application/prelude.dart';
5+
import 'package:app_flowy/workspace/presentation/widgets/dialogs.dart';
56
import 'package:flowy_infra/image.dart';
67
import 'package:flowy_infra/theme.dart';
78
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
@@ -168,7 +169,7 @@ class FieldActionCell extends StatelessWidget {
168169
}
169170
},
170171
leftIcon: svgWidget(action.iconName(),
171-
color: enable ? theme.iconColor : theme.disableIconColor),
172+
color: enable ? theme.iconColor : theme.disableIconColor),
172173
);
173174
}
174175
}
@@ -215,9 +216,15 @@ extension _FieldActionExtension on FieldAction {
215216
.add(const FieldActionSheetEvent.duplicateField());
216217
break;
217218
case FieldAction.delete:
218-
context
219-
.read<FieldActionSheetBloc>()
220-
.add(const FieldActionSheetEvent.deleteField());
219+
NavigatorAlertDialog(
220+
title: LocaleKeys.grid_field_deleteFieldPromptMessage.tr(),
221+
confirm: () {
222+
context
223+
.read<FieldActionSheetBloc>()
224+
.add(const FieldActionSheetEvent.deleteField());
225+
},
226+
).show(context);
227+
221228
break;
222229
}
223230
}

0 commit comments

Comments
 (0)