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: edit column sheet uniform ui (#4774)

Mathias Mogensen2d6856a23deb
diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/database/board/widgets/group_card_header.dart b/frontend/appflowy_flutter/lib/mobile/presentation/database/board/widgets/group_card_header.dart
index 77d8c194ca..5180febd8b 100644
--- a/frontend/appflowy_flutter/lib/mobile/presentation/database/board/widgets/group_card_header.dart
+++ b/frontend/appflowy_flutter/lib/mobile/presentation/database/board/widgets/group_card_header.dart
@@ -1,6 +1,9 @@
+import 'package:flutter/material.dart';
+
import 'package:appflowy/generated/flowy_svgs.g.dart';
import 'package:appflowy/generated/locale_keys.g.dart';
import 'package:appflowy/mobile/presentation/bottom_sheet/bottom_sheet.dart';
+import 'package:appflowy/mobile/presentation/widgets/flowy_mobile_quick_action_button.dart';
import 'package:appflowy/plugins/database/board/application/board_bloc.dart';
import 'package:appflowy/plugins/database/grid/presentation/widgets/header/field_type_extension.dart';
import 'package:appflowy_backend/protobuf/flowy-database2/field_entities.pbenum.dart';
@@ -8,7 +11,6 @@ import 'package:appflowy_backend/protobuf/flowy-database2/group.pb.dart';
import 'package:appflowy_board/appflowy_board.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';
import 'package:go_router/go_router.dart';
@@ -107,46 +109,43 @@ class _GroupCardHeaderState extends State<GroupCardHeader> {
splashRadius: 5,
onPressed: () => showMobileBottomSheet(
context,
- title: LocaleKeys.board_column_groupActions.tr(),
- showHeader: true,
- showCloseButton: true,
- builder: (_) {
- return Row(
- children: [
- Expanded(
- child: BottomSheetActionWidget(
- svg: FlowySvgs.edit_s,
- text: LocaleKeys.board_column_renameColumn.tr(),
- onTap: () {
- context.read<BoardBloc>().add(
- BoardEvent.startEditingHeader(
- widget.groupData.id,
- ),
- );
- context.pop();
- },
- ),
- ),
- const HSpace(8),
- Expanded(
- child: BottomSheetActionWidget(
- svg: FlowySvgs.hide_s,
- text: LocaleKeys.board_column_hideColumn.tr(),
- onTap: () {
- context.read<BoardBloc>().add(
- BoardEvent.toggleGroupVisibility(
- widget.groupData.customData.group
- as GroupPB,
- false,
- ),
- );
- context.pop();
- },
- ),
- ),
- ],
- );
- },
+ showDragHandle: true,
+ backgroundColor: Theme.of(context).colorScheme.surface,
+ builder: (_) => SeparatedColumn(
+ crossAxisAlignment: CrossAxisAlignment.stretch,
+ separatorBuilder: () => const Divider(
+ height: 8.5,
+ thickness: 0.5,
+ ),
+ children: [
+ MobileQuickActionButton(
+ text: LocaleKeys.board_column_renameColumn.tr(),
+ icon: FlowySvgs.edit_s,
+ onTap: () {
+ context.read<BoardBloc>().add(
+ BoardEvent.startEditingHeader(
+ widget.groupData.id,
+ ),
+ );
+ context.pop();
+ },
+ ),
+ MobileQuickActionButton(
+ text: LocaleKeys.board_column_hideColumn.tr(),
+ icon: FlowySvgs.hide_s,
+ onTap: () {
+ context.read<BoardBloc>().add(
+ BoardEvent.toggleGroupVisibility(
+ widget.groupData.customData.group
+ as GroupPB,
+ false,
+ ),
+ );
+ context.pop();
+ },
+ ),
+ ],
+ ),
),
),
IconButton(
diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json
index a31513f79a..5239a36635 100644
--- a/frontend/resources/translations/en.json
+++ b/frontend/resources/translations/en.json
@@ -941,7 +941,6 @@
"addToColumnBottomTooltip": "Add a new card at the bottom",
"renameColumn": "Rename",
"hideColumn": "Hide",
- "groupActions": "Group Actions",
"newGroup": "New Group",
"deleteColumn": "Delete",
"deleteColumnConfirmation": "This will delete this group and all the cards in it.\nAre you sure you want to continue?"