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.

fix: several grid ui improvements (#1347)

Richard Shiue58ad9a260c9e
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_cell.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_cell.dart
index 3213adff81..e6e1e10114 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_cell.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/date_cell/date_cell.dart
@@ -68,7 +68,7 @@ class _DateCellState extends GridCellState<GridDateCell> {
controller: _popover,
triggerActions: PopoverTriggerFlags.none,
direction: PopoverDirection.bottomWithLeftAligned,
- constraints: BoxConstraints.loose(const Size(320, 500)),
+ constraints: BoxConstraints.loose(const Size(320, 520)),
margin: EdgeInsets.zero,
child: SizedBox.expand(
child: GestureDetector(
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/date.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/date.dart
index 954c933511..7ca3d4ad28 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/date.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/date.dart
@@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:appflowy_popover/appflowy_popover.dart';
import '../../../layout/sizes.dart';
+import '../../common/text_field.dart';
import '../field_type_option_editor.dart';
import 'builder.dart';
@@ -53,11 +54,14 @@ class DateTypeOptionWidget extends TypeOptionWidget {
listener: (context, state) =>
typeOptionContext.typeOption = state.typeOption,
builder: (context, state) {
- return Column(children: [
- _renderDateFormatButton(context, state.typeOption.dateFormat),
- _renderTimeFormatButton(context, state.typeOption.timeFormat),
- const _IncludeTimeButton(),
- ]);
+ return Column(
+ children: [
+ const TypeOptionSeparator(),
+ _renderDateFormatButton(context, state.typeOption.dateFormat),
+ _renderTimeFormatButton(context, state.typeOption.timeFormat),
+ const _IncludeTimeButton(),
+ ],
+ );
},
),
);
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/number.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/number.dart
index bf82aecabc..800813fa54 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/number.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/number.dart
@@ -31,7 +31,12 @@ class NumberTypeOptionWidgetBuilder extends TypeOptionWidgetBuilder {
);
@override
- Widget? build(BuildContext context) => _widget;
+ Widget? build(BuildContext context) {
+ return Column(children: [
+ const TypeOptionSeparator(),
+ _widget,
+ ]);
+ }
}
class NumberTypeOptionWidget extends TypeOptionWidget {
diff --git a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/select_option.dart b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/select_option.dart
index 00d1ea6332..ee35d208f9 100644
--- a/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/select_option.dart
+++ b/frontend/app_flowy/lib/plugins/grid/presentation/widgets/header/type_option/select_option.dart
@@ -66,12 +66,17 @@ class OptionTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
+ final theme = context.read<AppTheme>();
return BlocBuilder<SelectOptionTypeOptionBloc, SelectOptionTypeOptionState>(
builder: (context, state) {
List<Widget> children = [
- FlowyText.medium(LocaleKeys.grid_field_optionTitle.tr(), fontSize: 12)
+ FlowyText.medium(
+ LocaleKeys.grid_field_optionTitle.tr(),
+ fontSize: 12,
+ color: theme.shader3,
+ )
];
- if (state.options.isNotEmpty) {
+ if (state.options.isNotEmpty && !state.isEditingOption) {
children.add(const Spacer());
children.add(const _OptionTitleButton());
}