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.

chore: adjust ui

appflowy8a8791b880ad
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_checkbox_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_checkbox_cell.dart
index c816964d3c..25aacb5678 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_checkbox_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_checkbox_cell.dart
@@ -5,6 +5,8 @@ import 'package:flowy_infra_ui/style_widget/icon_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardCheckboxCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
@@ -38,12 +40,17 @@ class _BoardCheckboxCellState extends State<BoardCheckboxCell> {
final icon = state.isSelected
? svgWidget('editor/editor_check')
: svgWidget('editor/editor_uncheck');
- return Align(
- alignment: Alignment.centerLeft,
- child: FlowyIconButton(
- iconPadding: EdgeInsets.zero,
- icon: icon,
- width: 20,
+ return Padding(
+ padding: EdgeInsets.symmetric(
+ vertical: BoardSizes.cardCellVPading,
+ ),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: FlowyIconButton(
+ iconPadding: EdgeInsets.zero,
+ icon: icon,
+ width: 20,
+ ),
),
);
},
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_date_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_date_cell.dart
index 4a52d82116..7c7386696d 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_date_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_date_cell.dart
@@ -1,9 +1,12 @@
import 'package:app_flowy/plugins/board/application/card/board_date_cell_bloc.dart';
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
+import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardDateCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
@@ -40,9 +43,15 @@ class _BoardDateCellState extends State<BoardDateCell> {
} else {
return Align(
alignment: Alignment.centerLeft,
- child: FlowyText.regular(
- state.dateStr,
- fontSize: 14,
+ child: Padding(
+ padding: EdgeInsets.symmetric(
+ vertical: BoardSizes.cardCellVPading,
+ ),
+ child: FlowyText.regular(
+ state.dateStr,
+ fontSize: 13,
+ color: context.read<AppTheme>().shader3,
+ ),
),
);
}
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_number_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_number_cell.dart
index 096592583e..965c06e643 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_number_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_number_cell.dart
@@ -4,6 +4,8 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardNumberCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
@@ -38,11 +40,15 @@ class _BoardNumberCellState extends State<BoardNumberCell> {
if (state.content.isEmpty) {
return const SizedBox();
} else {
- return Align(
- alignment: Alignment.centerLeft,
- child: FlowyText.regular(
- state.content,
- fontSize: 14,
+ return Padding(
+ padding:
+ EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: FlowyText.medium(
+ state.content,
+ fontSize: 14,
+ ),
),
);
}
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
index a51a36f99f..9865875e44 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_select_option_cell.dart
@@ -4,6 +4,8 @@ import 'package:app_flowy/plugins/grid/presentation/widgets/cell/select_option_c
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardSelectOptionCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
@@ -42,10 +44,13 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
),
)
.toList();
- return Align(
- alignment: Alignment.centerLeft,
- child: AbsorbPointer(
- child: Wrap(children: children, spacing: 4, runSpacing: 2),
+ return Padding(
+ padding: EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: AbsorbPointer(
+ child: Wrap(children: children, spacing: 4, runSpacing: 2),
+ ),
),
);
},
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart
index 2da156ded8..89b193edc5 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_text_cell.dart
@@ -4,6 +4,8 @@ import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardTextCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
const BoardTextCell({required this.cellControllerBuilder, Key? key})
@@ -37,11 +39,10 @@ class _BoardTextCellState extends State<BoardTextCell> {
} else {
return Align(
alignment: Alignment.centerLeft,
- child: ConstrainedBox(
- constraints: BoxConstraints.loose(
- const Size(double.infinity, 100),
- ),
- child: FlowyText.regular(
+ child: Padding(
+ padding:
+ EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
+ child: FlowyText.medium(
state.content,
fontSize: 14,
),
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/board_url_cell.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/board_url_cell.dart
index 31cca41e6a..5940e71788 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/board_url_cell.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/board_url_cell.dart
@@ -4,6 +4,8 @@ import 'package:flowy_infra/theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'define.dart';
+
class BoardUrlCell extends StatefulWidget {
final GridCellControllerBuilder cellControllerBuilder;
@@ -38,16 +40,20 @@ class _BoardUrlCellState extends State<BoardUrlCell> {
if (state.content.isEmpty) {
return const SizedBox();
} else {
- return Align(
- alignment: Alignment.centerLeft,
- child: RichText(
- textAlign: TextAlign.left,
- text: TextSpan(
- text: state.content,
- style: TextStyle(
- color: theme.main2,
- fontSize: 14,
- decoration: TextDecoration.underline,
+ return Padding(
+ padding:
+ EdgeInsets.symmetric(vertical: BoardSizes.cardCellVPading),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: RichText(
+ textAlign: TextAlign.left,
+ text: TextSpan(
+ text: state.content,
+ style: TextStyle(
+ color: theme.main2,
+ fontSize: 14,
+ decoration: TextDecoration.underline,
+ ),
),
),
),
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/card.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/card.dart
index 226a9e8241..ac65d5e5f7 100644
--- a/frontend/app_flowy/lib/plugins/board/presentation/card/card.dart
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/card.dart
@@ -73,7 +73,7 @@ class _BoardCardState extends State<BoardCard> {
(cellId) {
final child = widget.cellBuilder.buildCell(cellId);
return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 5),
+ padding: const EdgeInsets.symmetric(horizontal: 6),
child: child,
);
},
diff --git a/frontend/app_flowy/lib/plugins/board/presentation/card/define.dart b/frontend/app_flowy/lib/plugins/board/presentation/card/define.dart
new file mode 100644
index 0000000000..ced0fefb83
--- /dev/null
+++ b/frontend/app_flowy/lib/plugins/board/presentation/card/define.dart
@@ -0,0 +1,3 @@
+class BoardSizes {
+ static double get cardCellVPading => 4;
+}
diff --git a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/context_builder.dart b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/context_builder.dart
index f3ed73b449..95c708e0e2 100644
--- a/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/context_builder.dart
+++ b/frontend/app_flowy/lib/plugins/grid/application/cell/cell_service/context_builder.dart
@@ -279,7 +279,6 @@ class IGridCellController<T, D> extends Equatable {
_loadDataOperation?.cancel();
_loadDataOperation = Timer(const Duration(milliseconds: 10), () {
_cellDataLoader.loadData().then((data) {
- Log.debug('$fieldId CellData: Did Get cell data');
_cellsCache.insert(_cacheKey, GridCell(object: data));
_cellDataNotifier?.value = data;
});
diff --git a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart b/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart
index 5df7ce54ff..854936ea29 100644
--- a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart
+++ b/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart
@@ -114,7 +114,7 @@ class _MultiBoardListExampleState extends State<MultiBoardListExample> {
return Align(
alignment: Alignment.centerLeft,
child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 40),
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 60),
child: Text(item.s),
),
);
@@ -124,7 +124,7 @@ class _MultiBoardListExampleState extends State<MultiBoardListExample> {
return Align(
alignment: Alignment.centerLeft,
child: Padding(
- padding: const EdgeInsets.all(20),
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 60),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [