fix(flutter_desktop): clicking on empty space when editing a cell sho… (#6949)

* fix(flutter_desktop): clicking on empty space when editing a cell shouldn't close event card

* test: fix integration tests
This commit is contained in:
Richard Shiue 2024-12-09 15:13:37 +08:00 committed by GitHub
parent d21c0c0dfc
commit 7b93bbe5ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 0 deletions

View File

@ -301,6 +301,7 @@ void main() {
await tester.createOption(name: "qwer");
await tester.selectOption(name: "asdf");
await tester.dismissCellEditor();
await tester.dismissCellEditor();
await tester.tapDatabaseFilterButton();
await tester.tapCreateFilterByFieldType(FieldType.MultiSelect, "Tags");
@ -332,6 +333,7 @@ void main() {
await tester.tapButton(finderForFieldType(FieldType.MultiSelect));
await tester.selectOption(name: "asdf");
await tester.dismissCellEditor();
await tester.dismissCellEditor();
tester.assertNumberOfEventsInCalendar(0);

View File

@ -31,6 +31,7 @@ class DesktopRowDetailDateCellSkin extends IEditableDateCellSkin {
direction: PopoverDirection.bottomWithLeftAligned,
constraints: BoxConstraints.loose(const Size(260, 620)),
margin: EdgeInsets.zero,
asBarrier: true,
child: Container(
alignment: AlignmentDirectional.centerStart,
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),

View File

@ -252,6 +252,7 @@ class _AddFileButtonState extends State<_AddFileButton> {
direction: widget.direction,
constraints: const BoxConstraints(maxWidth: _menuWidth),
margin: EdgeInsets.zero,
asBarrier: true,
onClose: () =>
context.read<EditorDropManagerState>().remove(_dropFileKey),
popupBuilder: (_) {
@ -458,6 +459,7 @@ class _FilePreviewRenderState extends State<_FilePreviewRender> {
offset: const Offset(0, 5),
triggerActions: PopoverTriggerFlags.none,
onClose: () => setState(() => isSelected = false),
asBarrier: true,
popupBuilder: (popoverContext) => MultiBlocProvider(
providers: [
BlocProvider.value(value: context.read<RowDetailBloc>()),

View File

@ -24,6 +24,7 @@ class DesktopRowDetailRelationCellSkin extends IEditableRelationCellSkin {
direction: PopoverDirection.bottomWithLeftAligned,
constraints: const BoxConstraints(maxWidth: 400, maxHeight: 400),
margin: EdgeInsets.zero,
asBarrier: true,
onClose: () => cellContainerNotifier.isFocus = false,
popupBuilder: (context) {
return BlocProvider.value(

View File

@ -25,6 +25,7 @@ class DesktopRowDetailSelectOptionCellSkin
controller: popoverController,
constraints: const BoxConstraints.tightFor(width: 300),
margin: EdgeInsets.zero,
asBarrier: true,
triggerActions: PopoverTriggerFlags.none,
direction: PopoverDirection.bottomWithLeftAligned,
onClose: () => cellContainerNotifier.isFocus = false,