fix: mobile ui improv and bugs (#4567)

* fix: quick edit field bottom sheet header

* fix: field editor appbar regression

This stems from moving to a standardized FlowyAppBar
This commit is contained in:
Richard Shiue 2024-02-01 10:27:03 +08:00 committed by GitHub
parent 99f9cb2a09
commit 9d28360887
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/base/app_bar.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_field_type_option_editor.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
import 'package:appflowy/util/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
import 'package:easy_localization/easy_localization.dart';

View File

@ -1,6 +1,6 @@
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/base/app_bar.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_field_type_option_editor.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
import 'package:appflowy/plugins/database/application/field/field_backend_service.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
import 'package:appflowy/plugins/database/application/field/field_service.dart';
@ -56,6 +56,7 @@ class _MobileEditPropertyScreenState extends State<MobileEditPropertyScreen> {
child: Scaffold(
appBar: FlowyAppBar(
titleText: LocaleKeys.grid_field_editProperty.tr(),
onTapLeading: () => context.pop(_fieldOptionValues),
),
body: MobileFieldEditor(
mode: FieldOptionMode.edit,

View File

@ -13,7 +13,7 @@ import 'package:go_router/go_router.dart';
import 'mobile_create_field_screen.dart';
import 'mobile_edit_field_screen.dart';
import 'mobile_field_picker_list.dart';
import 'mobile_field_type_option_editor.dart';
import 'mobile_full_field_editor.dart';
import 'mobile_quick_field_editor.dart';
const mobileSupportedFieldTypes = [
@ -113,6 +113,7 @@ void showQuickEditField(
padding: EdgeInsets.zero,
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
resizeToAvoidBottomInset: true,
showDragHandle: true,
builder: (context) {
return SingleChildScrollView(
child: QuickEditField(

View File

@ -1,9 +1,8 @@
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/base/app_bar_actions.dart';
import 'package:appflowy/mobile/presentation/database/card/card_detail/widgets/widgets.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_field_bottom_sheets.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_field_type_option_editor.dart';
import 'package:appflowy/mobile/presentation/database/field/mobile_full_field_editor.dart';
import 'package:appflowy/mobile/presentation/widgets/widgets.dart';
import 'package:appflowy/plugins/database/application/field/field_backend_service.dart';
import 'package:appflowy/plugins/database/application/field/field_info.dart';
@ -63,7 +62,7 @@ class _QuickEditFieldState extends State<QuickEditField> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const AppBarCloseButton(),
const VSpace(16),
OptionTextField(
controller: controller,
type: _fieldOptionValues.type,
@ -193,7 +192,6 @@ class _QuickEditFieldState extends State<QuickEditField> {
},
),
],
const VSpace(38),
],
);
}

View File

@ -155,7 +155,7 @@ class CellController<T, D> {
/// and load from disk if it doesn't exist. You can set [loadIfNotExist] to
/// false to disable this behavior.
T? getCellData({bool loadIfNotExist = true}) {
final data = _cellCache.get(_cellContext);
final T? data = _cellCache.get(_cellContext);
if (data == null && loadIfNotExist) {
_loadData();
}