Parcourir la source

fix: text overflow when editing a filter

Richard Shiue il y a 1 an
Parent
commit
96410b2d32

+ 6 - 2
frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checkbox.dart

@@ -107,7 +107,12 @@ class _CheckboxFilterEditorState extends State<CheckboxFilterEditor> {
       height: 20,
       child: Row(
         children: [
-          FlowyText(state.filterInfo.fieldInfo.name),
+          Expanded(
+            child: FlowyText(
+              state.filterInfo.fieldInfo.name,
+              overflow: TextOverflow.ellipsis,
+            ),
+          ),
           const HSpace(4),
           CheckboxFilterConditionList(
             filterInfo: state.filterInfo,
@@ -118,7 +123,6 @@ class _CheckboxFilterEditorState extends State<CheckboxFilterEditor> {
                   .add(CheckboxFilterEditorEvent.updateCondition(condition));
             },
           ),
-          const Spacer(),
           DisclosureButton(
             popoverMutex: popoverMutex,
             onAction: (action) {

+ 6 - 2
frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/checklist/checklist.dart

@@ -91,12 +91,16 @@ class ChecklistState extends State<ChecklistFilterEditor> {
             height: 20,
             child: Row(
               children: [
-                FlowyText(state.filterInfo.fieldInfo.name),
+                Expanded(
+                  child: FlowyText(
+                    state.filterInfo.fieldInfo.name,
+                    overflow: TextOverflow.ellipsis,
+                  ),
+                ),
                 const HSpace(4),
                 ChecklistFilterConditionList(
                   filterInfo: state.filterInfo,
                 ),
-                const Spacer(),
                 DisclosureButton(
                   popoverMutex: widget.popoverMutex,
                   onAction: (action) {

+ 6 - 2
frontend/appflowy_flutter/lib/plugins/database_view/grid/presentation/widgets/filter/choicechip/select_option/select_option.dart

@@ -142,7 +142,12 @@ class _SelectOptionFilterEditorState extends State<SelectOptionFilterEditor> {
       height: 20,
       child: Row(
         children: [
-          FlowyText(state.filterInfo.fieldInfo.name),
+          Expanded(
+            child: FlowyText(
+              state.filterInfo.fieldInfo.name,
+              overflow: TextOverflow.ellipsis,
+            ),
+          ),
           const HSpace(4),
           SelectOptionFilterConditionList(
             filterInfo: state.filterInfo,
@@ -153,7 +158,6 @@ class _SelectOptionFilterEditorState extends State<SelectOptionFilterEditor> {
                   );
             },
           ),
-          const Spacer(),
           DisclosureButton(
             popoverMutex: popoverMutex,
             onAction: (action) {